Closed unicser closed 2 years ago
你的描述与配置不符。要了解关于如何在 sing-box 中处理 DNS,请查看 https://sing-box.sagernet.org/zh/examples/dns-hijack/ 。
看来与我想象的功能有偏差,我只是想实现与http sniff类似的行为,或者说有什么办法tun配置时只sniff http和https,忽略dns sniff
该错误与 sniff 无关。
如果client端tun部分改成下面的配置,即"sniff": false,则dig查询dns可以正常返回 { "type": "tun", "tag": "tun-in", "interface_name": "tun0", "mtu": 1500, "inet4_address": "172.19.0.1/30", "auto_route": true, "inet4_route_address": "1.1.1.1/32", "sniff": false }
Welcome
Description of the problem
tun + sniff配置是,dns解析异常,客户端使用dig命令输出如下:
$ dig a g.cn @1.1.1.1 ;; Warning: ID mismatch: expected ID 10644, got 0 ;; Warning: query response not set ;; Warning: ID mismatch: expected ID 10644, got 0 ;; Warning: query response not set ;; Warning: ID mismatch: expected ID 10644, got 0 ;; Warning: query response not set
; <<>> DiG 9.17.19 <<>> a g.cn @1.1.1.1 ;; global options: +cmd ;; connection timed out; no servers could be reached
Version of sing-box
Server and client configuration file
Server and client log file