docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
---
|
2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
2016-11-28 08:01:13 +08:00
|
|
|
Long: proxy
|
|
|
|
Short: x
|
|
|
|
Arg: [protocol://]host[:port]
|
|
|
|
Help: Use this proxy
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: proxy
|
2021-09-28 17:50:07 +08:00
|
|
|
Added: 4.0
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: single
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
See-also:
|
|
|
|
- socks5
|
|
|
|
- proxy-basic
|
|
|
|
Example:
|
|
|
|
- --proxy http://proxy.example $URL
|
2016-11-28 08:01:13 +08:00
|
|
|
---
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
|
|
|
|
# `--proxy`
|
|
|
|
|
2016-11-28 08:01:13 +08:00
|
|
|
Use the specified proxy.
|
|
|
|
|
2017-02-06 16:13:42 +08:00
|
|
|
The proxy string can be specified with a protocol:// prefix. No protocol
|
2023-09-08 20:32:29 +08:00
|
|
|
specified or http:// it is treated as an HTTP proxy. Use socks4://,
|
|
|
|
socks4a://, socks5:// or socks5h:// to request a specific SOCKS version to be
|
|
|
|
used. (Added in 7.21.7)
|
2017-02-06 16:13:42 +08:00
|
|
|
|
2022-05-19 21:33:22 +08:00
|
|
|
Unix domain sockets are supported for socks proxy. Set localhost for the host
|
|
|
|
part. e.g. socks5h://localhost/path/to/socket.sock
|
|
|
|
|
2023-09-08 20:03:59 +08:00
|
|
|
HTTPS proxy support works set with the https:// protocol prefix for OpenSSL
|
|
|
|
and GnuTLS (added in 7.52.0). It also works for BearSSL, mbedTLS, rustls,
|
|
|
|
Schannel, Secure Transport and wolfSSL (added in 7.87.0).
|
2017-02-06 16:13:42 +08:00
|
|
|
|
2023-09-08 20:03:59 +08:00
|
|
|
Unrecognized and unsupported proxy protocols cause an error (added in 7.52.0).
|
|
|
|
Ancient curl versions ignored unknown schemes and used http:// instead.
|
2016-11-28 08:01:13 +08:00
|
|
|
|
|
|
|
If the port number is not specified in the proxy string, it is assumed to be
|
|
|
|
1080.
|
|
|
|
|
|
|
|
This option overrides existing environment variables that set the proxy to
|
2023-08-22 23:40:39 +08:00
|
|
|
use. If there is an environment variable setting a proxy, you can set proxy to
|
2022-08-23 19:42:49 +08:00
|
|
|
"" to override it.
|
2016-11-28 08:01:13 +08:00
|
|
|
|
2023-09-08 20:32:29 +08:00
|
|
|
All operations that are performed over an HTTP proxy are transparently
|
2016-11-28 08:01:13 +08:00
|
|
|
converted to HTTP. It means that certain protocol specific operations might
|
|
|
|
not be available. This is not the case if you can tunnel through the proxy, as
|
|
|
|
one with the --proxytunnel option.
|
|
|
|
|
|
|
|
User and password that might be provided in the proxy string are URL decoded
|
|
|
|
by curl. This allows you to pass in special characters such as @ by using %40
|
|
|
|
or pass in a colon with %3a.
|
|
|
|
|
2021-11-26 15:46:59 +08:00
|
|
|
The proxy host can be specified the same way as the proxy environment
|
2016-11-28 08:01:13 +08:00
|
|
|
variables, including the protocol prefix (http://) and the embedded user +
|
|
|
|
password.
|
2022-12-06 20:00:35 +08:00
|
|
|
|
|
|
|
When a proxy is used, the active FTP mode as set with --ftp-port, cannot be
|
|
|
|
used.
|