From d56e896f0721fc1f8a6b54d4178bf1afdfbe6dce Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 1 Mar 2026 14:20:05 +0800 Subject: [PATCH] Ignore json file extensions in IsDomain --- v2rayN/ServiceLib/Common/Utils.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index 75ef4627..3907b1a7 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -497,6 +497,13 @@ public class Utils return false; } + var ext = Path.GetExtension(domain); + if (ext.IsNotEmpty() + && ext[1..].ToLowerInvariant() is "json" or "txt" or "xml" or "cfg" or "ini" or "log" or "yaml" or "yml" or "toml") + { + return false; + } + return Uri.CheckHostName(domain) == UriHostNameType.Dns; }