mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 21:23:04 +00:00
Add xray v26.1.31 hysteria2 support
This commit is contained in:
parent
d589713fd5
commit
e0402a03cd
2 changed files with 20 additions and 7 deletions
|
|
@ -343,7 +343,7 @@ public class StreamSettings4Ray
|
|||
|
||||
public HysteriaSettings4Ray? hysteriaSettings { get; set; }
|
||||
|
||||
public List<UdpMasks4Ray>? 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<Mask4Ray>? tcp { get; set; }
|
||||
public List<Mask4Ray>? 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; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue