{"id":15363707,"url":"https://github.com/i5ting/hostrc","last_synced_at":"2025-07-25T06:40:17.164Z","repository":{"id":150958926,"uuid":"81206009","full_name":"i5ting/hostrc","owner":"i5ting","description":" An alternate host-switch minimal solution of SwitchHosts \u0026\u0026 multiple-host","archived":false,"fork":false,"pushed_at":"2017-04-23T07:55:47.000Z","size":28,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T18:50:57.476Z","etag":null,"topics":["frontend","host","multihost","proxy","switchhost","tool","tools"],"latest_commit_sha":null,"homepage":"https://github.com/i5ting/hostrc","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i5ting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-02-07T12:33:49.000Z","updated_at":"2019-09-24T02:05:10.000Z","dependencies_parsed_at":"2023-05-02T13:15:50.643Z","dependency_job_id":null,"html_url":"https://github.com/i5ting/hostrc","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"c85fa2d75fa6a3528a083141058039e399bd3902"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i5ting%2Fhostrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i5ting%2Fhostrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i5ting%2Fhostrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i5ting%2Fhostrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i5ting","download_url":"https://codeload.github.com/i5ting/hostrc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249041490,"owners_count":21203110,"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":["frontend","host","multihost","proxy","switchhost","tool","tools"],"created_at":"2024-10-01T13:08:05.279Z","updated_at":"2025-04-15T09:25:53.304Z","avatar_url":"https://github.com/i5ting.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hostrc\n\n\u003e An alternate host-switch minimal solution of [SwitchHosts](https://github.com/oldj/SwitchHosts) \u0026\u0026 [multiple-host](https://github.com/liyangready/multiple-host)\n\n[![npm version](https://badge.fury.io/js/hostrc.svg)](http://badge.fury.io/js/hostrc)\n\nThanks to [guankaishe](https://github.com/switer) for donating the npm package name!\n\n## Features\n\n- Declaration with hostrc config file\n- Minimal dependency \u0026\u0026 Quick installation\n- No dns cache \u0026\u0026 live-refresh\n- Support http \u0026\u0026 https proxy\n- Support cli \u0026\u0026 api usages\n\n## Install \n\n\u003e npm install --save hostrc\n\n## Usages\n\ntouch hostrc(default config file)\n\n```\n127.0.0.1 baidu.com\n127.0.0.1 q.baidu.com\n```\n\n### 1) cli\n\nread default config file from process.pwd() + '/hostrc' \u0026\u0026 start \n\ninstall as binary module\n\n\u003e $ [sudo] npm i -g hostrc\n\nuse in cli\n\n\u003e $ hrc or hostrc\n\n\nif don't want open url in chrome\n\n\u003e export HOSTRC_OPEN=false\n\n### 2) api\n\nopen brower with blank url\n\n```js\nrequire('hostrc')('./hostrc')\n```\n\nopen brower with default url \n\n```js\nrequire('hostrc')('./hostrc2', '127.0.0.1:3000')\n```\n\nprcess.env.NODE_ENV === 'development'\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## History\n\n- v1.0.0 init\n\n## Welcome fork and feekback\n\n- write by `i5ting` i5ting@126.com\n\n## License\n\nthis repo is released under the [MIT\nLicense](http://www.opensource.org/licenses/MIT).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi5ting%2Fhostrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi5ting%2Fhostrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi5ting%2Fhostrc/lists"}