王萌萌mjj
王萌萌 SVIP OP
· 328 views#0

To this day, Github still does not support IPv6, so pure IPv6 VPS cannot normally pull code from Github. At this point, we can solve the access issue by configuring an IPv6 proxy—this is one way to address the problem.

Original article: (https://danwin1210.de/github-ipv6-proxy.php)
Just add the proxy entries to the end of your /etc/hosts file and you're good to go.

code
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::6 ghcr.io 
2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com ruby​​gems.pkg.github.com 
2a01:4f8:c010:d56::8 uploads.github.com 
2606:50c0:8000::133 objects.githubusercontent.com www.objects.githubusercontent.com release-assets.githubusercontent.com gist.githubusercontent.com repository-images.githubusercontent.com camo.githubusercontent.com private-user-images.githubusercontent.com avatars0.githubusercontent.com avatars1.githubusercontent.com avatars2.githubusercontent.com avatars3.githubusercontent.com cloud.githubusercontent.com desktop.githubusercontent.com support.github.com 
2606:50c0:8000::154 support-assets.githubassets.com opengraph.githubassets.com github-registry-files.githubusercontent.com github-cloud.githubusercontent.com

You can also copy and paste the following code in one go:

code
cat >> /etc/hosts <<'EOF'
# --- GitHub Official CDN IPv6 ---
2606:50c0:8000::133   objects.githubusercontent.com
2606:50c0:8000::133   raw.githubusercontent.com
2606:50c0:8000::133   gist.githubusercontent.com
2606:50c0:8000::133   cloud.githubusercontent.com
2606:50c0:8000::154   github.githubassets.com

# --- Third-party IPv6 Proxy ---
2a01:4f8:c010:d56::2 github.com
2a01:4f8:c010:d56::3 api.github.com
2a01:4f8:c010:d56::4 codeload.github.com
EOF

lovesmenotB
lovesmenot Admin Merchant
免费、分线、权威 dns · anyns.io
#1

Well, it turns out that GitHub doesn't support IPv6 only. Saving this for reference.

SIGN还在折腾技术的老登!
Login