@ -739,14 +739,15 @@ func (s *Server) serveGetNodeData(w http.ResponseWriter, r *http.Request) {
}
}
func availableFeatures ( ) map [ string ] bool {
func availableFeatures ( ) map [ string ] bool {
env := hostinfo . GetEnvType ( )
features := map [ string ] bool {
features := map [ string ] bool {
"advertise-exit-node" : true , // available on all platforms
"advertise-exit-node" : true , // available on all platforms
"advertise-routes" : true , // available on all platforms
"advertise-routes" : true , // available on all platforms
"use-exit-node" : distro . Get ( ) != distro . Synology , // see https://github.com/tailscale/tailscale/issues/1995
"use-exit-node" : canUseExitNode ( env ) == nil ,
"ssh" : envknob . CanRunTailscaleSSH ( ) == nil ,
"ssh" : envknob . CanRunTailscaleSSH ( ) == nil ,
"auto-update" : version . IsUnstableBuild ( ) && clientupdate . CanAutoUpdate ( ) ,
"auto-update" : version . IsUnstableBuild ( ) && clientupdate . CanAutoUpdate ( ) ,
}
}
if hostinfo. G etE nvType( ) == hostinfo . HomeAssistantAddOn {
if env == hostinfo . HomeAssistantAddOn {
// Setting SSH on Home Assistant causes trouble on startup
// Setting SSH on Home Assistant causes trouble on startup
// (since the flag is not being passed to `tailscale up`).
// (since the flag is not being passed to `tailscale up`).
// Although Tailscale SSH does work here,
// Although Tailscale SSH does work here,
@ -756,6 +757,19 @@ func availableFeatures() map[string]bool {
return features
return features
}
}
func canUseExitNode ( env hostinfo . EnvType ) error {
switch dist := distro . Get ( ) ; dist {
case distro . Synology , // see https://github.com/tailscale/tailscale/issues/1995
distro . QNAP ,
distro . Unraid :
return fmt . Errorf ( "Tailscale exit nodes cannot be used on %s." , dist )
}
if env == hostinfo . HomeAssistantAddOn {
return errors . New ( "Tailscale exit nodes cannot be used on Home Assistant." )
}
return nil
}
// aclsAllowAccess returns whether tailnet ACLs (as expressed in the provided filter rules)
// aclsAllowAccess returns whether tailnet ACLs (as expressed in the provided filter rules)
// permit any devices to access the local web client.
// permit any devices to access the local web client.
// This does not currently check whether a specific device can connect, just any device.
// This does not currently check whether a specific device can connect, just any device.