mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-09 22:15:00 +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()
|
public static readonly Dictionary<string, string> KcpHeaderMaskMap = new()
|
||||||
{
|
{
|
||||||
{ "srtp", "header-srtp" },
|
{ "srtp", "srtp" },
|
||||||
{ "utp", "header-utp" },
|
{ "utp", "utp" },
|
||||||
{ "wechat-video", "header-wechat" },
|
{ "wechat-video", "wechat" },
|
||||||
{ "dtls", "header-dtls" },
|
{ "dtls", "dtls" },
|
||||||
{ "wireguard", "header-wireguard" },
|
{ "wireguard", "wireguard" },
|
||||||
{ "dns", "header-dns" }
|
{ "dns", "dns" }
|
||||||
};
|
};
|
||||||
|
|
||||||
public static readonly List<string> CoreTypes =
|
public static readonly List<string> CoreTypes =
|
||||||
|
|||||||
@@ -501,8 +501,10 @@ public class Mask4Ray
|
|||||||
|
|
||||||
public class MaskSettings4Ray
|
public class MaskSettings4Ray
|
||||||
{
|
{
|
||||||
|
public string? header { get; set; }
|
||||||
|
public string? value { get; set; }
|
||||||
|
|
||||||
public string? password { get; set; }
|
public string? password { get; set; }
|
||||||
public string? domain { get; set; }
|
|
||||||
|
|
||||||
// fragment
|
// fragment
|
||||||
public string? packets { get; set; }
|
public string? packets { get; set; }
|
||||||
|
|||||||
@@ -465,8 +465,8 @@ public partial class CoreConfigV2rayService
|
|||||||
[
|
[
|
||||||
new Mask4Ray
|
new Mask4Ray
|
||||||
{
|
{
|
||||||
type = header,
|
type = "mkcp-legacy",
|
||||||
settings = null
|
settings = new MaskSettings4Ray { header = header },
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -475,15 +475,15 @@ public partial class CoreConfigV2rayService
|
|||||||
{
|
{
|
||||||
kcpFinalmask.udp.Add(new Mask4Ray
|
kcpFinalmask.udp.Add(new Mask4Ray
|
||||||
{
|
{
|
||||||
type = "mkcp-original"
|
type = "mkcp-legacy",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
kcpFinalmask.udp.Add(new Mask4Ray
|
kcpFinalmask.udp.Add(new Mask4Ray
|
||||||
{
|
{
|
||||||
type = "mkcp-aes128gcm",
|
type = "mkcp-legacy",
|
||||||
settings = new MaskSettings4Ray { password = kcpSeed }
|
settings = new MaskSettings4Ray { value = kcpSeed },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
streamSettings.kcpSettings = kcpSettings;
|
streamSettings.kcpSettings = kcpSettings;
|
||||||
|
|||||||
Reference in New Issue
Block a user