Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
Last active October 3, 2019 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxfight3r/687b18fe60879de174c1d75080e3610b to your computer and use it in GitHub Desktop.
Save tuxfight3r/687b18fe60879de174c1d75080e3610b to your computer and use it in GitHub Desktop.
curl tricks

curl connect to https domain using ip

curl https://tower.aws.world.local --resolve tower.ew1.aws.world.local:443:10.100.100.40 --cacert adcacrt.crt -v

curl use proxy

# http proxy
curl -v -x 10.100.25.20:8080 https://google.com -L

# socks proxy
curl --socks5-hostname localhost:8001 http://www.google.com/

curl download a file

# Save as yourfile.tar.gz
curl -O http://yourdomain.com/yourfile.tar.gz

# Save as newfile.tar.gz
curl -o newfile.tar.gz http://yourdomain.com/yourfile.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment