mirror of
https://github.com/2dust/v2rayN.git
synced 2026-03-12 19:33:01 +00:00
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
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:
parent
0c13488410
commit
588e82f0d9
2 changed files with 12 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue