mirror of
https://github.com/telemt/telemt.git
synced 2026-06-13 06:21:44 +03:00
sec -> ms in mask timeouts config. allows subsecond values in tests
This commit is contained in:
@@ -2466,8 +2466,8 @@ Note: This section also accepts the legacy alias `[server.admin_api]` (same sche
|
||||
| [`mask_shape_above_cap_blur`](#cfg-censorship-mask_shape_above_cap_blur) | `bool` | `false` |
|
||||
| [`mask_shape_above_cap_blur_max_bytes`](#cfg-censorship-mask_shape_above_cap_blur_max_bytes) | `usize` | `512` |
|
||||
| [`mask_relay_max_bytes`](#cfg-censorship-mask_relay_max_bytes) | `usize` | `5242880` |
|
||||
| [`mask_relay_timeout_secs`](#cfg-censorship-mask_relay_timeout_secs) | `u64` | `60` |
|
||||
| [`mask_relay_idle_timeout_secs`](#cfg-censorship-mask_relay_idle_timeout_secs) | `u64` | `5` |
|
||||
| [`mask_relay_timeout_ms`](#cfg-censorship-mask_relay_timeout_ms) | `u64` | `60_000` |
|
||||
| [`mask_relay_idle_timeout_ms`](#cfg-censorship-mask_relay_idle_timeout_ms) | `u64` | `5_000` |
|
||||
| [`mask_classifier_prefetch_timeout_ms`](#cfg-censorship-mask_classifier_prefetch_timeout_ms) | `u64` | `5` |
|
||||
| [`mask_timing_normalization_enabled`](#cfg-censorship-mask_timing_normalization_enabled) | `bool` | `false` |
|
||||
| [`mask_timing_normalization_floor_ms`](#cfg-censorship-mask_timing_normalization_floor_ms) | `u64` | `0` |
|
||||
@@ -2738,25 +2738,25 @@ Note: This section also accepts the legacy alias `[server.admin_api]` (same sche
|
||||
[censorship]
|
||||
mask_relay_max_bytes = 5242880
|
||||
```
|
||||
<a id="cfg-censorship-mask_relay_timeout_secs"></a>
|
||||
- `mask_relay_timeout_secs`
|
||||
- **Constraints / validation**: Should be `>= mask_relay_idle_timeout_secs`.
|
||||
- **Description**: Wall-clock cap (seconds) for the full masking relay on non-MTProto fallback paths. Raise when the mask target is a long-lived service (e.g. WebSocket).
|
||||
<a id="cfg-censorship-mask_relay_timeout_ms"></a>
|
||||
- `mask_relay_timeout_ms`
|
||||
- **Constraints / validation**: Should be `>= mask_relay_idle_timeout_ms`.
|
||||
- **Description**: Wall-clock cap (ms) for the full masking relay on non-MTProto fallback paths. Raise when the mask target is a long-lived service (e.g. WebSocket). Default: 60 000 ms (60 s).
|
||||
- **Example**:
|
||||
|
||||
```toml
|
||||
[censorship]
|
||||
mask_relay_timeout_secs = 60
|
||||
mask_relay_timeout_ms = 60000
|
||||
```
|
||||
<a id="cfg-censorship-mask_relay_idle_timeout_secs"></a>
|
||||
- `mask_relay_idle_timeout_secs`
|
||||
- **Constraints / validation**: Should be `<= mask_relay_timeout_secs`.
|
||||
- **Description**: Per-read idle timeout (seconds) on masking relay and drain paths. Limits resource consumption by slow-loris attacks and port scanners. A read call stalling beyond this value is treated as an abandoned connection.
|
||||
<a id="cfg-censorship-mask_relay_idle_timeout_ms"></a>
|
||||
- `mask_relay_idle_timeout_ms`
|
||||
- **Constraints / validation**: Should be `<= mask_relay_timeout_ms`.
|
||||
- **Description**: Per-read idle timeout (ms) on masking relay and drain paths. Limits resource consumption by slow-loris attacks and port scanners. A read call stalling beyond this value is treated as an abandoned connection. Default: 5 000 ms (5 s).
|
||||
- **Example**:
|
||||
|
||||
```toml
|
||||
[censorship]
|
||||
mask_relay_idle_timeout_secs = 5
|
||||
mask_relay_idle_timeout_ms = 5000
|
||||
```
|
||||
<a id="cfg-censorship-mask_classifier_prefetch_timeout_ms"></a>
|
||||
- `mask_classifier_prefetch_timeout_ms`
|
||||
|
||||
Reference in New Issue
Block a user