mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-10 11:12:25 +08:00
add gw listen port (#2931)
This commit is contained in:
@@ -72,6 +72,7 @@ type UserRemoteGws struct {
|
|||||||
IsInternetGateway bool `json:"is_internet_gateway"`
|
IsInternetGateway bool `json:"is_internet_gateway"`
|
||||||
GwClient ExtClient `json:"gw_client"`
|
GwClient ExtClient `json:"gw_client"`
|
||||||
GwPeerPublicKey string `json:"gw_peer_public_key"`
|
GwPeerPublicKey string `json:"gw_peer_public_key"`
|
||||||
|
GwListenPort int `json:"gw_listen_port"`
|
||||||
Metadata string `json:"metadata"`
|
Metadata string `json:"metadata"`
|
||||||
AllowedEndpoints []string `json:"allowed_endpoints"`
|
AllowedEndpoints []string `json:"allowed_endpoints"`
|
||||||
}
|
}
|
||||||
|
@@ -10,8 +10,8 @@ import (
|
|||||||
"github.com/gravitl/netmaker/logger"
|
"github.com/gravitl/netmaker/logger"
|
||||||
"github.com/gravitl/netmaker/logic"
|
"github.com/gravitl/netmaker/logic"
|
||||||
"github.com/gravitl/netmaker/models"
|
"github.com/gravitl/netmaker/models"
|
||||||
"github.com/gravitl/netmaker/pro/auth"
|
|
||||||
"github.com/gravitl/netmaker/mq"
|
"github.com/gravitl/netmaker/mq"
|
||||||
|
"github.com/gravitl/netmaker/pro/auth"
|
||||||
"github.com/gravitl/netmaker/servercfg"
|
"github.com/gravitl/netmaker/servercfg"
|
||||||
"golang.org/x/exp/slog"
|
"golang.org/x/exp/slog"
|
||||||
)
|
)
|
||||||
@@ -226,6 +226,7 @@ func getUserRemoteAccessGws(w http.ResponseWriter, r *http.Request) {
|
|||||||
Connected: true,
|
Connected: true,
|
||||||
IsInternetGateway: node.IsInternetGateway,
|
IsInternetGateway: node.IsInternetGateway,
|
||||||
GwPeerPublicKey: host.PublicKey.String(),
|
GwPeerPublicKey: host.PublicKey.String(),
|
||||||
|
GwListenPort: logic.GetPeerListenPort(host),
|
||||||
Metadata: node.Metadata,
|
Metadata: node.Metadata,
|
||||||
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
||||||
})
|
})
|
||||||
@@ -242,6 +243,7 @@ func getUserRemoteAccessGws(w http.ResponseWriter, r *http.Request) {
|
|||||||
Connected: true,
|
Connected: true,
|
||||||
IsInternetGateway: node.IsInternetGateway,
|
IsInternetGateway: node.IsInternetGateway,
|
||||||
GwPeerPublicKey: host.PublicKey.String(),
|
GwPeerPublicKey: host.PublicKey.String(),
|
||||||
|
GwListenPort: logic.GetPeerListenPort(host),
|
||||||
Metadata: node.Metadata,
|
Metadata: node.Metadata,
|
||||||
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
||||||
})
|
})
|
||||||
@@ -276,6 +278,7 @@ func getUserRemoteAccessGws(w http.ResponseWriter, r *http.Request) {
|
|||||||
Network: node.Network,
|
Network: node.Network,
|
||||||
IsInternetGateway: node.IsInternetGateway,
|
IsInternetGateway: node.IsInternetGateway,
|
||||||
GwPeerPublicKey: host.PublicKey.String(),
|
GwPeerPublicKey: host.PublicKey.String(),
|
||||||
|
GwListenPort: logic.GetPeerListenPort(host),
|
||||||
Metadata: node.Metadata,
|
Metadata: node.Metadata,
|
||||||
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
||||||
})
|
})
|
||||||
@@ -304,6 +307,7 @@ func getUserRemoteAccessGws(w http.ResponseWriter, r *http.Request) {
|
|||||||
Network: node.Network,
|
Network: node.Network,
|
||||||
IsInternetGateway: node.IsInternetGateway,
|
IsInternetGateway: node.IsInternetGateway,
|
||||||
GwPeerPublicKey: host.PublicKey.String(),
|
GwPeerPublicKey: host.PublicKey.String(),
|
||||||
|
GwListenPort: logic.GetPeerListenPort(host),
|
||||||
Metadata: node.Metadata,
|
Metadata: node.Metadata,
|
||||||
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
AllowedEndpoints: getAllowedRagEndpoints(&node, host),
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user