diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 48df5d2240d..f962efe1a3f 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -265,7 +265,8 @@ public class Global "utp", "wechat-video", "dtls", - "wireguard" + "wireguard", + "dns" ]; public static readonly List CoreTypes = diff --git a/v2rayN/ServiceLib/Models/V2rayConfig.cs b/v2rayN/ServiceLib/Models/V2rayConfig.cs index b6ecf52b4ce..e3fa0fd3e84 100644 --- a/v2rayN/ServiceLib/Models/V2rayConfig.cs +++ b/v2rayN/ServiceLib/Models/V2rayConfig.cs @@ -291,6 +291,8 @@ public class Header4Ray public object request { get; set; } public object response { get; set; } + + public string? domain { get; set; } } public class KcpSettings4Ray diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs index 46c99e97cef..f07a9c940b0 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs @@ -915,7 +915,8 @@ private async Task GenBoundStreamSettings(ProfileItem node, Outbounds4Ray o kcpSettings.writeBufferSize = _config.KcpItem.WriteBufferSize; kcpSettings.header = new Header4Ray { - type = node.HeaderType + type = node.HeaderType, + domain = host.IsNullOrEmpty() ? null : host }; if (Utils.IsNotEmpty(path)) {