第一步
添加github 地址条目到hosts文件里面
修改/etc/hosts文件
140.82.113.4 github.com 140.82.113.4 gist.github.com 199.232.69.194 github.global.ssl.fastly.net 185.199.111.153 assets-cdn.github.com 199.232.68.133 raw.githubusercontent.com 199.232.68.133 cloud.githubusercontent.com 199.232.68.133 camo.githubusercontent.com 199.232.68.133 avatars0.githubusercontent.com 199.232.68.133 avatars1.githubusercontent.com 199.232.68.133 avatars2.githubusercontent.com 199.232.68.133 avatars3.githubusercontent.com 199.232.68.133 avatars4.githubusercontent.com 199.232.68.133 avatars5.githubusercontent.com 199.232.68.133 avatars6.githubusercontent.com 199.232.68.133 avatars7.githubusercontent.com 199.232.68.133 avatars8.githubusercontent.com
第二步
#!/bin/sh for ii in $(awk '/github/{print $2}' /etc/hosts) do getip="$(wget -qO- --post-data="host=$ii" https://www.ipaddress.com/ip-lookup -Uuosbox|grep -Eo '<a href="https://www.ipaddress.com/ipv4/\<[0-9]*(\.[0-9]*){3}\>'|awk -F'/' '{print $5;exit}')" [ "$getip" ]&&sed -i '/ '$ii'/s$\(.*\) \(.*\)$'$getip' \2$g' /etc/hosts done
评论
访客
回复很好
不浪人
回复@访客
阿里云还是不行!!速度贼慢