blob: a24c0dbdcad3cb7b2d53213f3322f2ada3e3881b [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: proto
4Arg: <protocols>
5Help: Enable/disable PROTOCOLS
6See-also: proto-redir proto-default
7Added: 7.20.2
8Category: connection curl
9Example: --proto =http,https,sftp $URL
10Multi: single
11---
12Tells curl to limit what protocols it may use for transfers. Protocols are
13evaluated left to right, are comma separated, and are each a protocol name or
14'all', optionally prefixed by zero or more modifiers. Available modifiers are:
15.RS
16.TP 3
17.B +
18Permit this protocol in addition to protocols already permitted (this is
19the default if no modifier is used).
20.TP
21.B -
22Deny this protocol, removing it from the list of protocols already permitted.
23.TP
24.B =
25Permit only this protocol (ignoring the list already permitted), though
26subject to later modification by subsequent entries in the comma separated
27list.
28.RE
29.IP
30For example:
31.RS
32.TP 15
33.B --proto -ftps
34uses the default protocols, but disables ftps
35.TP
36.B --proto -all,https,+http
37only enables http and https
38.TP
39.B --proto =http,https
40also only enables http and https
41.RE
42.IP
43Unknown and disabled protocols produce a warning. This allows scripts to
44safely rely on being able to disable potentially dangerous protocols, without
45relying upon support for that protocol being built into curl to avoid an error.
46
47This option can be used multiple times, in which case the effect is the same
48as concatenating the protocols into one instance of the option.