3proxy/tests/cases
Vladimir Dubrovin ef4969da19
Some checks failed
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
Unix sockets: no addresses on streams, abstract names, tcppm port 0
On Linux a proxy listening on a Unix socket relayed only the first
bytes of an answer (result 95): sockmap() read with recvfrom() into the
client's address, which for a Unix stream socket Linux fills with an
empty AF_UNIX one, and then sent with sendto() to that address, which a
connected Unix stream socket refuses. A TCP connection has no use for
addresses: sockmap() now sends and receives with NULL ones, and
connect-back sends its command with socksend() and reads the answer
with sockrecvfrom() without an address, which a NULL sin now allows.

An abstract socket name (-iunix:@NAME) was bound with the whole size of
struct sockaddr_un, padded with zeros, so a client naming it by its
bytes, as most do, reached another name. SASIZE() now gives an abstract
address its exact size; getsockname() calls that took SASIZE() of the
old contents as the buffer size take the buffer's size instead.

tcppm refused port 0 for a unix: target, though the manual gives
"tcppm 8080 unix:/var/run/app.sock 0" as the example: the port of a
Unix socket target is ignored, so 0 is allowed.

On a reload the new service bound the path anew and the old one,
closing after it, removed the file, the new service's by then, leaving
nothing to connect to. A service now notes the file it bound (device
and inode) and removes the path on closing only if it is still that
file.

A test case covers a proxy on a Unix socket and on an abstract one on
Linux, tcppm to a Unix socket, a parent reached through one, and a
listening Unix socket across reloads: its file kept and the proxy
answering, and the file removed once no service listens on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 12:25:13 +03:00
..
admin.py Name the HTTPSRV service in the string table 2026-10-15 15:36:13 +03:00
auto.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
dnspr.py Fix dnspr for Windows 2026-08-26 16:48:09 +03:00
httpsrv_auth.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
httpsrv_files.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
httpsrv_keepalive.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
httpsrv_ops.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
httpsrv_parsing.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
httpsrv_proxypass.py support proxypass in web server 2026-08-29 19:09:54 +03:00
httpsrv_rules.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
ipv6.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
maxconn.py Change waiting loops to semaphores for child counters 2026-10-12 13:58:48 +03:00
parent_failover.py parent: support fraction and % syntaxis for weight; support fallbacks with 0 weight 2026-09-16 20:11:55 +03:00
parent_ports.py Take another local port when the one bound cannot reach the destination 2026-09-17 13:03:15 +03:00
parent_weights.py parent: support fraction and % syntaxis for weight; support fallbacks with 0 weight 2026-09-16 20:11:55 +03:00
pcre.py Fix rewrite and over-long header handling on Windows 2026-08-29 20:37:12 +03:00
portmap.py Deliver the whole answer to a half-closed client 2026-10-13 12:21:59 +03:00
proxy_http.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
socks.py Fix: invalid hostname ACL handling in UDPASSOC 2026-10-01 16:58:28 +03:00
ssl.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
tlspr.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
transparent.py http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +03:00
unixsock.py Unix sockets: no addresses on streams, abstract names, tcppm port 0 2026-10-18 12:25:13 +03:00