Support new kcp config (#9477)

This commit is contained in:
DHR60
2026-06-05 07:08:57 +00:00
committed by GitHub
parent da65faa49f
commit abcdd9497c
3 changed files with 14 additions and 12 deletions

View File

@@ -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 =

View File

@@ -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; }

View File

@@ -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;