3proxy/tests/cases
Vladimir Dubrovin 724c92f3f6 Re-authenticate clients of old services against the new configuration
After a reload, unless noforce, a client of an old service goes by the
rules of the newest service on its listener, the one accepting there
now. It takes one of that service's maxconn slots, which counts it
there and keeps that service and its configuration alive until the
client is done, and is re-authenticated as its client: access lists,
users, authentication, bandwidth limits and traffic counters come from
the new configuration. A later reload moves it on, giving the slot
back. The client stays its own service's child, which keeps its
filters and TLS state.

It is dropped if its service was removed or is of another type now
(26), or if the newest service has no free slot (27); what the
re-authentication refuses ends it as before. A service without a
listener (UDP, connecting back) keeps its clients as they are.

This restores what force did before the configuration was kept per
service: since then a client compared its version with its own
service's configuration, which never changes, and was never checked
again. Services now take their configuration's version as it is: a
reload numbers the new configuration before reading it, and so does
startup now, where services were numbered one ahead.

A listener now stays with its old service until that service's last
client is gone, those clients looking the newest service up through
it; the socket itself is still closed as soon as nobody accepts on it.
Connection limits are given back in the configuration they were taken
in. PSRV() is the service whose rules apply to a client.

The reload case checks that a download of a user the new configuration
keeps finishes under it, and that one of a user it removes is cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:16:00 +03:00
..
admin.py Tests: wait for the reload requested in the admin case 2026-10-11 10:26:02 +03:00
auto.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
counters.py Keep the values of numbered traffic counters across reloads 2026-10-13 19:05:59 +03:00
dnspr.py Fix dnspr for Windows 2026-08-26 16:28:27 +03:00
httpsrv_auth.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
httpsrv_files.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
httpsrv_keepalive.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
httpsrv_ops.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
httpsrv_parsing.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
httpsrv_proxypass.py support proxypass in web server 2026-08-27 17:57:51 +03:00
httpsrv_rules.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
ipv6.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
ktls.py splice() over kernel TLS 2026-10-14 18:50:02 +03:00
maxconn.py Change waiting loops to semaphores for child counters 2026-10-10 23:10:57 +03:00
parent_failover.py parent: support fraction and % syntaxis for weight; support fallbacks with 0 weight 2026-09-16 20:04:10 +03:00
parent_ports.py Take another local port when the one bound cannot reach the destination 2026-09-17 13:02:56 +03:00
parent_weights.py parent: support fraction and % syntaxis for weight; support fallbacks with 0 weight 2026-09-16 20:04:10 +03:00
pcre.py Fix rewrite and over-long header handling on Windows 2026-08-29 20:21:29 +03:00
portmap.py tests: run the half-close case on Windows again 2026-10-13 12:57:50 +03:00
proxy_http.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
reload.py Re-authenticate clients of old services against the new configuration 2026-10-14 23:16:00 +03:00
socks.py Fix: invalid hostname ACL handling in UDPASSOC 2026-10-01 16:57:36 +03:00
splice.py Make the automatic splice() mode's heuristics a service option 2026-10-14 19:02:23 +03:00
ssl.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
takeover.py Hand listening sockets over on a reload 2026-10-14 22:14:04 +03:00
timeouts.py per-service timeouts 2026-10-13 15:12:05 +03:00
tlspr.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00
transparent.py http server implemented, pcre support for hostnames in acls implemented 2026-08-27 14:34:27 +03:00