手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2024年05月16日的文章

基于IPv6访问GitHub

有一说一,这真是一个大难题,如果用 dig -AAA github.com +short,是可以得到 ipv6的,但如果你 dig -AAAA api.github.com +short,返回的就是空。

在这种情况下就啥也拿不到了,查了不少资料。发现确实没有,但还是有好心人做了一个项目,即反代 github的资源,并提供了 ipv6的地址,就在:/etc/hosts 里加入下面的内容
 
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
 
参考:https://danwin1210.de/github-ipv6-proxy.php。好歹是能用了,不是吗?