Explorar o código

udp hole punch

afeiszli %!s(int64=3) %!d(string=hai) anos
pai
achega
023d9dd3ef
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netclient/wireguard/common.go

+ 1 - 1
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 != "" {