使用SwitchHosts加速访问Github

Github网站时常会出现无法访问的问题,我们可使用SwitchHosts来自动修改hosts的方式来达到顺利访问的目的(经测试,也有失败概率)

1、下载安装后,首先需改一下hosts的权限

新增、修改无权限的话,编辑 C:\Windows\System32\drivers\etc\hosts 属性修改当前电脑登录用户控制权限

2、添加远程规则如下

Hosts类型:远程
Hosts标题:github-hosts(自定义即可)
自动刷新:1小时
URL:下面四个任意一个即可

https://raw.hellogithub.com/hosts
https://gitlab.com/ineo6/hosts/-/raw/master/hosts
https://cdn.jsdelivr.net/gh/521xueweihan/GitHub520@main/hosts

基本上都可以自动更新,偶尔也存在失败的情况,可以换个地址试试。

3、手动更新hosts文件,然后刷新DNS缓存:
ipconfig /flushdns

SwitchHosts 下载地址:
https://github.com/oldj/SwitchHosts/releases/download/v4.2.0-beta/SwitchHosts_windows_installer_x64_4.2.0.6105.exe
https://mirror.ghproxy.com/https://github.com/oldj/SwitchHosts/releases/download/v4.2.0-beta/SwitchHosts_windows_installer_x64_4.2.0.6105.exe
https://gh-proxy.com/https://github.com/oldj/SwitchHosts/releases/download/v4.2.0-beta/SwitchHosts_windows_installer_x64_4.2.0.6105.exe

SwitchHosts 官网:
https://github.com/oldj/SwitchHosts/releases
https://oldj.github.io/SwitchHosts/

Related Posts