IPv6访问GitHub

IPv6访问GitHub

GitHub仍不支持IPv6,但是可以使用指定host到代理服务器实现

cat >> /etc/hosts << EOF
# https://danwin1210.de/github-ipv6-proxy.php
2a01:4f8:c010:d56::2 github.com
2a01:4f8:c010:d56::3 api.github.com
2a01:4f8:c010:d56::4 codeload.github.com
2a01:4f8:c010:d56::5 objects.githubusercontent.com
2a01:4f8:c010:d56::6 ghcr.io
2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com
EOF

第二种是论坛看到,分享下为验证

不过除了这个办法外,我们还能采用DNS64-NAT64的dns来解决

使用之前请备份/etc/resolv.conf
命令cp /etc/resolv.conf /etc/resolv.conf.bak

NAT64服务的用法,修改/etc/resolv.conf,设置DNS为下方的dns,也可以直接用下面的一键命令,用完删除你添加的dns即可

DNS-NAT64 1

Public NAT64 service

这个是德国的服务器,用法:

2a00:1098:2b::1
2a01:4f8:c2c:123f::1
2a01:4f9:c010:3f02::1

一键命令

echo -e "nameserver 2a01:4f8:c2c:123f::1\nnameserver 2a00:1098:2c::1\nnameserver 2a01:4f9:c010:3f02::1" > /etc/resolv.conf

DNS-NAT64 2

Public Service: DNS64 Name Servers

这个是芬兰的服务器,用法:

2001:67c:2b0::4
2001:67c:2b0::6

一键命令

echo -e "nameserver 2001:67c:2b0::4\nnameserver 2001:67c:2b0::6" > /etc/resolv.conf
 
© 版权声明
THE END
喜欢就支持一下吧
点赞6 分享