mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-17 08:55:49 +08:00
Services of one configuration on the same address, port, network
namespace and device now share one listener and its socket, all
accepting on it, instead of each binding its own: on Linux the second
bind failed unless SO_REUSEPORT was set. A listener keeps a list of the
services accepting on it; the first to start opens the socket under the
listener's open_mutex, as binding may take long, and the others use it
("Accepting connections, shared"). The socket is closed once the last of
them stops.
Such services must be of one type with the same -ol options: otherwise
the configuration is refused ("a service of another type listens
there", "a service with other socket options listens there").
mainclaim() now runs for every service, at startup too: it joins the
listener of its configuration for the address, takes over one of an
older configuration (one of its type first), or makes a new one, under
one hold of listener_mutex so that a listener found is not freed before
it is joined.
Services connecting back (-r) to one place share a pseudo-listener
without a socket, of any type. After a reload a client moves to one of
the newest services of its type on its listener with a slot free: 26 if
there is none of its type, 27 if none has a slot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| admin.py | ||
| auto.py | ||
| counters.py | ||
| dnspr.py | ||
| httpsrv_auth.py | ||
| httpsrv_files.py | ||
| httpsrv_keepalive.py | ||
| httpsrv_ops.py | ||
| httpsrv_parsing.py | ||
| httpsrv_proxypass.py | ||
| httpsrv_rules.py | ||
| ipv6.py | ||
| ktls.py | ||
| maxconn.py | ||
| parent_failover.py | ||
| parent_ports.py | ||
| parent_weights.py | ||
| pcre.py | ||
| portmap.py | ||
| proxy_http.py | ||
| reattach.py | ||
| reload.py | ||
| socks.py | ||
| splice.py | ||
| ssl.py | ||
| takeover.py | ||
| timeouts.py | ||
| tlspr.py | ||
| transparent.py | ||