{"id":28384308,"url":"https://github.com/aardio/ghips","last_synced_at":"2025-06-25T23:31:13.680Z","repository":{"id":62466441,"uuid":"559228090","full_name":"aardio/Ghips","owner":"aardio","description":"GitHub 网速优化与修复工具","archived":false,"fork":false,"pushed_at":"2022-11-08T09:33:34.000Z","size":602,"stargazers_count":282,"open_issues_count":0,"forks_count":55,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-30T08:54:20.578Z","etag":null,"topics":["aardio","github","hosts"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aardio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-29T13:12:54.000Z","updated_at":"2025-05-28T13:08:20.000Z","dependencies_parsed_at":"2023-01-21T05:45:42.982Z","dependency_job_id":null,"html_url":"https://github.com/aardio/Ghips","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/aardio/Ghips","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aardio%2FGhips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aardio%2FGhips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aardio%2FGhips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aardio%2FGhips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aardio","download_url":"https://codeload.github.com/aardio/Ghips/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aardio%2FGhips/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261972584,"owners_count":23238537,"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","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":["aardio","github","hosts"],"created_at":"2025-05-30T08:10:18.478Z","updated_at":"2025-06-25T23:31:13.663Z","avatar_url":"https://github.com/aardio.png","language":null,"readme":"# Ghips | \nGitHub 网速优化工具。  \n使用 GitHub 官方 API 获取当前系统访问速度最快的 IP ，并更新 hosts 文件。  \n\n\u003e[\u0026gt;\u0026gt;点这里下载 Ghips](https://github.com/aardio/Ghips/releases/latest/download/Ghips.7z) 体积仅 601 KB [\u0026gt;\u0026gt; 国内镜像](https://gitcode.net/aardio/Ghips/)  \n支持 Win7，Win8，Win10，Win11 等操作系统。   \n\n\n![Ghips](./screenshots/Ghips1.gif)\n\n刷新间隔时间设为非 0 则定时获取最快 IP 并自动刷新域名解析。\n\u003e更新 IP 后首次访问 GitHub 可能会略慢，稍等就快了。 \n\n本程序需要以管理权限运行才能修改 hosts。  \n建议右键点 Ghips 托盘图标，在弹出菜单中勾选「开机启动」。\n\n![Ghips](./screenshots/menu.png)\n\n这样开机就会静默获取管理权限启动，不会再弹出警告。\n\n访问速度快的 IP 经常变更，单击 Ghips 托盘图标能快速刷新 IP 测速结果。   \n\n \n本软件使用 [aardio 编程语言 ](https://www.aardio.com) 开发，早于 2019 年 就在 aardio 中发布了源代码（现已分离为 Ghips 项目）。\n\n![Ghips](./screenshots/Ghips.png)\n\n调用 GitHub API 的方法请参考：  \n[《魔法 web.rest ：自动封装任意 HTTP 接口为本地函数》](https://mp.weixin.qq.com/s/4mYRDnO49alwpQoBD_cILg)\n\n修改 hosts 文件的文件夺权这些比较麻烦，\n不过用 aardio 做这事很简单，关键源码如下：\n```javascript\nfsys.hosts.ownCacls();\nfsys.hosts.update(githubIps)\n```\n\n用 aardio 实现软件开机静默获取管理权限也很简单，关键源码：\n```javascript\nimport sys.runAsTask;\nvar sysTask = sys.runAsTask(\"Ghips\",\"GitHub 优化与修复工具\")\nsysTask.register(\"/tray\");\n```\n\n添加定时器自动刷新 IP 的关键源码如下：\n```javascript\nwinform.setInterval( \n\tfunction(){\n\t\tif(!winform.plusUpdateIps.disabled){\n\t\t\twinform.plusUpdateIps.oncommand(,,true);\n\t\t}\n\t},interval * 5000 \n)\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faardio%2Fghips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faardio%2Fghips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faardio%2Fghips/lists"}