mirror of
https://github.com/YuzuZensai/TrollSSH.git
synced 2026-09-13 16:28:57 +00:00
📦 build: add memory limit and session safeguard settings
This commit is contained in:
@@ -26,12 +26,16 @@ FORCE_GRAYSCALE=false
|
||||
|
||||
# Max rendered width/height in characters.
|
||||
MAX_DIMENSION=512
|
||||
# Max rendered area (columns x rows); larger terminals are scaled down.
|
||||
MAX_TERMINAL_CELLS=256000
|
||||
|
||||
# Memory budget in MB for the rendered-frame cache (0 disables caching).
|
||||
RENDER_CACHE_MB=256
|
||||
|
||||
# Go soft memory limit; set below your container limit to avoid OOM kills.
|
||||
GOMEMLIMIT=1GiB
|
||||
# Docker Compose container memory limit. Leave headroom for mapped frame files.
|
||||
MEMORY_LIMIT=2g
|
||||
|
||||
# Connection limits. New connections over a limit are dropped immediately.
|
||||
# Max simultaneous connections from a single client IP.
|
||||
@@ -43,6 +47,8 @@ MAX_TOTAL_CONNECTIONS=1000
|
||||
MAX_AUTH_ATTEMPTS=3
|
||||
# SSH handshake deadline in ms (0 to disable).
|
||||
HANDSHAKE_TIMEOUT=30000
|
||||
# Maximum session lifetime in ms (0 to disable).
|
||||
SESSION_TIMEOUT=600000
|
||||
|
||||
# Log attempted usernames/passwords.
|
||||
LOG_CREDENTIALS=true
|
||||
|
||||
@@ -3,6 +3,7 @@ services:
|
||||
image: ghcr.io/yuzuzensai/trollssh:v1.0.1
|
||||
container_name: trollssh
|
||||
restart: unless-stopped
|
||||
mem_limit: ${MEMORY_LIMIT:-2g}
|
||||
ports:
|
||||
- "22:22"
|
||||
env_file:
|
||||
|
||||
Reference in New Issue
Block a user