Extract all magic numbers into share.config
Unified config file with [server] (user-facing: port, dir, ttl, lang, etc.) and [internal] (constants: timeouts, buffer sizes, cert params, UI timings). Replaces both DEFAULTS dict and hardcoded constants. JS constants (toast_ms, progress_hide_ms) passed through CFG injection. Old share.conf no longer used. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
[server]
|
||||
port = 3001
|
||||
dir = ~/Downloads/shared
|
||||
ttl = 7
|
||||
san =
|
||||
lang = ru
|
||||
refresh = 5
|
||||
per_page = 10,25,50,100
|
||||
|
||||
[internal]
|
||||
secs_per_day = 86400
|
||||
cleanup_interval = 3600
|
||||
ssl_handshake_timeout = 5
|
||||
sniff_size = 8192
|
||||
chunk_size = 65536
|
||||
cert_days = 3650
|
||||
cert_key_bits = 2048
|
||||
toast_ms = 2500
|
||||
progress_hide_ms = 1200
|
||||
Reference in New Issue
Block a user