diff --git a/v2rayN/ServiceLib/Sample/SampleTunInbound b/v2rayN/ServiceLib/Sample/SampleTunInbound index 2edc5ea0..df874c38 100644 --- a/v2rayN/ServiceLib/Sample/SampleTunInbound +++ b/v2rayN/ServiceLib/Sample/SampleTunInbound @@ -1,27 +1,28 @@ { - "tag": "tun", - "protocol": "tun", - "settings": { - "name": "xray_tun", - "MTU": 9000, - "gateway": [ - "172.18.0.1/30", - "fdfe:dcba:9876::1/126" - ], - "dns": [ - "172.18.0.1" - ], - "autoSystemRoutingTable": [ - "0.0.0.0/0", - "::/0" - ], - "autoOutboundsInterface": "auto" - }, - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - } -} \ No newline at end of file + "tag": "tun", + "protocol": "tun", + "settings": { + "name": "xray_tun", + "MTU": 9000, + "gateway": [ + "172.18.0.1/30", + "fdfe:dcba:9876::1/126" + ], + "dns": [ + "1.1.1.1", + "8.8.8.8" + ], + "autoSystemRoutingTable": [ + "0.0.0.0/0", + "::/0" + ], + "autoOutboundsInterface": "auto" + }, + "sniffing": { + "enabled": true, + "destOverride": [ + "http", + "tls" + ] + } +} diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs index e83a1bf9..c4891aaf 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs @@ -71,7 +71,7 @@ public partial class CoreConfigV2rayService var address6 = _config.TunModeItem.Ipv6Address.NullIfEmpty() ?? Global.TunIpv6Address.First(); tunInbound.settings.gateway.Add(address6); } - tunInbound.settings.dns = [address.Split('/').First()]; + tunInbound.settings.autoSystemRoutingTable = ["0.0.0.0/0"]; var bindInterface = _config.CoreBasicItem.BindInterface?.TrimEx(); if (!bindInterface.IsNullOrEmpty())