快速dns,批量測試DNS訪問速度的腳本

 2023-11-19 阅读 27 评论 0

摘要:#!/bin/bash echo "curl --retry 10 --retry-delay 60 --retry-max-time 60 https://raw.hellogithub.com/hosts # -o github_hosts"curl --retry 10 --retry-delay 60 --retry-max-time 60 https://raw.hellogithub.com/hosts | while read LINE do # 去掉無關行if [
#!/bin/bash
echo "curl --retry 10 --retry-delay 60 --retry-max-time 60 https://raw.hellogithub.com/hosts # -o github_hosts"curl --retry 10 --retry-delay 60 --retry-max-time 60 https://raw.hellogithub.com/hosts  | while read LINE do # 去掉無關行if [[ $LINE == *"#"* ]]thenecho  "注釋行,跳過"else# 截取DNS中主機名及對應的ip	ip=`echo $LINE | awk '{print $1}'`dnshost=`echo $LINE | awk '{print $2}'`delaytime=`curl -o $dnshost -s -w %{time_namelookup} $dnshost`if [[ $delaytime < 0.3 ]]then echo "$dnshost  github.com # delaytime=$delaytime"else echo "#$dnshost  github.com # delaytime=$delaytime" fifidone

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://808629.com/184436.html

发表评论:

猜你喜欢

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 86后生记录生活 Inc. 保留所有权利。

底部版权信息