Skip to content

Instantly share code, notes, and snippets.

@joshschmelzle
Last active February 10, 2017 14:14
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 joshschmelzle/eb7597bf16568de8cceede41e30dfde8 to your computer and use it in GitHub Desktop.
Save joshschmelzle/eb7597bf16568de8cceede41e30dfde8 to your computer and use it in GitHub Desktop.
Return IP information in JSON regarding your current external ip address

if you're not behind a proxy

curl ipinfo.io

if through proxy

e.g. using -x --- that's a lowercase x

curl -x http://internet.proxy.com:8080 ipinfo.io

e.g. using --proxy

curl --proxy http://internet.proxy.com:8080 ipinfo.io

from > curl --help

 -x, --proxy [PROTOCOL://]HOST[:PORT] Use proxy on given port
     --proxy-anyauth Pick "any" proxy authentication method (H)
     --proxy-basic   Use Basic authentication on the proxy (H)
     --proxy-digest  Use Digest authentication on the proxy (H)
     --proxy-negotiate Use Negotiate authentication on the proxy (H)
     --proxy-ntlm    Use NTLM authentication on the proxy (H)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment