我对 kms.xxx.local 进行了如下的配置:
但是通过浏览器访问 kms.xxx.local 的时候,无法正常访问,surge 请求查看器日志如下:
Rule Evaluating - 0.2 ms
Events
16:52:09.289720 [Connection] Handled by VIF
16:52:09.290878 [Rule] Sub-rule matched: .work.local(in work.list)
16:52:09.290902 [Rule] Rule matched: RULE-SET Rule/domain/work.list
16:52:09.290958 [Rule] Policy decision path: 💼 work -> DIRECT
16:52:09.291305 [DNS] Use local DNS mapping record (server) for kms.work.local
16:52:09.294561 [Socket] Connecting with address: 198.18.28.47, bound to the primary interface (en0) explicitly under Enhanced Mode
16:52:10.291844 [Connector] Set up backup connection #2 via DIRECT
16:52:10.297961 [Socket] Connecting with address: 198.18.28.47, bound to the primary interface (en0) explicitly under Enhanced Mode
16:52:12.292553 [Connector] Set up backup connection #3 via DIRECT
16:52:12.297840 [Socket] Connecting with address: 198.18.28.47, bound to the primary interface (en0) explicitly under Enhanced Mode
16:52:15.293566 [Connector] Set up backup connection #4 via DIRECT
16:52:15.300256 [Socket] Connecting with address: 198.18.28.47, bound to the primary interface (en0) explicitly under Enhanced Mode
16:52:19.291945 [Connection] Disconnect with reason: Outgoing connection setup failed (Connection timeout)
通过 172.16.3.41 解析的 kms.xxx.local 的结果如下:
通过上述图和 surge 请求日志可以看到访问 kms.xxx.local 时候,surge 并没有使用本地解析指定 dns 服务器解析的结果 172.16.1.2;如果将指定 dns 服务器的方式换成直接指定 kms.xxx.local 的解析结果为 172.16.1.2 时,可以正常访问 kms.xxx.local,surge 请求日志里的 address 也是 172.16.1.2
surge 版本:5.9.0 (3025)