feat(tunnel): free finished tunnels at once and wait out 429s on --remote

A tunnel closed with code 1000 is freed without the 60s grace, a shared: true API key counts tunnels per X-Client-Id, and --remote waits out Retry-After and a full tunnel cap with a countdown; responses carry X-RateLimit-* headers.
This commit is contained in:
imSp4rky
2026-11-09 15:43:33 -07:00
parent 4b6d15cc2a
commit b10fd2d3a4
13 changed files with 358 additions and 25 deletions
+4 -2
View File
@@ -336,8 +336,10 @@ A service that uses a server account does not work with `--local-proxy`, because
logs in with its own account. If the tunnel drops, the client connects again, and a new request
from the server waits up to 10 seconds for it. A request that was in progress when the tunnel
dropped fails. The server closes a tunnel when its client has not connected for 60 seconds, and
the client then stops with `The tunnel to the server closed`. An API key can have 4 tunnels
open at once.
the client then stops with `The tunnel to the server closed`. A client that exits closes its
tunnel at once. An API key can have 4 tunnels open at once (4 for each person on a key with
`shared: true`, see [services configuration](../reference/configuration/services.md)). A fifth run waits for a free
tunnel and tries again every 15 seconds, for one hour at most.
## Basic (static proxies)