File tree Expand file tree Collapse file tree
v2rayN/ServiceLib/Handler/Builder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,6 +322,7 @@ private static NodeValidatorResult RegisterSingleNodeAsync(CoreConfigContext con
322322 context . ProtectDomainList . Add ( address ) ;
323323 }
324324
325+ // ech query server name protect
325326 if ( ! node . EchConfigList . IsNullOrEmpty ( ) )
326327 {
327328 var echQuerySni = node . Sni ;
@@ -338,6 +339,20 @@ private static NodeValidatorResult RegisterSingleNodeAsync(CoreConfigContext con
338339 }
339340 }
340341
342+ // xhttp downloadSettings address protect
343+ if ( ! string . IsNullOrEmpty ( node . Extra )
344+ && JsonUtils . ParseJson ( node . Extra ) is JsonObject extra
345+ && extra . TryGetPropertyValue ( "downloadSettings" , out var dsNode )
346+ && dsNode is JsonObject downloadSettings
347+ && downloadSettings . TryGetPropertyValue ( "address" , out var dAddrNode )
348+ && dAddrNode is JsonValue dAddrValue
349+ && dAddrValue . TryGetValue ( out string ? dAddr )
350+ && ! string . IsNullOrEmpty ( dAddr )
351+ && Utils . IsDomain ( dAddr ) )
352+ {
353+ context . ProtectDomainList . Add ( dAddr ) ;
354+ }
355+
341356 return nodeValidatorResult ;
342357 }
343358
You can’t perform that action at this time.
0 commit comments