2
0
Эх сурвалжийг харах

sync stun setting in peerUpdate

Max Ma 9 сар өмнө
parent
commit
d7bd9938f5

+ 1 - 0
logic/peers.go

@@ -426,6 +426,7 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
 	}
 	}
 
 
 	hostPeerUpdate.ManageDNS = servercfg.GetManageDNS()
 	hostPeerUpdate.ManageDNS = servercfg.GetManageDNS()
+	hostPeerUpdate.Stun = servercfg.IsStunEnabled()
 	return hostPeerUpdate, nil
 	return hostPeerUpdate, nil
 }
 }
 
 

+ 1 - 0
models/mqtt.go

@@ -25,6 +25,7 @@ type HostPeerUpdate struct {
 	ReplacePeers      bool                  `json:"replace_peers"`
 	ReplacePeers      bool                  `json:"replace_peers"`
 	EndpointDetection bool                  `json:"endpoint_detection"`
 	EndpointDetection bool                  `json:"endpoint_detection"`
 	ManageDNS         bool                  `yaml:"manage_dns"`
 	ManageDNS         bool                  `yaml:"manage_dns"`
+	Stun              bool                  `yaml:"stun"`
 }
 }
 
 
 type FwRule struct {
 type FwRule struct {