From 6b6169e2485342d87f25bc89068b5e029c74201b Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:15:22 +0800 Subject: [PATCH] Adjust some config --- v2rayN/v2rayN/Global.cs | 2 +- v2rayN/v2rayN/Handler/CoreConfigSingbox.cs | 7 ++++--- v2rayN/v2rayN/Sample/dns_singbox_normal | 15 ++++++++------- v2rayN/v2rayN/Sample/dns_v2ray_normal | 1 + v2rayN/v2rayN/Sample/tun_singbox_dns | 4 ++-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/v2rayN/v2rayN/Global.cs b/v2rayN/v2rayN/Global.cs index 7e0d45df..99348260 100644 --- a/v2rayN/v2rayN/Global.cs +++ b/v2rayN/v2rayN/Global.cs @@ -141,7 +141,7 @@ public static readonly List coreTypes = new() { "v2fly", "SagerNet", "Xray", "v2fly_v5", "sing_box" }; public static readonly List coreTypes4VLESS = new() { "Xray", "sing_box" }; public static readonly List domainStrategys = new() { "AsIs", "IPIfNonMatch", "IPOnDemand" }; - public static readonly List domainStrategys4Singbox = new() { "", "ipv4_only", "ipv6_only", "prefer_ipv4", "prefer_ipv6" }; + public static readonly List domainStrategys4Singbox = new() { "ipv4_only", "ipv6_only", "prefer_ipv4", "prefer_ipv6", "" }; public static readonly List domainMatchers = new() { "linear", "mph", "" }; public static readonly List fingerprints = new() { "chrome", "firefox", "safari", "ios", "android", "edge", "360", "qq", "random", "randomized", "" }; public static readonly List userAgent = new() { "chrome", "firefox", "safari", "edge", "none" }; diff --git a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs index 5561dd93..200d072e 100644 --- a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs +++ b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs @@ -77,8 +77,8 @@ namespace v2rayN.Handler singboxConfig.log.level = _config.coreBasicItem.loglevel; break; - case "warn": - singboxConfig.log.level = "warning"; + case "warning": + singboxConfig.log.level = "warn"; break; default: @@ -323,6 +323,7 @@ namespace v2rayN.Handler public_key = node.publicKey, short_id = node.shortId }; + tls.insecure = false; } outbound.tls = tls; } @@ -662,7 +663,7 @@ namespace v2rayN.Handler var normalDNS = item?.normalDNS; if (string.IsNullOrWhiteSpace(normalDNS)) { - normalDNS = "{\"servers\":[{\"address\":\"tls://8.8.8.8\"}]}"; + normalDNS = "{\"servers\":[{\"address\":\"tcp://8.8.8.8\"}]}"; } var obj = Utils.ParseJson(normalDNS); diff --git a/v2rayN/v2rayN/Sample/dns_singbox_normal b/v2rayN/v2rayN/Sample/dns_singbox_normal index 6e3bf1ee..dc6e83a7 100644 --- a/v2rayN/v2rayN/Sample/dns_singbox_normal +++ b/v2rayN/v2rayN/Sample/dns_singbox_normal @@ -1,5 +1,10 @@ { "servers": [ + { + "tag": "remote", + "address": "tcp://8.8.8.8", + "detour": "proxy" + }, { "tag": "local", "address": "223.5.5.5", @@ -13,14 +18,10 @@ "rules": [ { "geosite": "cn", - "server": "local", - "disable_cache": true + "server": "local" }, { "geosite": "category-ads-all", - "server": "block", - "disable_cache": true + "server": "block" } - ], - "strategy": "ipv4_only" -} + ]} diff --git a/v2rayN/v2rayN/Sample/dns_v2ray_normal b/v2rayN/v2rayN/Sample/dns_v2ray_normal index 56175bb5..0a95737a 100644 --- a/v2rayN/v2rayN/Sample/dns_v2ray_normal +++ b/v2rayN/v2rayN/Sample/dns_v2ray_normal @@ -14,6 +14,7 @@ ] }, "1.1.1.1", + "8.8.8.8", "https://dns.google/dns-query" ], "queryStrategy": "UseIPv4" diff --git a/v2rayN/v2rayN/Sample/tun_singbox_dns b/v2rayN/v2rayN/Sample/tun_singbox_dns index 2c1c690d..603122be 100644 --- a/v2rayN/v2rayN/Sample/tun_singbox_dns +++ b/v2rayN/v2rayN/Sample/tun_singbox_dns @@ -1,8 +1,8 @@ { "servers": [ { - "tag": "out_dns", - "address": "8.8.8.8", + "tag": "remote", + "address": "tcp://8.8.8.8", "detour": "proxy" }, {