← Commit list

e8a4068e68

Daniel Stenberg
Daniel Stenberg
2025-12-04
SUCCESS Duration: 164s

Subject

docs: clarify how to do unix domain sockets with SOCKS proxy

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/cmdline-opts/socks4.md+4 -2
@@ -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.
docs/cmdline-opts/socks4a.md+4 -2
@@ -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.
docs/cmdline-opts/socks5-hostname.md+4 -2
@@ -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.
docs/cmdline-opts/socks5.md+5 -2
@@ -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.
docs/libcurl/opts/CURLOPT_PROXY.md+3 -2
@@ -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.