mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 23:54:22 +08:00
remove additional port field
This commit is contained in:
parent
60ddad3189
commit
20cf3b00bc
3 changed files with 11 additions and 15 deletions
|
@ -94,10 +94,9 @@ func GetProxyUpdateForHost(ctx context.Context, host *models.Host) (models.Proxy
|
|||
var found bool
|
||||
if currPeerConf, found = peerConfMap[peerHost.PublicKey.String()]; !found {
|
||||
currPeerConf = models.PeerConf{
|
||||
Proxy: peerHost.ProxyEnabled,
|
||||
PublicListenPort: int32(GetPeerListenPort(peerHost)),
|
||||
ProxyListenPort: GetProxyListenPort(peerHost),
|
||||
ProxyPublicListenPort: peerHost.PublicListenPort,
|
||||
Proxy: peerHost.ProxyEnabled,
|
||||
PublicListenPort: int32(GetPeerListenPort(peerHost)),
|
||||
ProxyListenPort: GetProxyListenPort(peerHost),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,15 +35,14 @@ type RelayedConf struct {
|
|||
|
||||
// PeerConf - struct for peer config in the network
|
||||
type PeerConf struct {
|
||||
Proxy bool `json:"proxy"`
|
||||
PublicListenPort int32 `json:"public_listen_port"`
|
||||
ProxyListenPort int `json:"proxy_listen_port"`
|
||||
ProxyPublicListenPort int `json:"proxy_public_listen_port"`
|
||||
IsExtClient bool `json:"is_ext_client"`
|
||||
Address net.IP `json:"address"`
|
||||
ExtInternalIp net.IP `json:"ext_internal_ip"`
|
||||
IsRelayed bool `json:"is_relayed"`
|
||||
RelayedTo *net.UDPAddr `json:"relayed_to"`
|
||||
Proxy bool `json:"proxy"`
|
||||
PublicListenPort int32 `json:"public_listen_port"`
|
||||
ProxyListenPort int `json:"proxy_listen_port"`
|
||||
IsExtClient bool `json:"is_ext_client"`
|
||||
Address net.IP `json:"address"`
|
||||
ExtInternalIp net.IP `json:"ext_internal_ip"`
|
||||
IsRelayed bool `json:"is_relayed"`
|
||||
RelayedTo *net.UDPAddr `json:"relayed_to"`
|
||||
}
|
||||
|
||||
// ProxyManagerPayload - struct for proxy manager payload
|
||||
|
|
|
@ -88,7 +88,6 @@ func PublishSingleHostPeerUpdate(ctx context.Context, host *models.Host, deleted
|
|||
if len(peerUpdate.Peers) == 0 { // no peers to send
|
||||
return nil
|
||||
}
|
||||
//if host.ProxyEnabled {
|
||||
proxyUpdate, err := logic.GetProxyUpdateForHost(ctx, host)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -96,7 +95,6 @@ func PublishSingleHostPeerUpdate(ctx context.Context, host *models.Host, deleted
|
|||
proxyUpdate.Server = servercfg.GetServer()
|
||||
proxyUpdate.Action = models.ProxyUpdate
|
||||
peerUpdate.ProxyUpdate = proxyUpdate
|
||||
//}
|
||||
|
||||
data, err := json.Marshal(&peerUpdate)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue