#!/bin/bash
#dynamic html
URL='http://chtos.net/web11.php'
if [ "$#" -eq 1 ];then
URL=$1
fi
echo "Fetching $URL"
echo -e "Location\ttotal\tcode\tnamelookup\tconnect\tptrans\tredir\tstrans\ts_download"
curl --header 'Accept-Encoding: gzip,deflate,sdch' --no-keepalive -s --write-out ' Direct:\t%{time_total}\t%{http_code}\t%{time_namelookup}\t\t%{time_connect}\t%{time_pretransfer}\t%{time_redirect}\t%{time_starttransfer}\t%{size_download}\n' $URL -o 1.txt
curl --header 'Accept-Encoding: gzip,deflate,sdch' --no-keepalive -s --write-out 'NH Proxy:\t%{time_total}\t%{http_code}\t%{time_namelookup}\t\t%{time_connect}\t%{time_pretransfer}\t%{time_redirect}\t%{time_starttransfer}\t%{size_download}\n' $URL -o 2.txt --proxy 10.10.10.1:80
curl --header 'Accept-Encoding: gzip,deflate,sdch' --no-keepalive -s --write-out 'TP Proxy:\t%{time_total}\t%{http_code}\t%{time_namelookup}\t\t%{time_connect}\t%{time_pretransfer}\t%{time_redirect}\t%{time_starttransfer}\t%{size_download}\n' $URL -o 3.txt --proxy 20.20.20.2:80