Tun ech protect (#8915)
Some checks are pending
release Linux / build (Release) (push) Waiting to run
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:
DHR60 2026-03-10 01:16:16 +00:00 committed by GitHub
parent 0c13488410
commit 588e82f0d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 3 deletions

View file

@ -360,6 +360,7 @@ public class TlsSettings4Ray
public bool? disableSystemRoot { get; set; } public bool? disableSystemRoot { get; set; }
public string? echConfigList { get; set; } public string? echConfigList { get; set; }
public string? echForceQuery { get; set; } public string? echForceQuery { get; set; }
public Sockopt4Ray? echSockopt { get; set; }
} }
public class CertificateSettings4Ray public class CertificateSettings4Ray

View file

@ -316,12 +316,20 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
SsMethod = Global.None, SsMethod = Global.None,
}); });
foreach (var outbound in _coreConfig.outbounds.Where(outbound => outbound.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true)) foreach (var outbound in _coreConfig.outbounds
.Where(o => o.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true))
{ {
outbound.streamSettings ??= new StreamSettings4Ray(); outbound.streamSettings ??= new();
outbound.streamSettings.sockopt ??= new Sockopt4Ray(); outbound.streamSettings.sockopt ??= new();
outbound.streamSettings.sockopt.dialerProxy = "tun-project-ss"; outbound.streamSettings.sockopt.dialerProxy = "tun-project-ss";
} }
// ech protected
foreach (var outbound in _coreConfig.outbounds
.Where(outbound => outbound.streamSettings?.tlsSettings?.echConfigList?.IsNullOrEmpty() == false))
{
outbound.streamSettings!.tlsSettings!.echSockopt ??= new();
outbound.streamSettings.tlsSettings.echSockopt.dialerProxy = "tun-project-ss";
}
_coreConfig.outbounds.Add(new CoreConfigV2rayService(context with _coreConfig.outbounds.Add(new CoreConfigV2rayService(context with
{ {
Node = protectNode, Node = protectNode,