client/web: add visual indication for exit node pending approval (#10532)
Add visual indication when running as an exit node prior to receiving admin approval. Updates https://github.com/tailscale/tailscale/issues/10261 Signed-off-by: Mario Minardi <mario@tailscale.com> Co-authored-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
@ -589,10 +589,11 @@ type nodeData struct {
|
||||
UnraidToken string
|
||||
URLPrefix string // if set, the URL prefix the client is served behind
|
||||
|
||||
UsingExitNode *exitNode
|
||||
AdvertisingExitNode bool
|
||||
AdvertisedRoutes []subnetRoute // excludes exit node routes
|
||||
RunningSSHServer bool
|
||||
UsingExitNode *exitNode
|
||||
AdvertisingExitNode bool
|
||||
AdvertisingExitNodeApproved bool // whether running this node as an exit node has been approved by an admin
|
||||
AdvertisedRoutes []subnetRoute // excludes exit node routes
|
||||
RunningSSHServer bool
|
||||
|
||||
ClientVersion *tailcfg.ClientVersion
|
||||
|
||||
@ -693,6 +694,8 @@ func (s *Server) serveGetNodeData(w http.ResponseWriter, r *http.Request) {
|
||||
return p == route
|
||||
})
|
||||
}
|
||||
data.AdvertisingExitNodeApproved = routeApproved(exitNodeRouteV4) || routeApproved(exitNodeRouteV6)
|
||||
|
||||
for _, r := range prefs.AdvertiseRoutes {
|
||||
if r == exitNodeRouteV4 || r == exitNodeRouteV6 {
|
||||
data.AdvertisingExitNode = true
|
||||
|
Reference in New Issue
Block a user