Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvob/nss-xhosts
NSS Module which supports wildcards
https://github.com/dvob/nss-xhosts
dns etc-hosts module nss nsswitch wildcard
Last synced: 9 days ago
JSON representation
NSS Module which supports wildcards
- Host: GitHub
- URL: https://github.com/dvob/nss-xhosts
- Owner: dvob
- License: mit
- Created: 2021-09-15T20:34:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T20:15:16.000Z (about 1 year ago)
- Last Synced: 2024-12-24T00:14:27.152Z (12 days ago)
- Topics: dns, etc-hosts, module, nss, nsswitch, wildcard
- Language: Rust
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xhosts
`xhosts` is a NSS module which resolves host names. It is similar to the default `files` module which reads records from `/etc/hosts` but it allows to configure wildcard records.## Example
* `/etc/xhosts`
```
# local k8s test
*.cluster.local 172.18.0.2# other entry
other.foo.com 192.168.1.1
```## Installation
* Build the code and install the shard library libnss_xhosts.so.2 in your library path:
```
./install.sh
```* Add `xhosts` to your `hosts` configuration in `/etc/nsswitch.conf`:
```
hosts: files xhosts dns
```* Create the file `/etc/xhosts` and add your records:
```
*.cluster.local 172.18.0.2
```