blob: a3be835bf3a96fedb25ecaa1bae902edce3210b0 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
2SPDX-License-Identifier: curl
3Long: proxy
4Short: x
5Arg: [protocol://]host[:port]
6Help: Use this proxy
7Category: proxy
8Example: --proxy http://proxy.example $URL
9Added: 4.0
10See-also: socks5 proxy-basic
11Multi: single
12---
13Use the specified proxy.
14
15The proxy string can be specified with a protocol:// prefix. No protocol
16specified or http:// will be treated as HTTP proxy. Use socks4://, socks4a://,
17socks5:// or socks5h:// to request a specific SOCKS version to be used.
18(Added in 7.21.7)
19
20Unix domain sockets are supported for socks proxy. Set localhost for the host
21part. e.g. socks5h://localhost/path/to/socket.sock
22
23HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for
24OpenSSL, GnuTLS and NSS.
25
26Unrecognized and unsupported proxy protocols cause an error since 7.52.0.
27Prior versions may ignore the protocol and use http:// instead.
28
29If the port number is not specified in the proxy string, it is assumed to be
301080.
31
32This option overrides existing environment variables that set the proxy to
33use. If there's an environment variable setting a proxy, you can set proxy to
34"" to override it.
35
36All operations that are performed over an HTTP proxy will transparently be
37converted to HTTP. It means that certain protocol specific operations might
38not be available. This is not the case if you can tunnel through the proxy, as
39one with the --proxytunnel option.
40
41User and password that might be provided in the proxy string are URL decoded
42by curl. This allows you to pass in special characters such as @ by using %40
43or pass in a colon with %3a.
44
45The proxy host can be specified the same way as the proxy environment
46variables, including the protocol prefix (http://) and the embedded user +
47password.