Skip to content

Commit 1ca2485

Browse files
authored
1 parent cc4154b commit 1ca2485

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

v2rayN/ServiceLib/Handler/Fmt/ShadowsocksFmt.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ public class ShadowsocksFmt : BaseFmt
230230
if (!host.IsNullOrEmpty())
231231
{
232232
item.RequestHost = host.Replace("host=", "");
233+
item.Sni = item.RequestHost;
233234
}
234235
if (!path.IsNullOrEmpty())
235236
{

v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,15 @@ private async Task<int> GenOutbound(ProfileItem node, Outbounds4Ray outbound)
180180
}
181181
case EConfigType.WireGuard:
182182
{
183+
var address = node.Address;
184+
if (Utils.IsIpv6(address))
185+
{
186+
address = $"[{address}]";
187+
}
183188
var peer = new WireguardPeer4Ray
184189
{
185190
publicKey = node.PublicKey,
186-
endpoint = node.Address + ":" + node.Port.ToString()
191+
endpoint = address + ":" + node.Port.ToString()
187192
};
188193
var setting = new Outboundsettings4Ray
189194
{

0 commit comments

Comments
 (0)