Last active
August 30, 2024 02:29
-
-
Save restyler/69ceb2284be4ed54c340b3123fb71df4 to your computer and use it in GitHub Desktop.
CURL one-line proxy checker (shows connection speed, ip, and geo of proxy)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download, do chmod +x and copy to /usr/bin/local via ln -s /downloaded-dir/pcheck.sh /usr/local/bin/pcheck | |
# then launch as: pcheck http://user:pw@proxy-addr:port (to view ip and geo via lumtest.com website) | |
# or pcheck http://user:pw@proxy-addr:port https://www.google.com/ (to download specific website) | |
curl -w @- -sS -H "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" --proxy "$1" ${2:-"https://lumtest.com/myip.json"} <<'EOF' | |
\n | |
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pcheck is a simple bash script which saves you a lot of typing if you work with proxies. it helps to quickly check if particular proxy is alive and working fine, and shows proxy geo, as well. Examples:
Check if proxy is alive and view its geo:
pcheck http://user:pw@proxy-addr:port
Download file/arbitrary website page for a better speed testing:
pcheck http://user:pw@proxy-addr:port https://example.com/download.zip
more info: https://pixeljets.com/blog/simple-proxy-checker-in-curl-bash/