xref: /curl/docs/cmdline-opts/proto.md (revision e7219c2b)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: proto
5Arg: <protocols>
6Help: Enable/disable PROTOCOLS
7Added: 7.20.2
8Category: connection curl
9Multi: single
10See-also:
11  - proto-redir
12  - proto-default
13Example:
14  - --proto =http,https,sftp $URL
15---
16
17# `--proto`
18
19Limit what protocols to allow for transfers. Protocols are evaluated left to
20right, are comma separated, and are each a protocol name or 'all', optionally
21prefixed by zero or more modifiers. Available modifiers are:
22
23## +
24Permit this protocol in addition to protocols already permitted (this is
25the default if no modifier is used).
26
27## -
28Deny this protocol, removing it from the list of protocols already permitted.
29
30## =
31Permit only this protocol (ignoring the list already permitted), though
32subject to later modification by subsequent entries in the comma separated
33list.
34
35##
36
37For example: --proto -ftps uses the default protocols, but disables ftps
38
39--proto -all,https,+http only enables http and https
40
41--proto =http,https also only enables http and https
42
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.
49