feat: rewrite in Go

This commit is contained in:
2026-07-13 17:58:48 +07:00
parent a7d5177100
commit 1421b854d4
34 changed files with 1714 additions and 1825 deletions
+25 -13
View File
@@ -1,35 +1,47 @@
HOST=0.0.0.0
PORT=22
# Source video (auto-discovers video.* if unset). Only used to build frames.json.
VIDEO_PATH=video.mp4
# Generation settings
# Stored frame resolution in pixels. Higher = sharper but bigger .tsf files.
# regenerate your frames after changing it.
FRAME_RESOLUTION=512
# Playback settings.
# Playthroughs before the session is closed (0, unlimited).
MAX_LOOP=5
# Weather to loop the video or play random frames after completion. Options: loop | random
# Whether to keep looping the same frame set or pick a random one after each
# playthrough. Options: loop | random
PLAYBACK_MODE=random
# Let viewers switch frame sets with arrow keys
# Let viewers switch frame sets with arrow keys.
ALLOW_USER_CONTROL=true
# Min ms between arrow-key switches; ignores faster repeats.
SWITCH_DEBOUNCE_MS=120
# Minimum ms between arrow-key switches
SWITCH_DEBOUNCE_MS=500
# Pause in ms after the fake login before playback starts.
LOGIN_DELAY=1500
# ASCII rendering (live, no frame rebuild).
# CHARSET: detailed|standard|simple|blocks or custom ramp.
BRIGHTNESS_THRESHOLD=40
# ASCII rendering (applied live)
# CHARSET: detailed | standard | simple | blocks, or a custom ramp string.
CHARSET=blocks
# Pixels darker than this (0-100) render as the darkest ramp character.
BRIGHTNESS_THRESHOLD=40
# Invert the brightness ramp (for light terminal backgrounds).
INVERT=false
# Max rendered width/height in characters.
MAX_DIMENSION=1080
# Stored frame resolution (px).
# Higher = sharper but bigger frames.json. Rebuild required.
FRAME_RESOLUTION=512
# Connection limits. New connections over a limit are dropped immediately.
# Max simultaneous connections from a single client IP.
MAX_CONNECTIONS=10
# Max simultaneous connections across all clients combined.
MAX_TOTAL_CONNECTIONS=1000
MAX_AUTH_ATTEMPTS=6
# Login attempts allowed per connection before it is disconnected.
# (Empty password counts as an attempt.)
MAX_AUTH_ATTEMPTS=3
# SSH handshake deadline in ms (0 to disable).
HANDSHAKE_TIMEOUT=10000
# Log attempted usernames/passwords.
LOG_CREDENTIALS=true
# Minimum log level to emit: debug | info | warn | error
LOG_LEVEL=info