mirror of https://github.com/2dust/v2rayN
Fill alpns & bug fix
parent
d7cb88f0a4
commit
d76679c2b6
|
@ -172,7 +172,7 @@ namespace v2rayN
|
|||
public static readonly List<string> AllowInsecures = new() { "true", "false", "" };
|
||||
public static readonly List<string> DomainStrategy4Freedoms = new() { "AsIs", "UseIP", "UseIPv4", "UseIPv6", "" };
|
||||
public static readonly List<string> Languages = new() { "zh-Hans", "zh-Hant", "en", "fa-Ir", "ru" };
|
||||
public static readonly List<string> Alpns = new() { "h2", "http/1.1", "h2,http/1.1", "h3", "" };
|
||||
public static readonly List<string> Alpns = new() { "h3", "h2", "http/1.1", "h3,h2,http/1.1", "h3,h2", "h2,http/1.1", "" };
|
||||
public static readonly List<string> LogLevels = new() { "debug", "info", "warning", "error", "none" };
|
||||
public static readonly List<string> InboundTags = new() { "socks", "http", "socks2", "http2" };
|
||||
public static readonly List<string> RuleProtocols = new() { "http", "tls", "bittorrent" };
|
||||
|
|
|
@ -672,34 +672,34 @@ namespace v2rayN.Handler
|
|||
}
|
||||
else if (domain.StartsWith("geosite:"))
|
||||
{
|
||||
if (rule.geosite is null) { rule.geosite = new(); }
|
||||
rule.geosite ??= [];
|
||||
rule.geosite?.Add(domain.Substring(8));
|
||||
}
|
||||
else if (domain.StartsWith("regexp:"))
|
||||
{
|
||||
if (rule.domain_regex is null) { rule.domain_regex = new(); }
|
||||
rule.domain_regex ??= [];
|
||||
rule.domain_regex?.Add(domain.Replace(Global.RoutingRuleComma, ",").Substring(7));
|
||||
}
|
||||
else if (domain.StartsWith("domain:"))
|
||||
{
|
||||
if (rule.domain is null) { rule.domain = new(); }
|
||||
if (rule.domain_suffix is null) { rule.domain_suffix = new(); }
|
||||
rule.domain ??= [];
|
||||
rule.domain_suffix ??= [];
|
||||
rule.domain?.Add(domain.Substring(7));
|
||||
rule.domain_suffix?.Add("." + domain.Substring(7));
|
||||
}
|
||||
else if (domain.StartsWith("full:"))
|
||||
{
|
||||
if (rule.domain is null) { rule.domain = new(); }
|
||||
rule.domain ??= [];
|
||||
rule.domain?.Add(domain.Substring(5));
|
||||
}
|
||||
else if (domain.StartsWith("keyword:"))
|
||||
{
|
||||
if (rule.domain_keyword is null) { rule.domain_keyword = new(); }
|
||||
rule.domain_keyword ??= [];
|
||||
rule.domain_keyword?.Add(domain.Substring(8));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rule.domain_keyword is null) { rule.domain_keyword = new(); }
|
||||
rule.domain_keyword ??= [];
|
||||
rule.domain_keyword?.Add(domain);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ namespace v2rayN.Handler
|
|||
return 0;
|
||||
}
|
||||
|
||||
private int GenRoutingUserRule(RulesItem4Ray rules, V2rayConfig v2rayConfig)
|
||||
private int GenRoutingUserRule(RulesItem4Ray? rules, V2rayConfig v2rayConfig)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -879,7 +879,7 @@ namespace v2rayN.Handler
|
|||
item.address = url.IdnHost;
|
||||
item.port = url.Port;
|
||||
item.remarks = url.GetComponents(UriComponents.Fragment, UriFormat.Unescaped);
|
||||
item.id = Utils.UrlDecode(url.UserInfo);
|
||||
item.id = Utils.UrlDecode(url.UserInfo);
|
||||
|
||||
var query = Utils.ParseQueryString(url.Query);
|
||||
ResolveStdTransport(query, ref item);
|
||||
|
|
Loading…
Reference in New Issue