Use CONNECT tunneling for non-HTTP protocols when needed.
Section: Proxy Auth and Tunnels
Tunnel through an HTTP proxy
bash
bash
curl --proxytunnel -x http://proxy.example.com:8080 ftp://example.com/file.txtExplanation
CONNECT tunnels are not limited to HTTPS workflows.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Proxy Auth and Tunnels
Proxy with basic auth
Authenticate to a proxy with username and password.
Trust a custom CA for proxy TLS
Use a custom CA certificate file for the HTTPS proxy.
Client cert for proxy authentication
Send a client certificate when the proxy requires mTLS.
Skip TLS verification for HTTPS proxy
Disable certificate verification for the HTTPS proxy connection.