3proxy/tests/cases
Vladimir Dubrovin 6f02ec2747 Take another local port when the one bound cannot reach the destination
extport binds a local port out of its range and connects from it. A port
which is free to bind may still be half of a pair which is closing from an
earlier connection to the same destination, and Windows fails the connect
with WSAEADDRINUSE where other systems fail the bind and fall back. The
request then failed with error 13 for a reason another port would have
avoided, which is what the range is searched for in the first place.

Retry the connect with another port from the range. Only for that error, so
a destination which is simply unreachable still costs one attempt, and out of
the same ten tries the bind already spends, so the attempts parentretries
makes are not multiplied. EADDRINUSE joins the errno values proxy.h maps to
their Winsock numbers, without which the test would never match on Windows.

parent_ports gave its three services one window between them, which is how
the case met the collision on the Windows runner. Each has its own now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 13:03:15 +03:00
..
admin.py Add tests 2026-08-25 18:03:50 +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
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 http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +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 http server implemented, pcre support for hostnames in acls implemented 2026-08-29 19:09:54 +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