GitHub加速软件,支持 Windows、Mac和 Linux 端

fetch-github-hosts 它是一款同步 github hosts 的工具,可以解决国内无法访问 GitHub 的问题。功能非常强大,跨平台,支持 Windows、Mac和 Linux 端,UI 非常漂亮!

简介
fetch-github-hosts 它是一款同步 github hosts 的工具,可以解决国内无法访问 GitHub 的问题。功能非常强大,跨平台,支持 Windows、Mac和 Linux 端,UI 非常漂亮!

GitHub加速软件,支持 Windows、Mac和 Linux 端

此项目是通过部署此项目本身的服务器来获取 github.com 的 hosts,而不是通过第三方ip地址接口来进行获取,例如 ipaddress.com 等。

时隔一年大更新 v2.6 发布,将 fetch-github-hosts 的依赖及 UI 界面进行了大更新,增加了一些非常实用的功能。

开源地址:https://github.com/Licoy/fetch-github-hosts

安装与使用
安装与使用都非常的简单、易用。
下载地址:https://github.com/Licoy/fetch-github-hosts/releases

Windows 端
下载相应的安装包

GitHub加速软件,支持 Windows、Mac和 Linux 端

双击运行之后的界面如下:

GitHub加速软件,支持 Windows、Mac和 Linux 端

点击启动之后显示如下:

GitHub加速软件,支持 Windows、Mac和 Linux 端

这时你再访问Github就不会出现之前的超时现象了。

GitHub加速软件,支持 Windows、Mac和 Linux 端

选择客户端的主机源:

GitHub加速软件,支持 Windows、Mac和 Linux 端

你也可以自定义主机源:

GitHub加速软件,支持 Windows、Mac和 Linux 端

服务端模式:

GitHub加速软件,支持 Windows、Mac和 Linux 端

GitHub加速软件,支持 Windows、Mac和 Linux 端

命令行终端
Releaseshttps://github.com/Licoy/fetch-github-hosts/releases)或 FastGithttps://hub.fastgit.xyz/Licoy/fetch-github-hosts/releases)镜像 中下载您的系统版本(目前支持Windows/Linux/MacOS )

GitHub加速软件,支持 Windows、Mac和 Linux 端

具体的使用可以参考:https://github.com/Licoy/fetch-github-hosts/blob/main/README.md 官方文档介绍,这里就不再赘述了,非常简单。

手动添加 Hosts 文件
需要我们手动访问 https://hosts.gitcdn.top/hosts.txt,然后将下面的全部内容粘贴到你的 hosts 文件中即可。

# fetch-github-hosts 开始
140.82.113.26               alive.github.com
140.82.113.26               live.github.com
185.199.108.154             github.githubassets.com
140.82.114.21               central.github.com
185.199.110.133             desktop.githubusercontent.com
2606:50c0:8001::153 资产-cdn.github.com
185.199.110.133             camo.githubusercontent.com
185.199.109.133             github.map.fastly.net
146.75.105.194              github.global.ssl.fastly.net
140.82.113.3                gist.github.com
185.199.111.153             github.io
140.82.113.3                github.com
192.0.66.2                  github.blog
140.82.112.5                api.github.com
2606:50c0:8002::154 raw.githubusercontent.com
2606:50c0:8002::154 user-images.githubusercontent.com
185.199.109.133             favicons.githubusercontent.com
185.199.109.133             avatars5.githubusercontent.com
185.199.108.133             avatars4.githubusercontent.com
185.199.109.133             avatars3.githubusercontent.com
185.199.108.133             avatars2.githubusercontent.com
185.199.111.133             avatars1.githubusercontent.com
185.199.109.133             avatars0.githubusercontent.com
2606:50c0:8001::154 avatars.githubusercontent.com
140.82.114.9                codeload.github.com
54.231.163.161              github-cloud.s3.amazonaws.com
52.216.54.233               github-com.s3.amazonaws.com
54.231.133.153              github-production-release-asset-2e65be.s3.amazonaws.com
52.216.104.235              github-production-user-asset-6210df.s3.amazonaws.com
3.5.16.126                  github-production-repository-file-5c1aeb.s3.amazonaws.com
185.199.109.153             githubstatus.com
140.82.114.18               github.community
52.224.38.193               github.dev
140.82.114.22               collector.github.com
2620:1ec:21::16 pipelines.actions.githubusercontent.com
2606:50c0:8001::154 media.githubusercontent.com
185.199.111.133             cloud.githubusercontent.com
185.199.111.133             objects.githubusercontent.com
# 最后获取时间: 2023-08-20 11:42:51
# 更新网址:https://hosts.gitcdn.top/hosts.txt
# fetch-github-hosts 结束

Linux / MacOS 系统 hosts 文件目录:/etc/hosts
Windows hosts文件目录:C:\Windows\System32\drivers\etc\hosts
注:上面的文件内容是动态更新的(last fetch time: 2023-08-20 11:42:51),你可以使用定时任务去更新即可。

添加完文件之后,我们需要进行手动刷新动作,才能是使之生效,具体操作如下:

# Linux
 /etc/init.d/network restart
# 窗口
ipconfig /flushdns
# 苹果系统
sudo Killall -HUP mDNSResponder

Unix/Linux 系统,我们还可以使用下面的命令完成自动添加、自动刷新,一键启动与使用。

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

 

Intoep小程序

微信扫一扫,打开小程序浏览更便捷

原创文章,作者:howkunet,如若转载,请注明出处:https://www.intoep.com/othen/62712.html

发表回复

登录后才能评论