mirror of
https://github.com/telemt/telemt.git
synced 2026-09-05 18:16:06 +03:00
fix(synlimit): raise default synlimit_burst from 1 to 24
The generic-path SYN limiter default of burst=1 admits only one new connection per source IP, then refills at 48/minute (0.8/s). Telegram clients open several connections at once on startup/reconnect, so the extra SYNs are rejected with TCP RST until a token accrues — clients intermittently fail to connect until the app is restarted. The iOS fast-path (meta length 64) does not match real-world traffic behind carrier NAT/NAT64 (SYNs arrive as 60 bytes), so the generic path governs all clients, iPhone included. Raise its default burst to 24 — the value already used by the iOS path — so a legitimate startup fan-out passes. Steady-state rate (48/minute) is unchanged, preserving the anti-TSPU posture. Updates the default constant, the default-assertion test, and the EN/RU/DE CONFIG_PARAMS docs.
This commit is contained in:
@@ -2314,7 +2314,7 @@ Note: This section also accepts the legacy alias `[server.admin_api]` (same sche
|
||||
| [`synlimit`](#synlimit-serverlisteners) | `false`, `"iptables"`, or `"nftables"` | `false` | `✔` |
|
||||
| [`synlimit_seconds`](#synlimit_seconds-serverlisteners) | `u32` | `60` | `✔` |
|
||||
| [`synlimit_hitcount`](#synlimit_hitcount-serverlisteners) | `u32` | `48` | `✔` |
|
||||
| [`synlimit_burst`](#synlimit_burst-serverlisteners) | `u32` | `1` | `✔` |
|
||||
| [`synlimit_burst`](#synlimit_burst-serverlisteners) | `u32` | `24` | `✔` |
|
||||
| [`synlimit_ios_seconds`](#synlimit_ios_seconds-serverlisteners) | `u32` | `1` | `✔` |
|
||||
| [`synlimit_ios_hitcount`](#synlimit_ios_hitcount-serverlisteners) | `u32` | `12` | `✔` |
|
||||
| [`synlimit_ios_burst`](#synlimit_ios_burst-serverlisteners) | `u32` | `24` | `✔` |
|
||||
@@ -2397,7 +2397,7 @@ Note: This section also accepts the legacy alias `[server.admin_api]` (same sche
|
||||
synlimit_hitcount = 48
|
||||
```
|
||||
## synlimit_burst (server.listeners)
|
||||
- **Constraints / validation**: `u32`, must be `> 0`. Default is `1`.
|
||||
- **Constraints / validation**: `u32`, must be `> 0`. Default is `24`.
|
||||
- **Description**: Generic SYN-fix token-bucket burst size. Higher values allow short connection bursts from the same source IP before the steady-state `synlimit_hitcount / synlimit_seconds` rate is enforced.
|
||||
- **Example**:
|
||||
|
||||
@@ -2406,7 +2406,7 @@ Note: This section also accepts the legacy alias `[server.admin_api]` (same sche
|
||||
ip = "0.0.0.0"
|
||||
port = 443
|
||||
synlimit = "iptables"
|
||||
synlimit_burst = 1
|
||||
synlimit_burst = 24
|
||||
```
|
||||
## synlimit_ios_seconds (server.listeners)
|
||||
- **Constraints / validation**: `u32`, must be `> 0`. Default is `1`.
|
||||
|
||||
Reference in New Issue
Block a user