解决国内访问 GitHub 慢的问题,自动生成 hosts
文件,支持每 2 小时自动更新。
保存地址 防止失联
https://namegenliang.github.io/fast-github-access/hosts/github-hosts.txt
直接也可手动执行脚本生成最新 hosts
克隆仓库并运行:
git clone https://github.com/namegenliang/fast-github-access.git
cd fast-github-access
python scripts/update_hosts.py
生成的文件:hosts/github-hosts.txt
将 github-hosts.txt
内容追加到系统 hosts 文件:
C:\Windows\System32\drivers\etc\hosts
/etc/hosts
仓库已配置 GitHub Actions,每 2 小时自动更新解析 IP 并推送。
MIT License