From: Daniel Stenberg Date: Thu, 4 Dec 2025 07:45:55 +0000 (+0100) Subject: docs: clarify how to do unix domain sockets with SOCKS proxy X-Git-Tag: rc-8_18_0-1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8a4068e6868424d83a3394da4810c93a43c070a;p=thirdparty%2Fcurl.git docs: clarify how to do unix domain sockets with SOCKS proxy Ref: #19825 Closes #19829 --- diff --git a/docs/cmdline-opts/socks4.md b/docs/cmdline-opts/socks4.md index 8e92d5930c..59ec172b8d 100644 --- a/docs/cmdline-opts/socks4.md +++ b/docs/cmdline-opts/socks4.md @@ -7,6 +7,7 @@ Help: SOCKS4 proxy on given host + port Added: 7.15.2 Category: proxy Multi: single +Mutexed: proxy socks4a socks5 socks5-hostname See-also: - socks4a - socks5 @@ -21,8 +22,9 @@ Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. Using this socket type makes curl resolve the hostname and pass the address on to the proxy. -To specify proxy on a Unix domain socket, use localhost for host, e.g. -`socks4://localhost/path/to/socket.sock` +To specify the proxy on a Unix domain socket, use localhost for host and +append the absolute path to the domain socket. For example: +`socks4://localhost/path/to/socket.sock` (the scheme may be omitted). This option overrides any previous use of --proxy, as they are mutually exclusive. diff --git a/docs/cmdline-opts/socks4a.md b/docs/cmdline-opts/socks4a.md index 04d60b81b6..9e451cf7b0 100644 --- a/docs/cmdline-opts/socks4a.md +++ b/docs/cmdline-opts/socks4a.md @@ -7,6 +7,7 @@ Help: SOCKS4a proxy on given host + port Added: 7.18.0 Category: proxy Multi: single +Mutexed: proxy socks4 socks5 socks5-hostname See-also: - socks4 - socks5 @@ -20,8 +21,9 @@ Example: Use the specified SOCKS4a proxy. If the port number is not specified, it is assumed at port 1080. This asks the proxy to resolve the hostname. -To specify proxy on a Unix domain socket, use localhost for host, e.g. -`socks4a://localhost/path/to/socket.sock` +To specify the proxy on a Unix domain socket, use localhost for host and +append the absolute path to the domain socket. For example: +`socks4a://localhost/path/to/socket.sock` (the scheme may be omitted). This option overrides any previous use of --proxy, as they are mutually exclusive. diff --git a/docs/cmdline-opts/socks5-hostname.md b/docs/cmdline-opts/socks5-hostname.md index 0ea2ed739f..b558248a78 100644 --- a/docs/cmdline-opts/socks5-hostname.md +++ b/docs/cmdline-opts/socks5-hostname.md @@ -7,6 +7,7 @@ Help: SOCKS5 proxy, pass hostname to proxy Added: 7.18.0 Category: proxy Multi: single +Mutexed: proxy socks4 socks4a socks5 See-also: - socks5 - socks4a @@ -19,8 +20,9 @@ Example: Use the specified SOCKS5 proxy (and let the proxy resolve the hostname). If the port number is not specified, it is assumed at port 1080. -To specify proxy on a Unix domain socket, use localhost for host, e.g. -`socks5h://localhost/path/to/socket.sock` +To specify the proxy on a Unix domain socket, use localhost for host and +append the absolute path to the domain socket. For example: +`socks5h://localhost/path/to/socket.sock` (the scheme may be omitted). This option overrides any previous use of --proxy, as they are mutually exclusive. diff --git a/docs/cmdline-opts/socks5.md b/docs/cmdline-opts/socks5.md index 4ea660d62d..3aa65b33ad 100644 --- a/docs/cmdline-opts/socks5.md +++ b/docs/cmdline-opts/socks5.md @@ -10,8 +10,10 @@ Multi: single See-also: - socks5-hostname - socks4a +Mutexed: proxy socks4 socks4a socks5-hostname Example: - --socks5 proxy.example:7000 $URL + - --socks5 localhost/path/unix-domain $URL --- # `--socks5` @@ -19,8 +21,9 @@ Example: Use the specified SOCKS5 proxy - but resolve the hostname locally. If the port number is not specified, it is assumed at port 1080. -To specify proxy on a Unix domain socket, use localhost for host, e.g. -`socks5://localhost/path/to/socket.sock` +To specify the proxy on a Unix domain socket, use localhost for host and +append the absolute path to the domain socket. For example: +`socks5://localhost/path/to/socket.sock` (the scheme may be omitted). This option overrides any previous use of --proxy, as they are mutually exclusive. diff --git a/docs/libcurl/opts/CURLOPT_PROXY.md b/docs/libcurl/opts/CURLOPT_PROXY.md index 310e123e3d..fca07f23f6 100644 --- a/docs/libcurl/opts/CURLOPT_PROXY.md +++ b/docs/libcurl/opts/CURLOPT_PROXY.md @@ -89,8 +89,9 @@ proxy. Such tunneling is activated with CURLOPT_HTTPPROXYTUNNEL(3). Setting the proxy string to "" (an empty string) explicitly disables the use of a proxy, even if there is an environment variable set for it. -Unix domain sockets are supported for socks proxies since 7.84.0. Set -localhost for the host part. e.g. socks5h://localhost/path/to/socket.sock +Unix domain sockets are supported for SOCKS proxies. Set `localhost` for the +host part and append the absolute path to the domain socket. For example: +`socks5h://localhost/path/to/socket.sock` When you set a hostname to use, do not assume that there is any particular single port number used widely for proxies. Specify it.