fetch-github-hosts(github慢的提速解决方案)

fetch-github-hosts(github慢的提速解决方案)简介

fetch-github-hosts是一个 github慢的提速解决方案,很多人都会遇到访问github慢的问题,该项目就是主要为解决研究及学习人员访问Github过慢或其他问题而提供的免费的Github hosts同步服务,适用于windows、macOS以及Linux,轻松获取github的hosts,以解决各种访问慢、卡、加载失败的问题,一键使用方便快捷!

fetch-github-hosts(github慢的提速解决方案)使用方法

fetch-github-hosts(github慢的提速解决方案)

用法1:手动添加hosts

访问 https://hosts.gitcdn.top/hosts.txt , 将其全部内容粘贴到你的hosts文件中,即可。

  • Linux / MacOS hosts路径:/etc/hosts
  • Windows hosts路径:C:\Windows\System32\drivers\etc\hosts

最后不要忘记刷新DNS让其生效:

  • Linux: /etc/init.d/network restart
  • Windows: ipconfig /flushdns
  • Macos: sudo killall -HUP mDNSResponder

用法2:Unix/Linux 一键使用

sed -i "/# fetch-github-hosts begin/Q" /etc/hosts && curl https://hosts.gitcdn.top/hosts.txt >> /etc/hosts

备注:可以设置crontab定时任务定时获取更新即可,解放双手!

用法3:Windows /MacOS 及其他桌面端

使用 SwitchHosts 桌面端应用,安装添加新规则:

Title: 任意
Type: Remote
Url: https://hosts.gitcdn.top/hosts.txt
Auto refresh: 1 hour

用法4:Chrome浏览器的用法

使用 FasterHosts 插件,若访问速度过慢可以直接使用 点击此处 来进行下载。

下载完成之后解压压缩包,Chrome地址栏输入chrome://extensions/回车进入,勾选开发者模式,选择加载已解压的扩展程序, 选择刚才的解压目录即可。

相关文章