2 个版本
0.1.1 | 2023 年 5 月 12 日 |
---|---|
0.1.0 | 2022 年 4 月 2 日 |
#2 in #horizon
每月 22 次下载
22KB
501 行
polyresolver 是一个用于分片天际线场景的解析器
polyresolver 用于将域名根域名指向不同的名称服务器,以解析不同路径的域名。在 DNS 术语中,这被称为“分片天际线 DNS”,但通常在服务器端执行。这是在客户端执行的。它默认在 IP 上暴露一个服务器 127.0.0.1
(但您可以覆盖此设置)并提供了端口 53 上的 UDP 和 TCP 解析器。然后,它扫描配置目录中的具有此格式的 YAML 文件
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.
可以在任何时间添加和删除配置文件,而无需重新启动守护进程。这使得它非常适合与例如 dhcp post-renew 脚本一起使用。
启动方式: polyresolver <配置目录> <(可选) 监听 IP>
。它在前台运行,因此请确保对其进行监督。
这看起来熟悉吗?应该如此,OS X 和 Windows 以及 systemd(但不是 Linux!)都有这个功能。polyresolver 最类似于 systemd-resolved
,但没有对 systemd-networkd
或 systemd
的依赖。它还应该是一个跨平台产品,也可以在 Windows、OS X、FreeBSD(实际上任何可以编译 rust 和 openssl 的地方)上运行,使此功能可以在全球范围内以相同的方式进行使用。
作者
Erik Hollensbe [email protected]
该产品大量使用了(并且没有它就不可能)trust-dns Rust 工具包。
许可证
BSD 3-Clause
依赖项
~21–34MB
~618K SLoC