Github无法访问
Github520(推荐)
https://github.com/521xueweihan/GitHub520
提供的hosts配置
https://raw.hellogithub.com/hosts
这个直接提供了Github的IP映射,会自动更新,强烈建议使用。
获取域名的IP
我们可以使用IPAddress.com来查找可用IP。
dnschecker:
输入我们的的域名
1 | raw.githubusercontent.com |
或者直接访问以下地址
https://dnschecker.org/continent/asia/#A/raw.githubusercontent.com
选择一个离我们最近的
找到hosts
文件
1 | C:\Windows\System32\drivers\etc |
添加如下映射
1 | 185.199.110.133 raw.githubusercontent.com |
查询域名映射IP
dnschecker:
tcptest:
查询IP归属地
刷新DNS
大部分情况下是直接生效,如未生效可尝试下面的办法,刷新 DNS:
Windows:在 CMD 窗口输入:
1 | ipconfig /flushdns |
Linux 命令:
1 | sudo rcnscd restart |
Mac 命令:
1 | sudo killall -HUP mDNSResponder |
Hosts文件位置
hosts 文件在每个系统的位置不一,详情如下:
- Windows 系统:
C:\Windows\System32\drivers\etc\hosts
- Linux 系统:
/etc/hosts
- Mac(苹果电脑)系统:
/etc/hosts
- Android(安卓)系统:
/system/etc/hosts
- iPhone(iOS)系统:
/etc/hosts
暗黑4战网登录
更新于2024年10月18日
战网的DNS已经被污染了,所以我们无法登录。
网上的做法大都是开加速器,但是这不但收费,而且不一定稳定。
但是有加速器还是可以用加速器,好处在于降低延迟。
修改DNS法
DNS1
2168.126.63.1
168.126.63.2
查询域名通过某个DNS映射的IP
1 | nslookup prod.actual.battle.net 168.126.63.1 |
我们可以看到结果是
服务器: kns.kornet.net
Address: 168.126.63.1非权威应答:
名称: kr.actual.battle.net
Address: 59.153.40.104
Aliases: prod.actual.battle.net
获取出来的是韩国的IP,这个IP延迟也是不错的。
会比我们测试出来最优的59.153.40.90
慢3ms
左右,还是不错的。
1 | nslookup prod.actual.battle.net 168.126.63.1 |
自定义Hosts法
我们之所以不能访问是因为prod.actual.battle.net
映射的IP还是网易的,但是网易的服务器已经停了,换成其它地方的IP就行了。
可以使用这个网站
https://www.tcptest.cn/ping?url=prod.actual.battle.net
https://dnschecker.org/continent/asia/#A/prod.actual.battle.net
打开这个目录
1 | C:\Windows\System32\drivers\etc |
打开hosts
文件
添加如下几行
1 | 59.153.40.104 prod.actual.battle.net |
亚服(48ms-50ms)
1 | 59.153.40.104 prod.actual.battle.net |
美服(168ms-200ms)
1 | 137.221.104.184 prod.actual.battle.net |
不建议用欧服,这里测试的裸连不了。
可以试试不同的地址看看哪个延迟更低更流畅。
可以用PING进行测试
1 | ping 59.153.40.104 |
刷新缓存
1 | ipconfig /flushdns |
验证是否生效
1 | ping prod.actual.battle.net |
或者
1 | nslookup prod.actual.battle.net |
另外要注意
如果使用XGP游玩的,关联战网后,不要用XBOX客户端打开,不打开Xbox直接使用战网打开运行,否则各种问题。
批量ping
1 | for %i in (137.221.105.168 59.153.40.104 137.221.104.184) do ping %i |
卡大门
游戏会出现一直在大门界面进不去游戏。
这个不知道是亚服的服务器问题还是人多的问题,虽然亚服的延迟底,但是会出现这个问题。
如果出现了,可以使用美服的IP,会有一定的改善。
1 | 137.221.104.184 prod.actual.battle.net |