mirror of
https://github.com/2dust/v2rayN.git
synced 2026-08-04 06:12:05 +03:00
Support new kcp config (#9477)
This commit is contained in:
@@ -330,12 +330,12 @@ public class Global
|
||||
|
||||
public static readonly Dictionary<string, string> KcpHeaderMaskMap = new()
|
||||
{
|
||||
{ "srtp", "header-srtp" },
|
||||
{ "utp", "header-utp" },
|
||||
{ "wechat-video", "header-wechat" },
|
||||
{ "dtls", "header-dtls" },
|
||||
{ "wireguard", "header-wireguard" },
|
||||
{ "dns", "header-dns" }
|
||||
{ "srtp", "srtp" },
|
||||
{ "utp", "utp" },
|
||||
{ "wechat-video", "wechat" },
|
||||
{ "dtls", "dtls" },
|
||||
{ "wireguard", "wireguard" },
|
||||
{ "dns", "dns" }
|
||||
};
|
||||
|
||||
public static readonly List<string> CoreTypes =
|
||||
|
||||
@@ -501,8 +501,10 @@ public class Mask4Ray
|
||||
|
||||
public class MaskSettings4Ray
|
||||
{
|
||||
public string? header { get; set; }
|
||||
public string? value { get; set; }
|
||||
|
||||
public string? password { get; set; }
|
||||
public string? domain { get; set; }
|
||||
|
||||
// fragment
|
||||
public string? packets { get; set; }
|
||||
|
||||
@@ -465,8 +465,8 @@ public partial class CoreConfigV2rayService
|
||||
[
|
||||
new Mask4Ray
|
||||
{
|
||||
type = header,
|
||||
settings = null
|
||||
type = "mkcp-legacy",
|
||||
settings = new MaskSettings4Ray { header = header },
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -475,15 +475,15 @@ public partial class CoreConfigV2rayService
|
||||
{
|
||||
kcpFinalmask.udp.Add(new Mask4Ray
|
||||
{
|
||||
type = "mkcp-original"
|
||||
type = "mkcp-legacy",
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
kcpFinalmask.udp.Add(new Mask4Ray
|
||||
{
|
||||
type = "mkcp-aes128gcm",
|
||||
settings = new MaskSettings4Ray { password = kcpSeed }
|
||||
type = "mkcp-legacy",
|
||||
settings = new MaskSettings4Ray { value = kcpSeed },
|
||||
});
|
||||
}
|
||||
streamSettings.kcpSettings = kcpSettings;
|
||||
|
||||
Reference in New Issue
Block a user