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; }