1 Star 0 Fork 78

miaocbin / hosts

forked from ineo6 / hosts 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

GitHub Hosts

这个有什么用?最直观的效果是GitHub图片可以正常加载,网页也稳定了。

GitHub Hosts主要是通过修改host的方式加速GitHub访问,解决图片无法加载以及访问速度慢的问题。

使用方式

hosts

内容定时更新,最近更新时间:2022-03-14 08:50:32。

# GitHub Host Start

185.199.108.154              github.githubassets.com
140.82.114.21                central.github.com
185.199.108.133              desktop.githubusercontent.com
185.199.108.153              assets-cdn.github.com
185.199.108.133              camo.githubusercontent.com
185.199.108.133              github.map.fastly.net
199.232.69.194               github.global.ssl.fastly.net
140.82.113.4                 gist.github.com
185.199.108.153              github.io
140.82.112.3                 github.com
140.82.114.6                 api.github.com
185.199.108.133              raw.githubusercontent.com
185.199.108.133              user-images.githubusercontent.com
185.199.108.133              favicons.githubusercontent.com
185.199.108.133              avatars5.githubusercontent.com
185.199.108.133              avatars4.githubusercontent.com
185.199.108.133              avatars3.githubusercontent.com
185.199.108.133              avatars2.githubusercontent.com
185.199.108.133              avatars1.githubusercontent.com
185.199.108.133              avatars0.githubusercontent.com
185.199.108.133              avatars.githubusercontent.com
140.82.114.9                 codeload.github.com
54.231.198.217               github-cloud.s3.amazonaws.com
52.217.164.49                github-com.s3.amazonaws.com
52.217.79.60                 github-production-release-asset-2e65be.s3.amazonaws.com
52.216.134.83                github-production-user-asset-6210df.s3.amazonaws.com
52.217.105.188               github-production-repository-file-5c1aeb.s3.amazonaws.com
185.199.108.153              githubstatus.com
64.71.144.202                github.community
185.199.108.133              media.githubusercontent.com

# Please Star : https://github.com/ineo6/hosts
# Mirror Repo : https://gitee.com/ineo6/hosts
# Update at: 2022-03-14 08:50:32

# GitHub Host End

手动配置hosts

macOS

hosts文件位置:/etc/hosts

macOS系统下修改需要按照如下方式:

1:首先,打开(访达)Finder。
2:使用组合键Shift+Command+G打开"前往文件夹",输入框中输入/etc/hosts
3:然后就会跳转到hosts文件位置。

注意:如果你使用VS Code,可以直接用VS Code修改和保存,不需要复制文件。

复制hosts文件到桌面上,鼠标右键右击它,选择「打开方式」—「文本编辑」,打开这个hosts文件,把前面的hosts内容复制进来。

然后把你修改好的hosts文件替换掉:/etc/hosts 文件。

注意:如果弹出密码输入框,你需要输入你当前登录账号对应的密码。

最后刷新缓存:

sudo killall -HUP mDNSResponder

Windows

hosts文件位置:C:/windows/system32/drivers/etc/hosts

将前文hosts内容追加到hosts文件,然后刷新DNS缓存:

ipconfig /flushdns

通过 SwitchHosts! 自动更新

这里推荐使用 SwitchHosts! 配置hosts,操作很简单,支持跨平台。

详细介绍可以阅读 SwitchHosts! 还能这样管理hosts,后悔没早点用

手动配置

添加一条hosts规则并启用,然后复制前文hosts内容即可。

如果你想保持和云端最新规则同步,可以用下面的配置方式。

定时同步

添加一条规则:

这样就可以和最新的hosts保持同步。

switchhost-github.png

我的作品

MIT License Copyright (c) 2021 ineo6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

GitHub最新hosts。解决GitHub图片无法显示,加速GitHub网页浏览。 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/miaocbin/hosts.git
git@gitee.com:miaocbin/hosts.git
miaocbin
hosts
hosts
master

搜索帮助