{"id":49915935,"url":"https://github.com/rexlevin/hostsbox","last_synced_at":"2026-05-16T16:13:06.807Z","repository":{"id":212894167,"uuid":"511436966","full_name":"rexlevin/hostsbox","owner":"rexlevin","description":"hosts tool based on electron基于electron的跨平台hosts管理小工具","archived":false,"fork":false,"pushed_at":"2025-06-25T03:45:55.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T04:29:19.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rexlevin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-07T08:01:25.000Z","updated_at":"2025-06-25T03:45:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"78a88b5b-b766-4b1e-a536-2f677246971a","html_url":"https://github.com/rexlevin/hostsbox","commit_stats":null,"previous_names":["rexlevin/hostsbox"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rexlevin/hostsbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexlevin%2Fhostsbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexlevin%2Fhostsbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexlevin%2Fhostsbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexlevin%2Fhostsbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rexlevin","download_url":"https://codeload.github.com/rexlevin/hostsbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexlevin%2Fhostsbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33109466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-05-16T16:13:02.349Z","updated_at":"2026-05-16T16:13:06.798Z","avatar_url":"https://github.com/rexlevin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 说明\n\n这是一个使用electron制作的切换管理hosts的小工具。\n\n[uTools](https://u.tools/)有一个hosts的插件，可以很方便的管理本地hosts文件的各种网站解析配置。\n\n我自己机器上使用utools有点小问题，utools没有独立的这个hosts工具，所以自己边学边仿着写了这么一个独立的hosts小工具。\n\n程序第一次启动会把原hosts备份到程序运行的用户目录下，linux是 `~/.conf/hostsbox/` 目录 ，windows是 `c:\\Users\\名字\\AppData\\Roaming\\hostsbox\\` 目录。\n\n# 开发\n\n```bash\n# github\ngit clone https://github.com/rexlevin/hostsbox.git\n# gitee\ngit clone https://gitee.com/rexlevin/hostsbox.git\n\ncd hostsbox\nnpm i\n\n# 安装electron-builder\nnpm i -g electron-builder\n\n# linux环境下打包，appimage\nnpm run build-dist:linux\n# windows环境下打包，exe\nnpm run build-dist:win\n```\n\n# tauri\n\n本来打算使用tauri的，但是有些运行和打包的问题实在是太头大。\n\n比如有时候本地dev的时候启动不了，实际上可运行文件已经编译出来了，只能到编译目录下去手动运行可执行文件；\n\n再比如build的时候build不出来appimage包，是在最后打包appimage的时候有一个大家都知道的魔法的原因。\n\n初次接触tauri，更不熟悉rust，没能尽快搞定，最终还是继续用着庞大但是成熟的electron。\n\n等以后tauri更成熟，本地更方便了再更换成tauri吧，毕竟更小。\n\n# 截图\n\n![image-20220710104723942](https://imgbd.r-xnoro.com//image-20220710104723942.png)\n\n![image-20220710104830427](https://imgbd.r-xnoro.com//image-20220710104830427.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexlevin%2Fhostsbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexlevin%2Fhostsbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexlevin%2Fhostsbox/lists"}