• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2 SPDX-License-Identifier: curl
3 Long: proto
4 Arg: <protocols>
5 Help: Enable/disable PROTOCOLS
6 See-also: proto-redir proto-default
7 Added: 7.20.2
8 Category: connection curl
9 Example: --proto =http,https,sftp $URL
10 Multi: single
11 ---
12 Tells curl to limit what protocols it may use for transfers. Protocols are
13 evaluated 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 +
18 Permit this protocol in addition to protocols already permitted (this is
19 the default if no modifier is used).
20 .TP
21 .B -
22 Deny this protocol, removing it from the list of protocols already permitted.
23 .TP
24 .B =
25 Permit only this protocol (ignoring the list already permitted), though
26 subject to later modification by subsequent entries in the comma separated
27 list.
28 .RE
29 .IP
30 For example:
31 .RS
32 .TP 15
33 .B --proto -ftps
34 uses the default protocols, but disables ftps
35 .TP
36 .B  --proto -all,https,+http
37 only enables http and https
38 .TP
39 .B --proto =http,https
40 also only enables http and https
41 .RE
42 .IP
43 Unknown and disabled protocols produce a warning. This allows scripts to
44 safely rely on being able to disable potentially dangerous protocols, without
45 relying upon support for that protocol being built into curl to avoid an error.
46 
47 This option can be used multiple times, in which case the effect is the same
48 as concatenating the protocols into one instance of the option.
49