Add kcp DNS masquerade support

This commit is contained in:
DHR60 2025-03-03 22:59:41 +08:00
parent 7fbb0013b0
commit 68076ba3ab
3 changed files with 6 additions and 2 deletions

View file

@ -265,7 +265,8 @@ namespace ServiceLib
"utp", "utp",
"wechat-video", "wechat-video",
"dtls", "dtls",
"wireguard" "wireguard",
"dns"
]; ];
public static readonly List<string> CoreTypes = public static readonly List<string> CoreTypes =

View file

@ -291,6 +291,8 @@ namespace ServiceLib.Models
public object request { get; set; } public object request { get; set; }
public object response { get; set; } public object response { get; set; }
public string domain { get; set; }
} }
public class KcpSettings4Ray public class KcpSettings4Ray

View file

@ -915,7 +915,8 @@ namespace ServiceLib.Services.CoreConfig
kcpSettings.writeBufferSize = _config.KcpItem.WriteBufferSize; kcpSettings.writeBufferSize = _config.KcpItem.WriteBufferSize;
kcpSettings.header = new Header4Ray kcpSettings.header = new Header4Ray
{ {
type = node.HeaderType type = node.HeaderType,
domain = host
}; };
if (Utils.IsNotEmpty(path)) if (Utils.IsNotEmpty(path))
{ {