This commit is contained in:
Mateusz Gruszczyński committed 2026-11-24 09:26:09 +01:00
1 parent 934d748ea2
commit 8d15429560
13 files changed
+171 -17

No files matched your search

+25 -1
View File
@@ -17,9 +17,33 @@ Transport settings attach to **named listeners**, and a Vhost must select the ap
- **Immediately after a successful panel save:** H2/H1 TLS responses use the saved `alt_svc_max_age` (`Alt-Svc`), provided a matching UDP listener was actually bound at startup. Origin `Alt-Svc` never passes through. The value `0` publishes `ma=0`.
- **Disabling H3 on a Vhost or an existing listener:** new H1/H2 responses publish `Alt-Svc: clear` to remove the browser's cached alternative service. A browser may keep an established QUIC connection until it closes; `clear` does not forcibly terminate it.
- **For new QUIC connections only:** updates to `max_concurrent_bidistream`, `max_concurrent_unistream`, `max_idle_timeout` and reductions to `max_concurrent_connections` are applied without restart. Existing QUIC connections keep their negotiated limits. If no existing UDP socket matches the saved listener address, no H3 is advertised or accepted on the old address.
- **For new QUIC connections only:** updates to `max_concurrent_bidistream`, `max_concurrent_unistream`, `max_idle_timeout`, `keep_alive_interval`, `keep_alive_mode` and reductions to `max_concurrent_connections` are applied without restart. Existing QUIC connections keep their negotiated limits. If no existing UDP socket matches the saved listener address, no H3 is advertised or accepted on the old address.
- **Restart needed:** UDP listener enable/disable, changing IP/port/TLS properties, UDP socket buffer sizes, changes to H1/H2 listener settings and increasing `max_concurrent_connections` above the startup bound. The live listener status continues to show `restart_required` for these cases. After a restart, the new connection cap can take effect.
### QUIC keep-alive (long requests over HTTP/3)
A QUIC connection is closed when no packet crosses it for `max_idle_timeout` (default 10 s; the effective
value is the lower of the client's and the server's). A request that is legitimately silent for longer —
long polling, ActiveSync `Ping`, Server-Sent Events, a slow upstream before its response headers — is then
cut off together with the connection, and mobile NATs drop idle UDP mappings even sooner. HTTP/2 over TCP
does not have this problem.
| Parameter | Default | Accepted values | Meaning |
|---|---:|---|---|
| `keep_alive_interval` | `0` (off) | 0–3600 s, shorter than `max_idle_timeout` unless that is `0` | Seconds between QUIC PING frames sent by RustProxy |
| `keep_alive_mode` | `active_requests` | `active_requests`, `always` | When the PINGs keep a connection open |
- `active_requests` (recommended): PINGs keep every connection alive at the transport level, and RustProxy
itself closes a connection (HTTP/3 GOAWAY) once it has had no request in progress for `max_idle_timeout`.
Idle browser connections therefore still close as before, while connections with a long request stay open.
- `always`: every connection is kept alive until the client closes it. Use only with a sufficient
`max_concurrent_connections`, because idle connections are no longer reclaimed by the server.
Suggested values for sites with long requests: `max_idle_timeout` 30 s and `keep_alive_interval` 15 s (below
typical mobile NAT UDP timeouts). The settings apply to new QUIC connections without a restart. The response
header/read timeouts of the Vhost still apply. For ActiveSync, disabling HTTP/3 on the Vhost remains the most
robust choice.
### QUIC UDP socket buffers
The HTTP/3 settings of each TLS listener include: