Skip to content

Instantly share code, notes, and snippets.

@nicksherron
Created December 16, 2018 20:07
Show Gist options
  • Select an option

  • Save nicksherron/62bd6f7ad51f46f8a1a8700f6a95635e to your computer and use it in GitHub Desktop.

Select an option

Save nicksherron/62bd6f7ad51f46f8a1a8700f6a95635e to your computer and use it in GitHub Desktop.
#start_proxy=$(echo "http://103.251.36.41:80")
start_proxy=$1
curl -s "ipinfo.io/json" -x "$start_proxy" --write-out ">\n \"remote_ip\": \"%{remote_ip}:%{local_port}\",\n
\"speed_download\":\"%{speed_download}\",\n \"size_download\": \"%{size_download}\",\n \
\"http_code\": \"%{http_code}\",\n \"time_total\": \"%{time_total}\",\n
\"time_connect\": \"%{time_connect}\",\n \"time_appconnect\": \"%{time_appconnect}\",\n \"time_starttransfer\": \"%{time_starttransfer}\"" | \
sed -e "s|}>| \"start_proxy\": \"$start_proxy\",|g" | awk '{print $0} END {printf "}\n"}' | grep -v '"org":' | jq . -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment