HTTP GET via SOCKS5 proxy via unix sockets
</name>
<command>
---socks5 localhost%PWD/%SOCKSUNIXPATH http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+--socks5 localhost%SOCKSUNIXPATH http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
HTTP GET with host name using SOCKS5h via unix sockets
</name>
<command>
-http://this.is.a.host.name:%HTTPPORT/%TESTNUMBER --proxy socks5h://localhost%PWD/%SOCKSUNIXPATH
+http://this.is.a.host.name:%HTTPPORT/%TESTNUMBER --proxy socks5h://localhost%SOCKSUNIXPATH
</command>
</client>
HTTPS GET with host name using SOCKS5h via unix sockets
</name>
<command>
-https://this.is.a.host.name:%HTTPSPORT/%TESTNUMBER -k --proxy socks5h://localhost%PWD/%SOCKSUNIXPATH
+https://this.is.a.host.name:%HTTPSPORT/%TESTNUMBER -k --proxy socks5h://localhost%SOCKSUNIXPATH
</command>
</client>
return $server->sockport();
}
+use File::Temp qw/ tempfile/;
+
#######################################################################
# Initialize configuration variables
sub initserverconfig {
- $SOCKSUNIXPATH = "$LOGDIR/$PIDDIR/socks.sock"; # SOCKS Unix domain socket
- $HTTPUNIXPATH = "$LOGDIR/$PIDDIR/http.sock"; # HTTP Unix domain socket
+ my ($fh, $socks) = tempfile("/tmp/curl-socksd-XXXXXXXX");
+ close($fh);
+ unlink($socks);
+ my ($f2, $http) = tempfile("/tmp/curl-http-XXXXXXXX");
+ close($f2);
+ unlink($http);
+ $SOCKSUNIXPATH = $socks; # SOCKS Unix domain socket
+ $HTTPUNIXPATH = $http; # HTTP Unix domain socket
$stunnel = checkcmd("stunnel4") || checkcmd("tstunnel") || checkcmd("stunnel");
# get the name of the current user