mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-03 11:02:11 +08:00
udp hole punch
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user