curl
Proxies
Route requests through HTTP or SOCKS proxies.
By EZ4Code Team
proxysockstunnel
Code
# HTTP proxy
curl -x http://proxy.local:8080 https://example.com
# SOCKS5 proxy
curl --socks5 127.0.0.1:1080 https://example.com
# Proxy with authentication
curl -x http://user:[email protected]:8080 https://example.com
# Bypass the proxy for a specific host
curl --noproxy "internal.local" https://internal.local
# Send through a proxy and follow redirects
curl -L -x http://proxy.local:8080 https://example.comExplanation
The -x flag routes traffic through an HTTP proxy, while --socks5 uses a SOCKS proxy at the given host and port. Proxy credentials can be embedded in the URL with user:pass@ syntax. Use --noproxy to bypass the proxy for internal hosts so they connect directly.