关闭

select server

标签: linux
54人阅读 评论(0) 收藏 举报
分类:

serverlist.txt

------------------------------------------------------START-----------------------------------------------------------------------------------------

Locale     VIP Only     Server Name     IP address     Supported Protocol     Status

locale     Yes     [VIP] JP - Tokyo 209     106.185.35.187     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP] JP - Tokyo 170     106.186.125.199     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP] JP - Tokyo 175     45.32.60.17     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP] JP - Tokyo 180     45.32.40.225     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP] JP - Tokyo 186     108.61.187.244     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP] JP - Tokyo 192     45.76.103.194     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP] JP - Tokyo 197     45.76.101.99     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP] JP - Tokyo 202     45.76.102.114     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP-WEB] USA - CA 5     104.237.155.90     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP-WEB] USA - CA 12     45.33.51.179     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP-WEB] USA - CA 17     66.175.220.188     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP-WEB] USA - CA 22     96.126.96.243     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running
locale     Yes     [VIP-WEB] USA - CA 32     192.155.80.42     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running

locale     Yes     [VIP-WEB] USA - CA 37     192.81.133.118     pptp/openvpn/l2tp/proxy/ipsec/ikev2     running

------------------------------------------------------END---------------------------------------------------------------------------------------


selectServer.sh

------------------------------------------------------START-----------------------------------------------------------------------------------------

if [ ! -f './serverlist.txt'  ]; then
    echo './serverlist.txt does not exits! Exiting...';
    exit;
fi

iparr=$(sed '1d' serverlist.txt | cut -f 4)

for ip in $iparr; do
    result=$(ping -c 1 -W 1 $ip)
    if [ $? -ne 0 ]; then       # ping failed, next loop
    continue
    fi
    echo -n -e "$ip\t";
    echo $result | sed 's/^.*time=//g; s/ ms.*$//g'
done
------------------------------------------------------END---------------------------------------------------------------------------------------


mzh@lenovo:~/Public$ ./selectServer.sh
106.185.35.187    161
106.186.125.199    142
45.32.60.17    187
45.32.40.225    148
108.61.187.244    199
45.76.101.99    215
45.76.102.114    206
104.237.155.90    502
45.33.51.179    242
66.175.220.188    272
96.126.96.243    280
192.155.80.42    269
192.81.133.118    281



0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:799次
    • 积分:39
    • 等级:
    • 排名:千里之外
    • 原创:3篇
    • 转载:2篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档