Skip to content

Commit

Permalink
Add kcp DNS masquerade support (#6852)
Browse files Browse the repository at this point in the history
* Add kcp DNS masquerade support

* Update V2rayConfig.cs

* Update CoreConfigV2rayService.cs

---------

Co-authored-by: 2dust <[email protected]>
  • Loading branch information
DHR60 and 2dust authored Mar 4, 2025
1 parent 7fbb001 commit 859299c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion v2rayN/ServiceLib/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ public class Global
"utp",
"wechat-video",
"dtls",
"wireguard"
"wireguard",
"dns"
];

public static readonly List<string> CoreTypes =
Expand Down
2 changes: 2 additions & 0 deletions v2rayN/ServiceLib/Models/V2rayConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,8 @@ private async Task<int> 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))
{
Expand Down

0 comments on commit 859299c

Please sign in to comment.