返回排行榜

ineo6/hosts

TypeScriptineo6.github.io/hosts/

GitHub最新hosts。解决GitHub图片无法显示,加速GitHub网页浏览。

githubhostshosts-file
Star 增长趋势
Star
5.3k
Forks
457
周增长
Issues
11
2k4k
2021年3月2022年12月2024年10月2026年7月
制品库npmnpm install hosts
README

GitHub Hosts

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

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

全新的GitHub访问加速工具,等待试用和反馈中,点击 FastDev 直达。

特点就是稳定!

hosts地址可能会调整,所以请务必关注GitHub、Gitlab主页,保证不迷路,也可以关注公众号:湖中剑。

使用方式

1. 远程hosts

现在新增了DNS获取方案,欢迎使用并反馈。

请查看 next hosts

内容定时更新,最近更新时间:2023-03-08 20:22:25。

# New!欢迎使用基于DNS的新方案
# https://gitlab.com/ineo6/hosts/-/raw/master/next-hosts
# 地址可能会变动,请务必关注GitHub、Gitlab获取最新消息
# 也可以关注公众号:湖中剑,保证不迷路
# GitHub Host Start

# Please Star : https://github.com/ineo6/hosts
# Mirror Repo : https://gitlab.com/ineo6/hosts

# Update at: 2023-03-08 20:22:25

# GitHub Host End

2. 本地 hosts 服务

本地 hosts 服务获取到的ip是经过本地测试,所以成功率较高。

而且会定时获取最新的ip,尽可能保证访问。

注意,该方案需要结合SwitchHosts一起使用,或者你也可以直接访问地址,手动复制。

macOS (Intel)

执行下面命令, 服务会运行在: http://localhost:8888

curl -L https://github.com/ineo6/hosts/releases/download/v1.0.1/hosts-server-pkg-mac-x64.tar.gz | tar xzvf -
xattr -d com.apple.quarantine ./hosts-server-pkg-mac-x64/hosts-server
./hosts-server-pkg-mac-x64/hosts-server --port=8888

macOS (Apple Silicon)

执行下面命令, 服务会运行在: http://localhost:8888

curl -L https://github.com/ineo6/hosts/releases/download/v1.0.1/hosts-server-pkg-mac-arm64.tar.gz | tar xzvf -
./hosts-server-pkg-mac-arm64/hosts-server --port=8888

Linux (x64, amd64)

执行下面命令, 服务会运行在: http://localhost:8888

curl -L https://github.com/ineo6/hosts/releases/download/v1.0.1/hosts-server-pkg-linuxstatic-x64.tar.gz | tar xzvf -
./hosts-server-pkg-linuxstatic-x64/hosts-server --port=8888

Linux (ARM64)

执行下面命令, 服务会运行在: http://localhost:8888

curl -L https://github.com/ineo6/hosts/releases/download/v1.0.1/hosts-server-pkg-linuxstatic-arm64.tar.gz | tar xzvf -
./hosts-server-pkg-linuxstatic-arm64/hosts-server --port=8888

Run on Linux (ARMv7 32bit)

执行下面命令, 服务会运行在: http://localhost:8888

curl -L https://github.com/ineo6/hosts/releases/download/v1.0.1/hosts-server-pkg-linuxstatic-armv7.tar.gz | tar xzvf -
./hosts-server-pkg-linuxstatic-armv7/hosts-server --port=8888

Windows

下载 https://github.com/ineo6/hosts/releases/download/v1.0.1/hosts-server-pkg-win-x64.zip ,解压后执行下面命令,服务会运行在: http://localhost:8888

.\hosts-server.exe --port=8888

配置hosts教程

通过 SwitchHosts 自动更新

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

注意:首次使用先备份下本地hosts。

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

操作步骤

添加一条规则:

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

switchhost-github.png

手动配置

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

我的作品

  • GitMaster:开发者助手,代码仓库结构浏览器扩展
  • homebrew-install:Homebrew快速安装教程和脚本
  • GitHub Hosts:GitHub最新hosts,定时更新
  • Awesome Mirror:镜像收集,旨在帮助你快速安装开发工具
  • mp-ci:微信小程序、小游戏发布助手(CI)
相关仓库
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

PythonPyPIgithubhellogithub
hellogithub.com
166.3k12.4k
Asabeneh/30-Days-Of-Python

The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw

PythonPyPI30-days-of-pythonpython
68.7k12.7k
tiimgreen/github-cheat-sheet

A list of cool features of Git and GitHub.

MIT Licenseawesomeawesome-list
git.io/sheet
58k5.4k
go-gitea/gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD

GoGo ModulesMIT Licensegiteagolang
gitea.com
56.9k6.9k
GitHubDaily/GitHubDaily

坚持分享 GitHub 上高质量、有趣实用的开源技术教程、开发者工具、编程网站、技术资讯。A list cool, interesting projects of GitHub.

githubopen-source
githubdaily.com
47.1k4.7k
SimplifyJobs/Summer2026-Internships

Summer 2026 software engineering, data science, AI, quant, product management, and hardware internship postings. Updated daily by Simplify and Pitt CSC.

PythonPyPIinterview-preparationinternships
swelist.com
45.4k3.2k
refined-github/refined-github

:octocat: Browser extension that simplifies the GitHub interface and adds useful features

TypeScriptnpmMIT Licensechrome-extensiongithub
31.8k1.8k
github/github-mcp-server

GitHub's official MCP Server

GoGo ModulesMIT Licensegithubmcp
31.6k4.6k
abhisheknaiidu/awesome-github-profile-readme

😎 A curated list of awesome GitHub Profile which updates in real time

Creative Commons Zero v1.0 Universalawesome-listawesome
bit.ly/awesome-gh
30.6k4.4k
521xueweihan/GitHub520

:kissing_heart: 让你“爱”上 GitHub,解决访问时图裂、加载慢的问题。(无需安装)

PythonPyPIdnsgithub
29.2k2.7k
maboloshi/github-chinese

GitHub 汉化插件,GitHub 中文化界面。 (GitHub Translation To Chinese)

JavaScriptnpmGNU General Public License v3.0githubuserscript
maboloshi.github.io/github-chinese/
29k1.7k
sdras/awesome-actions

A curated list of awesome actions to use on GitHub

Creative Commons Zero v1.0 Universalawesomegithub
28k1.7k