xref: /aosp_15_r20/external/curl/docs/cmdline-opts/socks4.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: socks4
5*6236dae4SAndroid Build Coastguard WorkerArg: <host[:port]>
6*6236dae4SAndroid Build Coastguard WorkerHelp: SOCKS4 proxy on given host + port
7*6236dae4SAndroid Build Coastguard WorkerAdded: 7.15.2
8*6236dae4SAndroid Build Coastguard WorkerCategory: proxy
9*6236dae4SAndroid Build Coastguard WorkerMulti: single
10*6236dae4SAndroid Build Coastguard WorkerSee-also:
11*6236dae4SAndroid Build Coastguard Worker  - socks4a
12*6236dae4SAndroid Build Coastguard Worker  - socks5
13*6236dae4SAndroid Build Coastguard Worker  - socks5-hostname
14*6236dae4SAndroid Build Coastguard WorkerExample:
15*6236dae4SAndroid Build Coastguard Worker  - --socks4 hostname:4096 $URL
16*6236dae4SAndroid Build Coastguard Worker---
17*6236dae4SAndroid Build Coastguard Worker
18*6236dae4SAndroid Build Coastguard Worker# `--socks4`
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard WorkerUse the specified SOCKS4 proxy. If the port number is not specified, it is
21*6236dae4SAndroid Build Coastguard Workerassumed at port 1080. Using this socket type make curl resolve the hostname
22*6236dae4SAndroid Build Coastguard Workerand passing the address on to the proxy.
23*6236dae4SAndroid Build Coastguard Worker
24*6236dae4SAndroid Build Coastguard WorkerTo specify proxy on a Unix domain socket, use localhost for host, e.g.
25*6236dae4SAndroid Build Coastguard Worker`socks4://localhost/path/to/socket.sock`
26*6236dae4SAndroid Build Coastguard Worker
27*6236dae4SAndroid Build Coastguard WorkerThis option overrides any previous use of --proxy, as they are mutually
28*6236dae4SAndroid Build Coastguard Workerexclusive.
29*6236dae4SAndroid Build Coastguard Worker
30*6236dae4SAndroid Build Coastguard WorkerThis option is superfluous since you can specify a socks4 proxy with --proxy
31*6236dae4SAndroid Build Coastguard Workerusing a socks4:// protocol prefix. (Added in 7.21.7)
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard Worker--preproxy can be used to specify a SOCKS proxy at the same time proxy is used
34*6236dae4SAndroid Build Coastguard Workerwith an HTTP/HTTPS proxy (added in 7.52.0). In such a case, curl first
35*6236dae4SAndroid Build Coastguard Workerconnects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
36*6236dae4SAndroid Build Coastguard WorkerHTTPS proxy.
37