xref: /aosp_15_r20/external/curl/docs/cmdline-opts/proto.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: proto
5*6236dae4SAndroid Build Coastguard WorkerArg: <protocols>
6*6236dae4SAndroid Build Coastguard WorkerHelp: Enable/disable PROTOCOLS
7*6236dae4SAndroid Build Coastguard WorkerAdded: 7.20.2
8*6236dae4SAndroid Build Coastguard WorkerCategory: connection curl
9*6236dae4SAndroid Build Coastguard WorkerMulti: single
10*6236dae4SAndroid Build Coastguard WorkerSee-also:
11*6236dae4SAndroid Build Coastguard Worker  - proto-redir
12*6236dae4SAndroid Build Coastguard Worker  - proto-default
13*6236dae4SAndroid Build Coastguard WorkerExample:
14*6236dae4SAndroid Build Coastguard Worker  - --proto =http,https,sftp $URL
15*6236dae4SAndroid Build Coastguard Worker---
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard Worker# `--proto`
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard WorkerLimit what protocols to allow for transfers. Protocols are evaluated left to
20*6236dae4SAndroid Build Coastguard Workerright, are comma separated, and are each a protocol name or 'all', optionally
21*6236dae4SAndroid Build Coastguard Workerprefixed by zero or more modifiers. Available modifiers are:
22*6236dae4SAndroid Build Coastguard Worker
23*6236dae4SAndroid Build Coastguard Worker## +
24*6236dae4SAndroid Build Coastguard WorkerPermit this protocol in addition to protocols already permitted (this is
25*6236dae4SAndroid Build Coastguard Workerthe default if no modifier is used).
26*6236dae4SAndroid Build Coastguard Worker
27*6236dae4SAndroid Build Coastguard Worker## -
28*6236dae4SAndroid Build Coastguard WorkerDeny this protocol, removing it from the list of protocols already permitted.
29*6236dae4SAndroid Build Coastguard Worker
30*6236dae4SAndroid Build Coastguard Worker## =
31*6236dae4SAndroid Build Coastguard WorkerPermit only this protocol (ignoring the list already permitted), though
32*6236dae4SAndroid Build Coastguard Workersubject to later modification by subsequent entries in the comma separated
33*6236dae4SAndroid Build Coastguard Workerlist.
34*6236dae4SAndroid Build Coastguard Worker
35*6236dae4SAndroid Build Coastguard Worker##
36*6236dae4SAndroid Build Coastguard Worker
37*6236dae4SAndroid Build Coastguard WorkerFor example: --proto -ftps uses the default protocols, but disables ftps
38*6236dae4SAndroid Build Coastguard Worker
39*6236dae4SAndroid Build Coastguard Worker--proto -all,https,+http only enables http and https
40*6236dae4SAndroid Build Coastguard Worker
41*6236dae4SAndroid Build Coastguard Worker--proto =http,https also only enables http and https
42*6236dae4SAndroid Build Coastguard Worker
43*6236dae4SAndroid Build Coastguard WorkerUnknown and disabled protocols produce a warning. This allows scripts to
44*6236dae4SAndroid Build Coastguard Workersafely rely on being able to disable potentially dangerous protocols, without
45*6236dae4SAndroid Build Coastguard Workerrelying upon support for that protocol being built into curl to avoid an error.
46*6236dae4SAndroid Build Coastguard Worker
47*6236dae4SAndroid Build Coastguard WorkerThis option can be used multiple times, in which case the effect is the same
48*6236dae4SAndroid Build Coastguard Workeras concatenating the protocols into one instance of the option.
49