sws: fix binding to unix socket on Windows

Windows 10.17063+ (having unix socket support) fails to set for unix
sockets the `SO_REUSEADDR` option, with error 10045 (`WSAEOPNOTSUPP`),
and also fails to set `SO_KEEPALIVE` with error 10042 (`WSAENOPROTOOPT`).

Fix by not enabling these socket options on Windows for unix sockets.

Also:
- fixing test 1435, 1436 to run in CI.
- fixing the `socksd` test server for test 1467, 1468, 1470. But, also
  disable these for now due to another Windows issue: #19825

Ref: https://stackoverflow.com/questions/68791319/unix-domain-socket-bind-failed-in-windows/68794755#68794755
Ref: #19810
Closes #19812
This commit is contained in:
Viktor Szakats 2025-12-02 17:45:18 +01:00
parent dfd781ff62
commit f97e62ff14
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
5 changed files with 70 additions and 45 deletions

View file

@ -30,9 +30,11 @@ Funny-head: yesyes
#
# Client-side
<client>
# --socks5 cannot accept Windows absolute paths
<features>
proxy
UnixSockets
!win32
</features>
<server>
http

View file

@ -31,9 +31,11 @@ Funny-head: yesyes
#
# Client-side
<client>
# --socks5h cannot accept Windows absolute paths
<features>
proxy
UnixSockets
!win32
</features>
<server>
http

View file

@ -32,9 +32,11 @@ Funny-head: yesyes
#
# Client-side
<client>
# --proxy cannot accept Windows absolute paths
<features>
proxy
UnixSockets
!win32
</features>
<server>
https