{"id":21331665,"url":"https://github.com/rcaught/hosts-override","last_synced_at":"2025-07-12T10:31:03.778Z","repository":{"id":147650896,"uuid":"208527481","full_name":"rcaught/hosts-override","owner":"rcaught","description":"Override hosts file entries for the lifetime of the process","archived":false,"fork":false,"pushed_at":"2021-03-23T02:50:28.000Z","size":50,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-25T22:34:06.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/rcaught.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":"2019-09-15T01:47:21.000Z","updated_at":"2024-06-19T10:14:23.291Z","dependencies_parsed_at":"2023-04-09T07:15:26.309Z","dependency_job_id":null,"html_url":"https://github.com/rcaught/hosts-override","commit_stats":null,"previous_names":[],"tags_count":10,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaught%2Fhosts-override","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaught%2Fhosts-override/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaught%2Fhosts-override/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaught%2Fhosts-override/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcaught","download_url":"https://codeload.github.com/rcaught/hosts-override/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225814907,"owners_count":17528295,"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":[],"created_at":"2024-11-21T22:42:58.510Z","updated_at":"2024-11-21T22:42:59.094Z","avatar_url":"https://github.com/rcaught.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hosts-override [![Build Status](https://travis-ci.org/rcaught/hosts-override.svg?branch=master)](https://travis-ci.org/rcaught/hosts-override)\nOverride `hosts` file entries for the lifetime of the process\n\n## Installation\n\n##### MacOS (Homebrew via own tap)\n```\n$ brew install rcaught/hosts-override/hosts-override\n```\n##### MacOS (manually)\n```\n$ curl -Ls https://github.com/rcaught/hosts-override/releases/latest/download/macos.zip \u003e /tmp/hosts-override.zip\n$ unzip /tmp/hosts-override.zip -d /usr/local/bin\n```\n##### Linux\n```\n$ curl -Ls https://github.com/rcaught/hosts-override/releases/latest/download/linux.zip \u003e /tmp/hosts-override.zip\n$ unzip /tmp/hosts-override.zip -d /usr/local/bin\n```\n##### Windows\n- Download https://github.com/rcaught/hosts-override/releases/latest/download/windows.zip\n- Unzip the file and run the exe as Administrator\n\n## Usage\n### Mac / Linux\n- Override myhost.com to resolve to 127.0.0.1\n  ```\n  $ sudo hosts-override myhost.com,127.0.0.1\n  ```\n- google.com will be resolved into an IP / set of IPs\n  ```\n  $ sudo hosts-override myhost.com,google.com\n  ```\n- Multiple hosts and values are supported\n  ```\n  $ sudo hosts-override myhost.com,127.0.0.1 anotherhost.com,127.0.0.1\n  ```\n- Refresh of unresolved hosts (with custom interval)\n  ```\n  $ sudo hosts-override -r -i=1m myhost.com,127.0.0.1\n  ```\n### Windows\n- Run Command Prompt as Administrator and navigate to the directory containing hosts-override.exe\n- ```\n  hosts-override.exe myhost.com,127.0.0.1\n  ```\n\n### Notes\n- `sudo` or running as Administrator is required as the hosts file is owned by `root`\n- On exiting the program with an interupt (CTRL-c), the hosts file is cleaned of appended records\n- In the case of an unclean shutdown, the next invocation of `hosts-override` will clear the previous sessions records\n- IPv4 and IPv6 addresses supported\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcaught%2Fhosts-override","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcaught%2Fhosts-override","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcaught%2Fhosts-override/lists"}