Change Unix domain socket paths from `/tmp/curl-socksd-<random>` to
`/drive/path/to/LOGDIR/PIDDIR/*-uds` to avoid having to create and
delete them before use. Also to use a path which remains an absolute one
while passed from MSYS2 Perl to native Windows curl tool and test server
via the command-line, and keep pointing to the same location, fixing:
```
=== Start of file commands.log
../src/curl.exe -q --output log/3/curl1468.out --include --trace-ascii log/3/trace1468
--trace-time http://this.is.a.host.name:64405/1468
--proxy socks5h://localhost/tmp/curl-socksd-YnbvRo98 [...]
=== End of file commands.log
=== Start of file socks2_server.log
[...]
14:11:54.597968 Listening on Unix socket D:/a/_temp/msys64/tmp/curl-socksd-YnbvRo98
```
Ref: https://github.com/curl/curl/actions/runs/
19896583933/job/
57028545111?pr=19812
The curl tool is pending #19825 to fix accepting an absolute unix domain
socket path on Windows.
Assisted-by: Viktor Szakats
Closes #19810
#######################################################################
# Initialize configuration variables
sub initserverconfig {
- my ($fh, $socks) = tempfile("curl-socksd-XXXXXXXX", TMPDIR => 1);
- close($fh);
- unlink($socks);
- my ($f2, $http) = tempfile("curl-http-XXXXXXXX", TMPDIR => 1);
- close($f2);
- unlink($http);
- $SOCKSUNIXPATH = $socks; # SOCKS Unix domain socket
- $HTTPUNIXPATH = $http; # HTTP Unix domain socket
+ $SOCKSUNIXPATH = "$pwd/$LOGDIR/$PIDDIR/socks-uds"; # SOCKS Unix domain socket
+ $HTTPUNIXPATH = "$pwd/$LOGDIR/$PIDDIR/http-uds"; # HTTP Unix domain socket
$stunnel = checkcmd("stunnel4") || checkcmd("tstunnel") || checkcmd("stunnel");
# get the name of the current user