mirror of
https://github.com/2dust/v2rayN.git
synced 2026-09-29 18:12:08 +03:00
Ignore json file extensions in IsDomain
This commit is contained in:
@@ -497,6 +497,13 @@ public class Utils
|
|||||||
return false;
|
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;
|
return Uri.CheckHostName(domain) == UriHostNameType.Dns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user