{"id":17660923,"url":"https://github.com/soulteary/remote-hosts-server","last_synced_at":"2025-05-07T17:13:48.782Z","repository":{"id":61929652,"uuid":"555720783","full_name":"soulteary/remote-hosts-server","owner":"soulteary","description":"Tiny(~5MB), Easy, Docker Support. Manage and share your Hosts configuration, suitable for tools such as Switch Hosts.","archived":false,"fork":false,"pushed_at":"2024-01-31T12:52:14.000Z","size":1549,"stargazers_count":24,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T17:13:43.441Z","etag":null,"topics":["hosts","hosts-file","hosts-file-edit","hosts-manage","hosts-management","switchhosts"],"latest_commit_sha":null,"homepage":"https://soulteary.com/2022/10/24/online-sharing-hosts-rules-tool-remote-hosts-server.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soulteary.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-22T06:51:23.000Z","updated_at":"2025-05-04T15:55:50.000Z","dependencies_parsed_at":"2024-01-31T13:54:10.617Z","dependency_job_id":"1ba57563-ae6a-45a5-8472-ee0a460128bd","html_url":"https://github.com/soulteary/remote-hosts-server","commit_stats":{"total_commits":28,"total_committers":3,"mean_commits":9.333333333333334,"dds":0.1071428571428571,"last_synced_commit":"0d3813ef1ee79b6b27e7f6f3c00bd6214201d305"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fremote-hosts-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fremote-hosts-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fremote-hosts-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soulteary%2Fremote-hosts-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soulteary","download_url":"https://codeload.github.com/soulteary/remote-hosts-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922335,"owners_count":21825639,"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":["hosts","hosts-file","hosts-file-edit","hosts-manage","hosts-management","switchhosts"],"created_at":"2024-10-23T17:09:44.607Z","updated_at":"2025-05-07T17:13:48.756Z","avatar_url":"https://github.com/soulteary.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remote Hosts Server\n\n[![CodeQL](https://github.com/soulteary/remote-hosts-server/actions/workflows/codeql.yml/badge.svg)](https://github.com/soulteary/remote-hosts-server/actions/workflows/codeql.yml)\n\n\u003cp style=\"text-align: center;\"\u003e\n  \u003ca href=\"README.md\" target=\"_blank\"\u003eENGLISH\u003c/a\u003e | \u003ca href=\"README_CN.md\"\u003e中文文档\u003c/a\u003e\n\u003c/p\u003e\n\n**Tiny (5MB), Muti-Arch (ARM, x86) ,Easy (One Command), Docker Support (ARM, x86)**\n\nManage and share your Hosts configuration, suitable for tools such as [SwitchHosts](https://github.com/oldj/SwitchHosts).\n\n![](screenshots/how-to-use.gif)\n\n## Quick Start\n\nDownload the binaries from [GitHub Releases page](https://github.com/soulteary/remote-hosts-server/releases), then quickly start a service for sharing Hosts with just one command:\n\n```bash\n./remote-hosts-server\n```\n\nIf you are a Docker user, you can use the following command instead:\n\n```bash\ndocker run --rm -it -v `pwd`/data:/data -p 8080:8080 soulteary/remote-hosts-server\n```\n\nAfter the program runs, the service will be started on port 8080 by default, the port can be adjusted by setting something like `PORT=8090 ./remote-hosts-server`.\n\nThen open the browser and you will see the interface, Update the Hosts content to your liking, then save it.\n\n![](screenshots/update-hosts.png)\n\nThe program will intelligently judge whether it needs to be reviewed according to the actual situation,\nso as to avoid wrong submission and affect the normal use.\n\n![](screenshots/review.png)\n\nIf you always don't want the second confirmation interface, you can add parameters `MODE=simple` (docker `-e \"MODE=simple\"`) at startup to avoid it.\n\nWhen we save the HOSTS, we can get the shared Hosts configuration by visiting `http://ip:port/api/hosts` (eg: `http://localhost:8080/api/hosts`)\n\nFill this address into Switch Hosts, set the appropriate update frequency, click Update Data to verify whether the data can be obtained, and then click OK to automatically update the configuration.\n\n![](screenshots/with-switchhosts.png)\n\n## Docker\n\n- [Docker Hub](https://hub.docker.com/r/soulteary/remote-hosts-server)\n\n![](screenshots/docker.png)\n\nIf you are used to using Docker Compose, you can refer to the following configuration:\n\n```bash\nversion: '2'\nservices:\n\n  remote-hosts-server:\n    image: soulteary/remote-hosts-server\n    ports:\n      - \"8080:8080\"\n    environment:\n      # same with ports\n      - PORT=8080\n      # mode: normal or simple\n      - MODE=normal\n    volumes:\n      - ./data:/data\n```\n\n## Resources\n\n- [Gin-Gonic/Gin](https://github.com/gin-gonic/gin)\n- [CodeMirror/CodeMirror5](https://github.com/codemirror/codemirror5)\n- [Google/Diff-Match-Patch](https://github.com/google/diff-match-patch)\n- [CodeMirror Highlight rules for hosts](https://github.com/oldj/SwitchHosts/blob/f595d23e1df8c52062cb12fc4a5c7a90b9e6a637/src/renderer/components/Editor/cm_hl.ts)\n- [Madrobby/Zepto](https://github.com/madrobby/zepto)\n- Logo inspire by [TajShireen](https://codepen.io/TajShireen/pen/ExLWgGb)\n- Button inspire by [coopergoeke](https://codepen.io/coopergoeke/pen/wvaYMbJ)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fremote-hosts-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoulteary%2Fremote-hosts-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoulteary%2Fremote-hosts-server/lists"}