Selaa lähdekoodia

sync stun setting in peerUpdate

Max Ma 9 kuukautta sitten
vanhempi
commit
d7bd9938f5
2 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 1 0
      logic/peers.go
  2. 1 0
      models/mqtt.go

+ 1 - 0
logic/peers.go

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

+ 1 - 0
models/mqtt.go

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