xref: /aosp_15_r20/external/curl/docs/cmdline-opts/socks5.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: socks5
5*6236dae4SAndroid Build Coastguard WorkerArg: <host[:port]>
6*6236dae4SAndroid Build Coastguard WorkerHelp: SOCKS5 proxy on given host + port
7*6236dae4SAndroid Build Coastguard WorkerAdded: 7.18.0
8*6236dae4SAndroid Build Coastguard WorkerCategory: proxy
9*6236dae4SAndroid Build Coastguard WorkerMulti: single
10*6236dae4SAndroid Build Coastguard WorkerSee-also:
11*6236dae4SAndroid Build Coastguard Worker  - socks5-hostname
12*6236dae4SAndroid Build Coastguard Worker  - socks4a
13*6236dae4SAndroid Build Coastguard WorkerExample:
14*6236dae4SAndroid Build Coastguard Worker  - --socks5 proxy.example:7000 $URL
15*6236dae4SAndroid Build Coastguard Worker---
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard Worker# `--socks5`
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard WorkerUse the specified SOCKS5 proxy - but resolve the hostname locally. If the
20*6236dae4SAndroid Build Coastguard Workerport number is not specified, it is assumed at port 1080.
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerTo specify proxy on a Unix domain socket, use localhost for host, e.g.
23*6236dae4SAndroid Build Coastguard Worker`socks5://localhost/path/to/socket.sock`
24*6236dae4SAndroid Build Coastguard Worker
25*6236dae4SAndroid Build Coastguard WorkerThis option overrides any previous use of --proxy, as they are mutually
26*6236dae4SAndroid Build Coastguard Workerexclusive.
27*6236dae4SAndroid Build Coastguard Worker
28*6236dae4SAndroid Build Coastguard WorkerThis option is superfluous since you can specify a socks5 proxy with --proxy
29*6236dae4SAndroid Build Coastguard Workerusing a socks5:// protocol prefix. (Added in 7.21.7)
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard Worker--preproxy can be used to specify a SOCKS proxy at the same time --proxy is
32*6236dae4SAndroid Build Coastguard Workerused with an HTTP/HTTPS proxy (added in 7.52.0). In such a case, curl first
33*6236dae4SAndroid Build Coastguard Workerconnects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
34*6236dae4SAndroid Build Coastguard WorkerHTTPS proxy.
35*6236dae4SAndroid Build Coastguard Worker
36*6236dae4SAndroid Build Coastguard WorkerThis option does not work with FTPS or LDAP.
37