proto.d 1.4 KB

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