summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBalakrishnan Balasubramanian <3070606-balki@users.noreply.gitlab.com>2022-05-19 15:33:22 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-05-19 15:35:03 +0200
commitdfa84a0450ca4bc08ccaebb8dfffb23735b281ef (patch)
treeac6b9a8d60a38cf33ecf74508113df41fd79be75 /docs
parentee52bead4d1508165b39e5a23b6d7d16cd1ba00a (diff)
downloadcurl-dfa84a0450ca4bc08ccaebb8dfffb23735b281ef.tar.gz
socks: support unix sockets for socks proxy
Usage: curl -x "socks5h://localhost/run/tor/socks" "https://example.com" Updated runtests.pl to run a socksd server listening on unix socket Added tests test1467 test1468 Added documentation for proxy command line option and socks proxy options Closes #8668
Diffstat (limited to 'docs')
-rw-r--r--docs/cmdline-opts/proxy.d3
-rw-r--r--docs/cmdline-opts/socks4.d3
-rw-r--r--docs/cmdline-opts/socks4a.d3
-rw-r--r--docs/cmdline-opts/socks5-hostname.d3
-rw-r--r--docs/cmdline-opts/socks5.d3
-rw-r--r--docs/libcurl/opts/CURLOPT_PROXY.35
6 files changed, 19 insertions, 1 deletions
diff --git a/docs/cmdline-opts/proxy.d b/docs/cmdline-opts/proxy.d
index 60674b5f8..49068b93e 100644
--- a/docs/cmdline-opts/proxy.d
+++ b/docs/cmdline-opts/proxy.d
@@ -14,6 +14,9 @@ specified or http:// will be treated as HTTP proxy. Use socks4://, socks4a://,
socks5:// or socks5h:// to request a specific SOCKS version to be used.
(Added in 7.21.7)
+Unix domain sockets are supported for socks proxy. Set localhost for the host
+part. e.g. socks5h://localhost/path/to/socket.sock
+
HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for
OpenSSL, GnuTLS and NSS.
diff --git a/docs/cmdline-opts/socks4.d b/docs/cmdline-opts/socks4.d
index a1fb1b344..c460d494b 100644
--- a/docs/cmdline-opts/socks4.d
+++ b/docs/cmdline-opts/socks4.d
@@ -10,6 +10,9 @@ Use the specified SOCKS4 proxy. If the port number is not specified, it is
assumed at port 1080. Using this socket type make curl resolve the host name
and passing 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
+
This option overrides any previous use of --proxy, as they are mutually
exclusive.
diff --git a/docs/cmdline-opts/socks4a.d b/docs/cmdline-opts/socks4a.d
index e39b968aa..ba56594b0 100644
--- a/docs/cmdline-opts/socks4a.d
+++ b/docs/cmdline-opts/socks4a.d
@@ -9,6 +9,9 @@ See-also: socks4 socks5 socks5-hostname
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 host name.
+To specify proxy on a unix domain socket, use localhost for host, e.g.
+socks4a://localhost/path/to/socket.sock
+
This option overrides any previous use of --proxy, as they are mutually
exclusive.
diff --git a/docs/cmdline-opts/socks5-hostname.d b/docs/cmdline-opts/socks5-hostname.d
index 6530429a9..628a2db24 100644
--- a/docs/cmdline-opts/socks5-hostname.d
+++ b/docs/cmdline-opts/socks5-hostname.d
@@ -9,6 +9,9 @@ See-also: socks5 socks4a
Use the specified SOCKS5 proxy (and let the proxy resolve the host name). 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
+
This option overrides any previous use of --proxy, as they are mutually
exclusive.
diff --git a/docs/cmdline-opts/socks5.d b/docs/cmdline-opts/socks5.d
index af1c05771..bf43652b3 100644
--- a/docs/cmdline-opts/socks5.d
+++ b/docs/cmdline-opts/socks5.d
@@ -9,6 +9,9 @@ See-also: socks5-hostname socks4a
Use the specified SOCKS5 proxy - but resolve the host name 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
+
This option overrides any previous use of --proxy, as they are mutually
exclusive.
diff --git a/docs/libcurl/opts/CURLOPT_PROXY.3 b/docs/libcurl/opts/CURLOPT_PROXY.3
index 704a65d6a..5cf67b13c 100644
--- a/docs/libcurl/opts/CURLOPT_PROXY.3
+++ b/docs/libcurl/opts/CURLOPT_PROXY.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -73,6 +73,9 @@ use of a proxy, even if there is an environment variable set for it.
A proxy host string can also include protocol scheme (http://) and embedded
user + password.
+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
+
The application does not have to keep the string around after setting this
option.
.SH "Environment variables"