Closed fsheidaiee closed 1 year ago
tun is designed to hijack system dns, so local dns is not supported.
I have the same problem, but I didn't get any ERROR. It run OK on 1.1-beta8, but not working on 1.1-beta9 (same config).
Client Config:
Client log: +0800 2022-10-08 15:04:17 INFO [558707430] inbound/mixed[mixed-in]: inbound connection from 127.0.0.1:40704 +0800 2022-10-08 15:04:17 INFO [558707430] inbound/mixed[mixed-in]: inbound connection to www.baidu.com:80 +0800 2022-10-08 15:04:17 INFO [558707430] outbound/trojan[trojan-out]: outbound connection to www.baidu.com:80 +0800 2022-10-08 15:04:17 INFO [558707430] dns: lookup succeed for xxx.xxx.xxx
No website opens even though set "192.168.1.1"/"192.168.1.0" instead of "local".
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days
Welcome
Description of the problem
when setting local dns no website opens (if set "192.168.1.1" instead of "local" websites begin to open)
Version of sing-box
sing-box version 1.1-beta9
Environment: go1.19.1 windows/amd64 Tags: with_clash_api,with_quic Revision: 37be205dccdd52a95f41f191a04bcbc12649745a CGO: enabled
Server and client configuration file
{ "log": { "disabled": false, "level": "info", "output": "./log", "timestamp": true }, "dns": { "servers": [ { "tag": "mydns", "address": "local", "detour": "direct" }, { "tag": "ddns", "address": "https://cloudflare-dns.com/dns-query", "address_resolver": "mydns", "detour": "direct" } ], "rules": [ { "domain_suffix": [".ir"], "geosite": ["private", "private"], "server": "local" }, { "source_geoip": ["ir"], "server": "local" } ], "final": "ddns", "strategy": "ipv4_only" }, "inbounds": [ { "type": "tun", "tag": "tun-in", "interface_name": "singbox", "inet4_address": "172.19.0.1/30", "auto_route": true, "stack": "system", "mtu": 9000, "sniff": true }
{ "type": "selector", "tag": "select",
"outbounds": [ "vless", "vmess", "socks", "direct" ], "default": "vmess" }, { "type": "vless", "tag": "vless", "server": "xxxxxxxxxxxxxxx", "server_port": xxxxxxxxx, "uuid": "xxxxxxxxxxxxxx", "packet_encoding": "xudp", "transport": { "type": "ws", "path": "/", "headers": {} } }, { "type": "vmess", "tag": "vmess",
"server": "xxxxxxxxxxxx", "server_port": xxxxxx, "uuid": "xxxxxxxxxxxxxxxxxx", "security": "auto", "alter_id": 0, "global_padding": false, "packet_encoding": "xudp", "transport": { "type": "ws", "path": "xxxxxxxxxxx", "headers": {"xxxxxxxxxxxxxxxxx"}, "max_early_data": 0, "early_data_header_name": "" } }, { "type": "socks", "tag": "socks",
"server": "127.0.0.1", "server_port": 2080, "version": "5" }, { "type": "direct", "tag": "direct" }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns-out" } ], "route": { "rules": [ { "protocol": "dns", "outbound": "dns-out" }, { "geosite": "category-ads-all", "outbound": "block" }, { "domain_suffix": [".ir"], "geosite": ["private", "ir"], "outbound": "direct" }, { "geoip": ["ir", "private"], "outbound": "direct" }, { "source_geoip": ["ir"], "outbound": "direct" } ], "auto_detect_interface": true, "final": "select" }, "experimental": { "clash_api": { "external_controller": "127.0.0.1:9090", "external_ui": "dashboard", "direct_io": false, "default_mode": "rule", "store_selected": true } } }
Server and client log file
log.log