From 09250ae30480289fa76509c653c9639c8c638cf9 Mon Sep 17 00:00:00 2001 From: DHR60 Date: Wed, 28 May 2025 20:39:20 +0800 Subject: [PATCH] Removes Wireguard listen port --- v2rayN/ServiceLib/Models/SingboxConfig.cs | 2 +- .../ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/Models/SingboxConfig.cs b/v2rayN/ServiceLib/Models/SingboxConfig.cs index 93393476..e8166482 100644 --- a/v2rayN/ServiceLib/Models/SingboxConfig.cs +++ b/v2rayN/ServiceLib/Models/SingboxConfig.cs @@ -153,7 +153,7 @@ public class Endpoints4Sbox : BaseServer4Sbox public int? mtu { get; set; } public List address { get; set; } public string private_key { get; set; } - public int listen_port { get; set; } + public int? listen_port { get; set; } public string? udp_timeout { get; set; } public int? workers { get; set; } public List peers { get; set; } diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs index 76af2a64..0fe12b8d 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs @@ -785,7 +785,6 @@ public class CoreConfigSingboxService try { endpoint.address = Utils.String2List(node.RequestHost); - endpoint.listen_port = Utils.GetFreePort(); endpoint.type = Global.ProtocolTypes[node.ConfigType]; if (Utils.IsDomain(node.Address))