| data_path |
String | null |
null |
— |
Optional runtime data directory path. |
| prefer_ipv6 |
bool |
false |
— |
Prefer IPv6 where applicable in runtime logic. |
| fast_mode |
bool |
true |
— |
Enables fast-path optimizations for traffic processing. |
| use_middle_proxy |
bool |
true |
none |
Enables ME transport mode; if false, runtime falls back to direct DC routing. |
| proxy_secret_path |
String | null |
"proxy-secret" |
Path may be null. |
Path to Telegram infrastructure proxy-secret file used by ME handshake logic. |
| proxy_config_v4_cache_path |
String | null |
"cache/proxy-config-v4.txt" |
— |
Optional cache path for raw getProxyConfig (IPv4) snapshot. |
| proxy_config_v6_cache_path |
String | null |
"cache/proxy-config-v6.txt" |
— |
Optional cache path for raw getProxyConfigV6 (IPv6) snapshot. |
| ad_tag |
String | null |
null |
— |
Global fallback ad tag (32 hex characters). |
| middle_proxy_nat_ip |
IpAddr | null |
null |
Must be a valid IP when set. |
Manual public NAT IP override used as ME address material when set. |
| middle_proxy_nat_probe |
bool |
true |
Auto-forced to true when use_middle_proxy = true. |
Enables ME NAT probing; runtime may force it on when ME mode is active. |
| middle_proxy_nat_stun |
String | null |
null |
Deprecated. Use network.stun_servers. |
Deprecated legacy single STUN server for NAT probing. |
| middle_proxy_nat_stun_servers |
String[] |
[] |
Deprecated. Use network.stun_servers. |
Deprecated legacy STUN list for NAT probing fallback. |
| stun_nat_probe_concurrency |
usize |
8 |
Must be > 0. |
Maximum number of parallel STUN probes during NAT/public endpoint discovery. |
| middle_proxy_pool_size |
usize |
8 |
none |
Target size of active ME writer pool. |
| middle_proxy_warm_standby |
usize |
16 |
none |
Reserved compatibility field in current runtime revision. |
| me_init_retry_attempts |
u32 |
0 |
0..=1_000_000. |
Startup retries for ME pool initialization (0 means unlimited). |
| me2dc_fallback |
bool |
true |
— |
Allows fallback from ME mode to direct DC when ME startup fails. |
| me_keepalive_enabled |
bool |
true |
none |
Enables periodic ME keepalive/ping traffic. |
| me_keepalive_interval_secs |
u64 |
8 |
none |
Base ME keepalive interval in seconds. |
| me_keepalive_jitter_secs |
u64 |
2 |
none |
Keepalive jitter in seconds to reduce synchronized bursts. |
| me_keepalive_payload_random |
bool |
true |
none |
Randomizes keepalive payload bytes instead of fixed zero payload. |
| rpc_proxy_req_every |
u64 |
0 |
0 or 10..=300. |
Interval for service RPC_PROXY_REQ activity signals (0 disables). |
| me_writer_cmd_channel_capacity |
usize |
4096 |
Must be > 0. |
Capacity of per-writer command channel. |
| me_route_channel_capacity |
usize |
768 |
Must be > 0. |
Capacity of per-connection ME response route channel. |
| me_c2me_channel_capacity |
usize |
1024 |
Must be > 0. |
Capacity of per-client command queue (client reader -> ME sender). |
| me_reader_route_data_wait_ms |
u64 |
2 |
0..=20. |
Bounded wait for routing ME DATA to per-connection queue (0 = no wait). |
| me_d2c_flush_batch_max_frames |
usize |
32 |
1..=512. |
Max ME->client frames coalesced before flush. |
| me_d2c_flush_batch_max_bytes |
usize |
131072 |
4096..=2_097_152. |
Max ME->client payload bytes coalesced before flush. |
| me_d2c_flush_batch_max_delay_us |
u64 |
500 |
0..=5000. |
Max microsecond wait for coalescing more ME->client frames (0 disables timed coalescing). |
| me_d2c_ack_flush_immediate |
bool |
true |
— |
Flushes client writer immediately after quick-ack write. |
| direct_relay_copy_buf_c2s_bytes |
usize |
65536 |
4096..=1_048_576. |
Copy buffer size for client->DC direction in direct relay. |
| direct_relay_copy_buf_s2c_bytes |
usize |
262144 |
8192..=2_097_152. |
Copy buffer size for DC->client direction in direct relay. |
| crypto_pending_buffer |
usize |
262144 |
— |
Max pending ciphertext buffer per client writer (bytes). |
| max_client_frame |
usize |
16777216 |
— |
Maximum allowed client MTProto frame size (bytes). |
| desync_all_full |
bool |
false |
— |
Emits full crypto-desync forensic logs for every event. |
| beobachten |
bool |
true |
— |
Enables per-IP forensic observation buckets. |
| beobachten_minutes |
u64 |
10 |
Must be > 0. |
Retention window (minutes) for per-IP observation buckets. |
| beobachten_flush_secs |
u64 |
15 |
Must be > 0. |
Snapshot flush interval (seconds) for observation output file. |
| beobachten_file |
String |
"cache/beobachten.txt" |
— |
Observation snapshot output file path. |
| hardswap |
bool |
true |
none |
Enables generation-based ME hardswap strategy. |
| me_warmup_stagger_enabled |
bool |
true |
none |
Staggers extra ME warmup dials to avoid connection spikes. |
| me_warmup_step_delay_ms |
u64 |
500 |
none |
Base delay in milliseconds between warmup dial steps. |
| me_warmup_step_jitter_ms |
u64 |
300 |
none |
Additional random delay in milliseconds for warmup steps. |
| me_reconnect_max_concurrent_per_dc |
u32 |
8 |
none |
Limits concurrent reconnect workers per DC during health recovery. |
| me_reconnect_backoff_base_ms |
u64 |
500 |
none |
Initial reconnect backoff in milliseconds. |
| me_reconnect_backoff_cap_ms |
u64 |
30000 |
none |
Maximum reconnect backoff cap in milliseconds. |
| me_reconnect_fast_retry_count |
u32 |
16 |
none |
Immediate retry budget before long backoff behavior applies. |
| me_single_endpoint_shadow_writers |
u8 |
2 |
0..=32. |
Additional reserve writers for one-endpoint DC groups. |
| me_single_endpoint_outage_mode_enabled |
bool |
true |
— |
Enables aggressive outage recovery for one-endpoint DC groups. |
| me_single_endpoint_outage_disable_quarantine |
bool |
true |
— |
Ignores endpoint quarantine in one-endpoint outage mode. |
| me_single_endpoint_outage_backoff_min_ms |
u64 |
250 |
Must be > 0; also <= me_single_endpoint_outage_backoff_max_ms. |
Minimum reconnect backoff in outage mode (ms). |
| me_single_endpoint_outage_backoff_max_ms |
u64 |
3000 |
Must be > 0; also >= me_single_endpoint_outage_backoff_min_ms. |
Maximum reconnect backoff in outage mode (ms). |
| me_single_endpoint_shadow_rotate_every_secs |
u64 |
900 |
— |
Periodic shadow writer rotation interval (0 disables). |
| me_floor_mode |
"static" | "adaptive" |
"adaptive" |
— |
Writer floor policy mode. |
| me_adaptive_floor_idle_secs |
u64 |
90 |
— |
Idle time before adaptive floor may reduce one-endpoint target. |
| me_adaptive_floor_min_writers_single_endpoint |
u8 |
1 |
1..=32. |
Minimum adaptive writer target for one-endpoint DC groups. |
| me_adaptive_floor_min_writers_multi_endpoint |
u8 |
1 |
1..=32. |
Minimum adaptive writer target for multi-endpoint DC groups. |
| me_adaptive_floor_recover_grace_secs |
u64 |
180 |
— |
Grace period to hold static floor after activity. |
| me_adaptive_floor_writers_per_core_total |
u16 |
48 |
Must be > 0. |
Global writer budget per logical CPU core in adaptive mode. |
| me_adaptive_floor_cpu_cores_override |
u16 |
0 |
— |
Manual CPU core count override (0 uses auto-detection). |
| me_adaptive_floor_max_extra_writers_single_per_core |
u16 |
1 |
— |
Per-core max extra writers above base floor for one-endpoint DCs. |
| me_adaptive_floor_max_extra_writers_multi_per_core |
u16 |
2 |
— |
Per-core max extra writers above base floor for multi-endpoint DCs. |
| me_adaptive_floor_max_active_writers_per_core |
u16 |
64 |
Must be > 0. |
Hard cap for active ME writers per logical CPU core. |
| me_adaptive_floor_max_warm_writers_per_core |
u16 |
64 |
Must be > 0. |
Hard cap for warm ME writers per logical CPU core. |
| me_adaptive_floor_max_active_writers_global |
u32 |
256 |
Must be > 0. |
Hard global cap for active ME writers. |
| me_adaptive_floor_max_warm_writers_global |
u32 |
256 |
Must be > 0. |
Hard global cap for warm ME writers. |
| upstream_connect_retry_attempts |
u32 |
2 |
Must be > 0. |
Connect attempts for selected upstream before error/fallback. |
| upstream_connect_retry_backoff_ms |
u64 |
100 |
— |
Delay between upstream connect attempts (ms). |
| upstream_connect_budget_ms |
u64 |
3000 |
Must be > 0. |
Total wall-clock budget for one upstream connect request (ms). |
| upstream_unhealthy_fail_threshold |
u32 |
5 |
Must be > 0. |
Consecutive failed requests before upstream is marked unhealthy. |
| upstream_connect_failfast_hard_errors |
bool |
false |
— |
Skips additional retries for hard non-transient connect errors. |
| stun_iface_mismatch_ignore |
bool |
false |
none |
Reserved compatibility flag in current runtime revision. |
| unknown_dc_log_path |
String | null |
"unknown-dc.txt" |
— |
File path for unknown-DC request logging (null disables file path). |
| unknown_dc_file_log_enabled |
bool |
false |
— |
Enables unknown-DC file logging. |
| log_level |
"debug" | "verbose" | "normal" | "silent" |
"normal" |
— |
Runtime logging verbosity. |
| disable_colors |
bool |
false |
— |
Disables ANSI colors in logs. |
| me_socks_kdf_policy |
"strict" | "compat" |
"strict" |
— |
SOCKS-bound KDF fallback policy for ME handshake. |
| me_route_backpressure_base_timeout_ms |
u64 |
25 |
Must be > 0. |
Base backpressure timeout for route-channel send (ms). |
| me_route_backpressure_high_timeout_ms |
u64 |
120 |
Must be >= me_route_backpressure_base_timeout_ms. |
High backpressure timeout when queue occupancy exceeds watermark (ms). |
| me_route_backpressure_high_watermark_pct |
u8 |
80 |
1..=100. |
Queue occupancy threshold (%) for high timeout mode. |
| me_health_interval_ms_unhealthy |
u64 |
1000 |
Must be > 0. |
Health monitor interval while writer coverage is degraded (ms). |
| me_health_interval_ms_healthy |
u64 |
3000 |
Must be > 0. |
Health monitor interval while writer coverage is healthy (ms). |
| me_admission_poll_ms |
u64 |
1000 |
Must be > 0. |
Poll interval for conditional-admission checks (ms). |
| me_warn_rate_limit_ms |
u64 |
5000 |
Must be > 0. |
Cooldown for repetitive ME warning logs (ms). |
| me_route_no_writer_mode |
"async_recovery_failfast" | "inline_recovery_legacy" | "hybrid_async_persistent" |
"hybrid_async_persistent" |
— |
Route behavior when no writer is immediately available. |
| me_route_no_writer_wait_ms |
u64 |
250 |
10..=5000. |
Max wait in async-recovery failfast mode (ms). |
| me_route_inline_recovery_attempts |
u32 |
3 |
Must be > 0. |
Inline recovery attempts in legacy mode. |
| me_route_inline_recovery_wait_ms |
u64 |
3000 |
10..=30000. |
Max inline recovery wait in legacy mode (ms). |
| fast_mode_min_tls_record |
usize |
0 |
— |
Minimum TLS record size when fast-mode coalescing is enabled (0 disables). |
| update_every |
u64 | null |
300 |
If set: must be > 0; if null: legacy fallback path is used. |
Unified refresh interval for ME config and proxy-secret updater tasks. |
| me_reinit_every_secs |
u64 |
900 |
Must be > 0. |
Periodic interval for zero-downtime ME reinit cycle. |
| me_hardswap_warmup_delay_min_ms |
u64 |
1000 |
Must be <= me_hardswap_warmup_delay_max_ms. |
Lower bound for hardswap warmup dial spacing. |
| me_hardswap_warmup_delay_max_ms |
u64 |
2000 |
Must be > 0. |
Upper bound for hardswap warmup dial spacing. |
| me_hardswap_warmup_extra_passes |
u8 |
3 |
Must be within [0, 10]. |
Additional warmup passes after the base pass in one hardswap cycle. |
| me_hardswap_warmup_pass_backoff_base_ms |
u64 |
500 |
Must be > 0. |
Base backoff between extra hardswap warmup passes. |
| me_config_stable_snapshots |
u8 |
2 |
Must be > 0. |
Number of identical ME config snapshots required before apply. |
| me_config_apply_cooldown_secs |
u64 |
300 |
none |
Cooldown between applied ME endpoint-map updates. |
| me_snapshot_require_http_2xx |
bool |
true |
— |
Requires 2xx HTTP responses for applying config snapshots. |
| me_snapshot_reject_empty_map |
bool |
true |
— |
Rejects empty config snapshots. |
| me_snapshot_min_proxy_for_lines |
u32 |
1 |
Must be > 0. |
Minimum parsed proxy_for rows required to accept snapshot. |
| proxy_secret_stable_snapshots |
u8 |
2 |
Must be > 0. |
Number of identical proxy-secret snapshots required before rotation. |
| proxy_secret_rotate_runtime |
bool |
true |
none |
Enables runtime proxy-secret rotation from updater snapshots. |
| me_secret_atomic_snapshot |
bool |
true |
— |
Keeps selector and secret bytes from the same snapshot atomically. |
| proxy_secret_len_max |
usize |
256 |
Must be within [32, 4096]. |
Upper length limit for accepted proxy-secret bytes. |
| me_pool_drain_ttl_secs |
u64 |
90 |
none |
Time window where stale writers remain fallback-eligible after map change. |
| me_pool_drain_threshold |
u64 |
128 |
— |
Max draining stale writers before batch force-close (0 disables threshold cleanup). |
| me_pool_drain_soft_evict_enabled |
bool |
true |
— |
Enables gradual soft-eviction of stale writers during drain/reinit instead of immediate hard close. |
| me_pool_drain_soft_evict_grace_secs |
u64 |
30 |
0..=3600. |
Grace period before stale writers become soft-evict candidates. |
| me_pool_drain_soft_evict_per_writer |
u8 |
1 |
1..=16. |
Maximum stale routes soft-evicted per writer in one eviction pass. |
| me_pool_drain_soft_evict_budget_per_core |
u16 |
8 |
1..=64. |
Per-core budget limiting aggregate soft-eviction work per pass. |
| me_pool_drain_soft_evict_cooldown_ms |
u64 |
5000 |
Must be > 0. |
Cooldown between consecutive soft-eviction passes (ms). |
| me_bind_stale_mode |
"never" | "ttl" | "always" |
"ttl" |
— |
Policy for new binds on stale draining writers. |
| me_bind_stale_ttl_secs |
u64 |
90 |
— |
TTL for stale bind allowance when stale mode is ttl. |
| me_pool_min_fresh_ratio |
f32 |
0.8 |
Must be within [0.0, 1.0]. |
Minimum fresh desired-DC coverage ratio before stale writers are drained. |
| me_reinit_drain_timeout_secs |
u64 |
120 |
0 disables force-close; if > 0 and < me_pool_drain_ttl_secs, runtime bumps it to TTL. |
Force-close timeout for draining stale writers (0 keeps indefinite draining). |
| proxy_secret_auto_reload_secs |
u64 |
3600 |
Deprecated. Use general.update_every. |
Deprecated legacy secret reload interval (fallback when update_every is not set). |
| proxy_config_auto_reload_secs |
u64 |
3600 |
Deprecated. Use general.update_every. |
Deprecated legacy config reload interval (fallback when update_every is not set). |
| me_reinit_singleflight |
bool |
true |
— |
Serializes ME reinit cycles across trigger sources. |
| me_reinit_trigger_channel |
usize |
64 |
Must be > 0. |
Trigger queue capacity for reinit scheduler. |
| me_reinit_coalesce_window_ms |
u64 |
200 |
— |
Trigger coalescing window before starting reinit (ms). |
| me_deterministic_writer_sort |
bool |
true |
— |
Enables deterministic candidate sort for writer binding path. |
| me_writer_pick_mode |
"sorted_rr" | "p2c" |
"p2c" |
— |
Writer selection mode for route bind path. |
| me_writer_pick_sample_size |
u8 |
3 |
2..=4. |
Number of candidates sampled by picker in p2c mode. |
| ntp_check |
bool |
true |
— |
Enables NTP drift check at startup. |
| ntp_servers |
String[] |
["pool.ntp.org"] |
— |
NTP servers used for drift check. |
| auto_degradation_enabled |
bool |
true |
none |
Reserved compatibility flag in current runtime revision. |
| degradation_min_unavailable_dc_groups |
u8 |
2 |
none |
Reserved compatibility threshold in current runtime revision. |