{"id":21871204,"url":"https://github.com/lingbopro/easy-github-hosts","last_synced_at":"2025-08-10T20:05:06.337Z","repository":{"id":238289246,"uuid":"796256271","full_name":"lingbopro/easy-github-hosts","owner":"lingbopro","description":"基于HOSTS文件的GitHub访问加速器 | 解放双手","archived":false,"fork":false,"pushed_at":"2025-01-23T10:57:23.000Z","size":69,"stargazers_count":16,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T23:55:33.845Z","etag":null,"topics":["accelerator","fastgithub","github","hostsfile","javascript","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lingbopro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-05T12:16:50.000Z","updated_at":"2025-03-29T13:39:00.000Z","dependencies_parsed_at":"2025-04-14T23:55:34.941Z","dependency_job_id":"55efe540-075c-469d-a6bb-8c1f025e791c","html_url":"https://github.com/lingbopro/easy-github-hosts","commit_stats":null,"previous_names":["lingbopro/easy-github-hosts"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/lingbopro/easy-github-hosts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingbopro%2Feasy-github-hosts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingbopro%2Feasy-github-hosts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingbopro%2Feasy-github-hosts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingbopro%2Feasy-github-hosts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lingbopro","download_url":"https://codeload.github.com/lingbopro/easy-github-hosts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingbopro%2Feasy-github-hosts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780615,"owners_count":24474682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accelerator","fastgithub","github","hostsfile","javascript","nodejs"],"created_at":"2024-11-28T06:13:41.538Z","updated_at":"2025-08-10T20:05:06.309Z","avatar_url":"https://github.com/lingbopro.png","language":"JavaScript","readme":"# Easy GitHub Hosts\n\n## 介绍\n\n这是一个用 `Node.js` 制作的程序，用于自动将 **GitHub 相关域名的 IP 地址**添加到 `HOSTS` 文件中，达到**在大陆快速访问 GitHub** 的目的。  \n（闲的没事写的，代码好看不了一点`(ˉ▽ˉ；)...`）\n\n## 使用方法\n\n### 1. 安装 Node.js\n\n如果你没有安装 `Node.js`，请到 [Node.js 官网](https://nodejs.org/en/download) 下载 Node.js。  \nPS：测试时使用的是 `Node.js v20.11.1`。\n\n### 2. 克隆存储库\n\n在终端中使用 git 克隆存储库：\n\n```shell\ngit clone https://github.com/lingbopro/easy-github-hosts.git\n```\n\n### 3.安装依赖项\n\n~~_在终端中执行：_~~\n~~_npm install_~~\n\n**自 [v1.4.0](https://github.com/lingbopro/easy-github-hosts/releases/tag/v1.4.0) 之后，我们已经实现了0依赖项，因此不用再安装了 `:)`**  \n\n### 4. 运行\n\n#### Windows\n\n\u003c!-- 此部分内容为小白向，大佬只用看第一个 (咱们不需要写这个) --\u003e\n\n1. 在克隆的文件夹双击运行 `Launch.cmd`。\n\n2. 应用程序会请求管理员权限。如果弹出了对话框，请单击 \"是\"。这个权限用于更改 `HOSTS` 文件。\n\n3. 输入 `1` 并且回车。\n\n4. 输入 `yes` 以确认替换 `HOSTS` 文件，或输入 `no` 以终止操作。\n\n5. 等待。请查看输出，一两个 HTTP 错误是正常的 - 我们的 API 不一定全部工作。\n\n6. 按任意键退出程序。\n\n##### 恢复 HOSTS 文件\n\n将这一步\n\n\u003e 3. 输入 `1` 并且回车。\n\n替换为\n\n\u003e 3. 输入 `2` 并且回车。\n\n然后直接跳至\n\n\u003e 6. 按任意键退出程序。\n\n#### Linux\n\n1. 在克隆的文件夹双击运行 `launch.sh`。\n\n2. erm 能到这一步的都会linux基础知识吧。。。\n\n### 5. 完事\n\n\u003c!--- 恢复也在脚本里，删了删了\n\n#### 什么？你想改回你的Hosts文件？\n\n~~hahaha，你别想改回去了~~\n\n##### 恢复hosts文件\n\n要从备份中恢复原始的`hosts`文件，请按以下步骤操作：\n\n1. **运行恢复命令**：使用以下命令恢复您的`hosts`文件。\n\n    ```sh\n    node main.js restore\n    ```\n\n2. **完成**：程序将在原始`hosts`文件恢复完成后通知您。\n\n---\u003e\n\n\u003c!--## 选项\n\n可以在运行时在命令中增加可选的选项（见下）\n\n### debug\n\n启用调试模式（会输出更详细的信息）。\n\n```shell\nnode main.js --debug\n```\n\n### --noedit\n\n不编辑 HOSTS 文件，只是输出增加条目后的内容。\n\n```shell\nnode main.js --noedit\n```\n\n### --diff\n\n不修改文件，只输出更改了的内容（必须和 [`--noedit`](#--noedit) 选项一同使用）。\n\n```shell\nnode main.js --noedit --diff\n```\n\n### --nocache\n\n不读取 IP 缓存，也不写入缓存\n\n```shell\nnode main.js --nocache\n```--\u003e\n\n## TODO\n\n- [x] 完善域名列表  \n- [ ] 增加更多的 IP 源  \n- [ ] 使其可以用于所有这样的网站  \n- [x] 优化代码,增加可读性\n- [x] 实现0依赖项  \u003c!-- hhh,加上即完成 (......)--\u003e\n- [x] 简化步骤，试图让用户一键配置，跑完代码  \n- [ ] 对于Linux的支持  \n\n## 开源说明\n\n此项目是一个开源项目。此项目使用 [MIT 开源许可](LICENCE)。  \n根据许可，你可以对该项目进行传播、分发、修改以及二次发布，包括个人和商业用途，且无需标明存储库等信息。\n\n## 贡献须知\n\n见 [开发指南](./docs/dev-guide.zh-CN.md#贡献)。  \n\n## 其它\n\n啊？\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingbopro%2Feasy-github-hosts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingbopro%2Feasy-github-hosts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingbopro%2Feasy-github-hosts/lists"}