mirror of
https://github.com/2dust/v2rayN.git
synced 2026-03-30 20:17:41 +00:00
Protect xhttp split address (#8970)
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / deb (push) Blocked by required conditions
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / deb (push) Blocked by required conditions
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
This commit is contained in:
parent
194c240243
commit
2caec729fc
1 changed files with 15 additions and 0 deletions
|
|
@ -322,6 +322,7 @@ public class CoreConfigContextBuilder
|
||||||
context.ProtectDomainList.Add(address);
|
context.ProtectDomainList.Add(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ech query server name protect
|
||||||
if (!node.EchConfigList.IsNullOrEmpty())
|
if (!node.EchConfigList.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
var echQuerySni = node.Sni;
|
var echQuerySni = node.Sni;
|
||||||
|
|
@ -338,6 +339,20 @@ public class CoreConfigContextBuilder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// xhttp downloadSettings address protect
|
||||||
|
if (!string.IsNullOrEmpty(node.Extra)
|
||||||
|
&& JsonUtils.ParseJson(node.Extra) is JsonObject extra
|
||||||
|
&& extra.TryGetPropertyValue("downloadSettings", out var dsNode)
|
||||||
|
&& dsNode is JsonObject downloadSettings
|
||||||
|
&& downloadSettings.TryGetPropertyValue("address", out var dAddrNode)
|
||||||
|
&& dAddrNode is JsonValue dAddrValue
|
||||||
|
&& dAddrValue.TryGetValue(out string? dAddr)
|
||||||
|
&& !string.IsNullOrEmpty(dAddr)
|
||||||
|
&& Utils.IsDomain(dAddr))
|
||||||
|
{
|
||||||
|
context.ProtectDomainList.Add(dAddr);
|
||||||
|
}
|
||||||
|
|
||||||
return nodeValidatorResult;
|
return nodeValidatorResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue