你不让我国外DNS使用,那我就指定国内的公共DNS嘛。。。这不简单 下面是我脚本的一个思路。。。大神可以优化下加到剑皇补丁包里面去。。。
-
- DOMAI=all-live.secure2storeapple.btrongqi.com
- #dnsserver=(123.123.123.123 321.321.321.321 111.111.111.111)
- dnsserver=(114.114.114.114 114.114.115.115 119.29.29.29 1.2.4.8 117.50.11.11 101.226.4.6 123.125.81.6 1.1.1.1 8.8.8.8 185.222.222.222 208.67.222.222 199.91.73.222 9.9.9.9 182.254.116.116 210.2.4.8 52.80.66.66 218.30.118.6 140.207.198.6 1.0.0.1 8.8.4.4 185.184.222.222 208.67.220.220 178.79.131.110)
- IPINFO=`nslookup -qt=A $DOMAI $dns|grep ‘Address’|grep -v ‘#’|awk ‘NR==1,NR==2{print $2}’`
- echo $IPINFO > /tmp/dnsip
-
- for dns in ${dnsserver[*]} ;
- do
- echo $IPINFO
- echo $IPINFO >> /tmp/dnsip
- done
- for lastip in `cat /tmp/dnsip |uniq`;
- do
- echo ${last}
-
- done
复制代码
然后再指定IP绑定hosts就行了。。。 wget -S http://112.47.20.48/nt222.apk –header="Host:app.secure2storeapple.vxmpw.com" curl -# -O http://112.47.20.48/nt222.apk -H "Host:app.secure2storeapple.vxmpw.com" |