add mdns-lookup option

This commit is contained in:
Nick Peng
2023-12-22 22:57:23 +08:00
parent 4946d61d19
commit b6b937b248
5 changed files with 31 additions and 10 deletions

View File

@@ -5,6 +5,8 @@ hide:
# 解析本地主机名称
## 使用DNSMASQ lease文件
smartdns可以配合DNSMASQ的dhcp lease文件支持本地主机名->IP地址的解析可以配置smartdns读取dnsmasq的lease文件并支持解析。具体配置参数如下
注意DNSMASQ lease文件每个系统可能不一样需要按实际情况配置
@@ -16,3 +18,11 @@ dnsmasq-lease-file /var/lib/misc/dnsmasq.leases
1. Windows系统默认使用mDNS解析地址如需要在windows下用使用smartdns解析则需要在主机名后面增加`.`表示使用DNS解析。如`ping smartdns.`
1. smartdns会周期监控文件变化并自动加载变化的映射关系。
## 使用mDNS查询
smartdns可以使用mDNS来查询本地主机名或IP地址。具体配置如下
```shell
mdns-lookup yes
```