1. turl
用于测试访问时间
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # turl www.myluoluo.com turl(){ curl -w " HTTP: %{http_code} DNS: %{time_namelookup}s redirect: %{time_redirect}s time_connect: %{time_connect}s time_appconnect: %{time_appconnect}s time_pretransfer: %{time_pretransfer}s time_starttransfer: %{time_starttransfer}s size_download: %{size_download}bytes speed_download: %{speed_download}B /s ---------- time_total: %{time_total}s " -o /dev/null $* } |
2. curlhost
用户指定 ip 访问域名(代替 curl -H “Host: domain.com” 1.1.1.1),仅限 HTTP 80 请求
1 2 3 4 5 | # curlhost www.myluoluo.com 1.1.1.1 curlhost(){ curl --resolve $1:80:$2 http: // $1 -vv } |
3. curlhostssl
用户指定 ip 访问域名,仅限 HTTPS 443 请求
1 2 3 4 5 | # curlhostssl www.myluoluo.com 1.1.1.1 curlhostssl(){ curl --resolve $1:443:$2 https: // $1 -vv } |