Github的多种加速方式镜像站hosts指向

众所周知Github在部分地区经常处于无法访问的状态,在程序员日常开发中,最头疼的莫过于GitHub加载龟速、克隆代码卡到怀疑人生!尤其是raw文件加载失败、Release包下载中断,分分钟让人想砸键盘。别慌!今天整理了2大类超实用加速技巧,从镜像站到hosts配置,到CDN加速,总有一款适合你,赶紧收藏码住!

镜像站下载:国内节点秒级同步,直接替换链接超简单🚀

不想改任何设置?最简单的方法就是用国内镜像站下载,相当于GitHub在国内的"高速副本",直接通过镜像链接访问,速度提升 10 倍 +!

将你想下载的文件填入,即可获得加速下载地址

项目源自:https://github.com/moeyy01/gh-proxy-go

加速下载网站平台地址(失效通知我,我帮忙找新的):https://github.akams.cn/

1.进入网站填写链接,点开始下载按钮,或获取下载链接

图片[1]-Github的多种加速方式镜像站hosts指向-王先生笔记

2.一般使用方法,在链接前添加下载加速地址:

如Github文件链接:https://github.com/twsh0305/ip-sign/releases/download/2.0/ip-sign-2.0.zip

就可以替换为:https://加速地址/https://github.com/twsh0305/ip-sign/releases/download/2.0/ip-sign-2.0.zip

git命令同理,直接在原来的地址前添加加速地址即可,如:

git clone https://加速地址/https://github.com/twsh0305/ip-sign.git

3.为git配置下载加速,配置Git对GitHub域名强制使用代理(替换为你的代理链接前缀),在Linux系统运行以下命令,后续,只要运行git命令,自动替换为加速地址

git config --global url."https://加速地址/https://github.com/".insteadOf "https://github.com/"

hosts 配置:手动绑定 IP,根治 DNS 解析慢💡

如果你懂点技术,改hosts文件能从源头加速!通过绑定GitHub域名到国内解析的IP,减少DNS查询延迟,适合长期稳定使用。

获取最新GitHub的Hosts

以下项目你可以找到GitHub的Hosts文件更新,其中项目3是我最常用的,也是我在维护的,其地址你可以添加到一些自动更新hosts的工具中,让其自动更新hosts

项目1:https://github.com/521xueweihan/GitHub520

hosts获取地址1:

https://raw.hellogithub.com/hosts

项目2:https://github.com/oopsunix/hosts

hosts获取地址2:

https://raw.githubusercontent.com/oopsunix/hosts/main/hosts_github

我自己维护的项目3:http://api.1doc.top/github/github-hosts.txt

hosts获取地址3:

https://api.1doc.top/github/github-hosts.txt

hosts项目3本文动态更新:

#Github Hosts 开始
#博客:王先生笔记
#文章网址:https://wxsnote.cn/5975.html
#更新url:http://api.1doc.top/github/github-hosts.txt
140.82.114.25                 alive.github.com
20.205.243.168                api.github.com
140.82.112.21                 api.individual.githubcopilot.com
185.199.109.133               avatars.githubusercontent.com
185.199.109.133               avatars0.githubusercontent.com
185.199.109.133               avatars1.githubusercontent.com
185.199.109.133               avatars2.githubusercontent.com
185.199.109.133               avatars3.githubusercontent.com
185.199.109.133               avatars4.githubusercontent.com
185.199.109.133               avatars5.githubusercontent.com
185.199.109.133               camo.githubusercontent.com
140.82.114.21                 central.github.com
185.199.109.133               cloud.githubusercontent.com
20.205.243.165                codeload.github.com
140.82.112.21                 collector.github.com
185.199.109.133               desktop.githubusercontent.com
185.199.109.133               favicons.githubusercontent.com
20.205.243.166                gist.github.com
3.5.31.37                     github-cloud.s3.amazonaws.com
3.5.28.81                     github-com.s3.amazonaws.com
52.217.70.212                 github-production-release-asset-2e65be.s3.amazonaws.com
16.182.106.161                github-production-repository-file-5c1aeb.s3.amazonaws.com
16.15.228.69                  github-production-user-asset-6210df.s3.amazonaws.com
192.0.66.2                    github.blog
20.205.243.166                github.com
140.82.114.17                 github.community
185.199.110.154               github.githubassets.com
151.101.193.194               github.global.ssl.fastly.net
185.199.111.153               github.io
185.199.109.133               github.map.fastly.net
185.199.111.153               githubstatus.com
140.82.114.26                 live.github.com
185.199.109.133               media.githubusercontent.com
185.199.109.133               objects.githubusercontent.com
13.107.42.16                  pipelines.actions.githubusercontent.com
185.199.109.133               raw.githubusercontent.com
185.199.109.133               user-images.githubusercontent.com
13.107.226.39                 vscode.dev  # Timeout
140.82.113.21                 education.github.com
185.199.109.133               private-user-images.githubusercontent.com
#更新时间:2026-04-03T09:53:11+08:00
#Github Hosts 结束

食用方法

复制获取到的hosts内容

图片[2]-Github的多种加速方式镜像站hosts指向-王先生笔记

修改hosts文件(目录位置)

Windows 系统:C:\Windows\System32\drivers\etc\hosts
Linux 系统:/etc/hosts
Mac(苹果电脑)系统:/etc/hosts
Android(安卓)系统:/system/etc/hosts
iPhone(iOS)系统:/etc/hosts

修改方法,把内容复制到文本末尾

Windows 使用记事本
Linux、Mac 使用 Root 权限:sudo vi /etc/hosts
iPhone、iPad 须越狱、Android 必须要 root

除了移动端,所有电脑设备推荐以下工具

utools的应用中心可以找到hosts修改工具

图片[3]-Github的多种加速方式镜像站hosts指向-王先生笔记

移动端只有安卓有工具,苹果我不知道

顺便提一嘴,软路由与旁路由是最优解,实现代理,自动hosts更新等,总之家里的网络是跟随除路由器以外的硬件设备全局科学上网的。你需要一个硬件设备用来更改局域网网络,最次也要一个机顶盒刷上软路由系统。路由器,稍微麻烦一点,如小米路由器可以设置hosts

CDN 加速:静态资源专属高速公路🛣

jsDelivr 加速(前端党必用)

避坑指南:这些细节一定要注意!⚠️

hosts时效性:GitHub IP 经常变!建议每周用工具查一次,及时更新才能保持速度~

镜像下载站:下载站极其不稳定,推荐找项目自建加速自用~

合规性第一:确保使用的方法符合当地法律法规,安全开车最重要!


现在就试试这些方法,再也不用对着"正在加载"的页面发呆啦!如果遇到问题,欢迎在评论区留言,大家一起帮你解决~ 觉得有用的话,记得转发给身边的程序员小伙伴,一起告别 GitHub 龟速时代!

原文链接(非王先生笔记发布均为盗版):https://wxsnote.cn/5975.html

评论后可接收该文章的更新邮箱通知
友情赞助

如果你喜欢我的内容,可以赞助我哦!你的一点点心意,是我不断前进的动力!
温馨提示: 本文最后更新于2025-12-09 18:31:38,某些文章具有时效性,若有错误或已失效,请在下方留言或加入QQ群: 399019539 联系群主反馈。注意一些链接无法访问可能是你网络的原因,如Github,并非资源地址失效。
© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
相关推荐
评论 共1条

请登录后发表评论

    请登录后查看评论内容

王先生笔记