已归档项目!仓库和其他项目资源均为只读
README.md
https://www.ipaddress.com/site/ 解析github全部ip地址并转换为hosts格式
从如何使用?
git clone https://gitcode.net/pubx/github-hosts.git
在microsoft windows下:
- 安装python3环境
pip -r fetch_ip_for_host/requirements.txt
-
explorer ./github-hosts/
管理员权限运行 run-me.bat (自动安装py依赖fetch_ip_for_host/requirements.txt), 即 将github.com所有cdn的ip地址列表 放到c:\Windows\System32\drivers\etc\hosts中即可访问github.com
在linux下:
- 安装python3环境
pip -r fetch_ip_for_host/requirements.txt
- 运行
cd github-hosts ; sudo run-me.sh
(自动安装py依赖fetch_ip_for_host/requirements.txt),即 将github.com所有cdn的ip地址列表 放到/etc/hosts中即可访问github.com