Add sing-box ech query server name (#8869)

This commit is contained in:
DHR60 2026-03-21 08:55:43 +00:00 committed by GitHub
parent 04783ecf44
commit bbfd93f5a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -744,13 +744,12 @@ public partial class CoreConfigSingboxService
}, null); }, null);
} }
var idx = echConfig.IndexOf('+'); var idx = echConfig.IndexOf('+');
// NOTE: query_server_name, since sing-box 1.13.0 var queryServerName = idx > 0 ? echConfig[..idx] : null;
//var queryServerName = idx > 0 ? echConfig[..idx] : null;
var echDnsServer = idx > 0 ? echConfig[(idx + 1)..] : echConfig; var echDnsServer = idx > 0 ? echConfig[(idx + 1)..] : echConfig;
return (new Ech4Sbox() return (new Ech4Sbox()
{ {
enabled = true, enabled = true,
query_server_name = null, query_server_name = queryServerName,
}, ParseDnsAddress(echDnsServer)); }, ParseDnsAddress(echDnsServer));
} }
} }