https://github.com/rreverser/override-hosts
Small shared library utility to temporarily override list of hosts to specific target
https://github.com/rreverser/override-hosts
Last synced: 8 months ago
JSON representation
Small shared library utility to temporarily override list of hosts to specific target
- Host: GitHub
- URL: https://github.com/rreverser/override-hosts
- Owner: RReverser
- License: mit
- Created: 2017-04-21T15:03:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-21T16:02:10.000Z (about 9 years ago)
- Last Synced: 2025-06-27T21:38:13.201Z (12 months ago)
- Language: C
- Homepage:
- Size: 1.95 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# override-hosts
Small shared library utility to temporarily override list of hosts to specific IP/host (only one target for now). This is useful when you want to override hostname or IP to visit `https://...` website, as just changing `Host` header is not enough due to SNI checks.
It's kinda like `/etc/hosts` but for one-off temporary overrides without `sudo` permissions.
If you're using `curl`, you should use built-in `curl --resolve ...` option instead, as it provides the same functionality in a safer way.
Usage (Linux only):
```bash
LD_PRELOAD=$(pwd)/override-hosts.so \
OVERRIDE_HOSTS_FROM=example.org,example.com \
OVERRIDE_HOSTS_TO=127.0.0.1 \
your_command
```