diff --git a/v2rayN/ServiceLib/Models/V2rayConfig.cs b/v2rayN/ServiceLib/Models/V2rayConfig.cs index d9575432..90084b8f 100644 --- a/v2rayN/ServiceLib/Models/V2rayConfig.cs +++ b/v2rayN/ServiceLib/Models/V2rayConfig.cs @@ -343,7 +343,7 @@ public class StreamSettings4Ray public HysteriaSettings4Ray? hysteriaSettings { get; set; } - public List? udpmasks { get; set; } + public FinalMask4Ray? finalmask { get; set; } public Sockopt4Ray? sockopt { get; set; } } @@ -484,13 +484,19 @@ public class HysteriaUdpHop4Ray public int? interval { get; set; } } -public class UdpMasks4Ray +public class FinalMask4Ray { - public string type { get; set; } - public UdpMasksSettings4Ray? settings { get; set; } + public List? tcp { get; set; } + public List? udp { get; set; } } -public class UdpMasksSettings4Ray +public class Mask4Ray +{ + public string type { get; set; } + public MaskSettings4Ray? settings { get; set; } +} + +public class MaskSettings4Ray { public string? password { get; set; } } diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs index 3db5a420..71d3ef6c 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs @@ -512,8 +512,15 @@ public partial class CoreConfigV2rayService streamSettings.hysteriaSettings = hysteriaSettings; if (node.Path.IsNotEmpty()) { - streamSettings.udpmasks = - [new() { type = "salamander", settings = new() { password = node.Path.TrimEx(), } }]; + streamSettings.finalmask ??= new(); + streamSettings.finalmask.udp = + [ + new Mask4Ray + { + type = "salamander", + settings = new MaskSettings4Ray { password = node.Path.TrimEx(), } + } + ]; } break;