Crates.io | polyresolver |
lib.rs | polyresolver |
version | 0.1.1 |
source | src |
created_at | 2022-04-02 23:51:24.628491 |
updated_at | 2023-05-12 02:26:08.574747 |
description | DNS resolver for client-side split horizon resolution over multiple domain arenas |
homepage | https://github.com/erikh/polyresolver |
repository | https://github.com/erikh/polyresolver |
max_upload_size | |
id | 561102 |
size | 62,449 |
polyresolver is used to root domain names to different nameservers for the purposes of resolving domains down different pathways. In DNS terms this is called "split horizon DNS" but is usually done at the server-side. This is intended to do it at the client-side. It exposes a server on an IP, 127.0.0.1
by default (but you can override this) and provides a UDP and TCP resolver over port 53. It then scans a configuration directory for YAML files that have this format:
domain_name: foo # from the TLD up, the domain you wish to forward. Use `.` for the root.
forwarders: # the list of forwarders you wish to contact to resolve this domain.
- 1.2.3.4
- 127.0.0.1
- 192.168.1.1
protocol: udp # udp or tls, the type of resolvers in the forwarders list. tls is not supported yet.
Config files can be added and removed at any time without restarting the daemon. This makes it ideal for use with e.g., dhcp post-renew scripts.
To launch: polyresolver <config dir> <(optional) listen ip>
. It runs in the foreground so be sure to supervise it with something.
Does this look familiar? It should, OS X and Windows and systemd (but not Linux!) all have this functionality. polyresolver is most analogous to systemd-resolved
, just without the dependency on systemd-networkd
or systemd
in general. It also should be a cross-platform product also working on Windows, OS X, FreeBSD (anywhere rust and openssl compile, really), allowing this functionality to be used universally in the same way.
Erik Hollensbe git@hollensbe.org
This product makes heavy use (and would not be possible without) the trust-dns rust toolkit.
BSD 3-Clause