From 023d9dd3ef3469b7eef721ab6747216ec6247941 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Sun, 30 Jan 2022 16:26:32 -0500 Subject: [PATCH] udp hole punch --- netclient/wireguard/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netclient/wireguard/common.go b/netclient/wireguard/common.go index 8046191c..29217a96 100644 --- a/netclient/wireguard/common.go +++ b/netclient/wireguard/common.go @@ -291,7 +291,7 @@ func WriteWgConfig(node *models.Node, privateKey string, peers []wgtypes.PeerCon } wireguard := ini.Empty(options) wireguard.Section(section_interface).Key("PrivateKey").SetValue(privateKey) - if node.ListenPort > 0 { + if node.ListenPort > 0 && node.UDPHolePunch != "yes" { wireguard.Section(section_interface).Key("ListenPort").SetValue(strconv.Itoa(int(node.ListenPort))) } if node.Address != "" {