mirror of
https://github.com/tailscale/tailscale.git
synced 2025-06-29 03:28:41 +00:00
envknob/featureknob: restore SSH and exit-node capability for Home Assistant (#16263)
SSH was disabled in #10538 Exit node was disabled in #13726 This enables ssh and exit-node options in case of Home Assistant. Fixes #15552 Signed-off-by: Laszlo Magyar <lmagyar1973@gmail.com>
This commit is contained in:
parent
b75fe9eeca
commit
35b11e7be5
@ -10,7 +10,6 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"tailscale.com/envknob"
|
"tailscale.com/envknob"
|
||||||
"tailscale.com/hostinfo"
|
|
||||||
"tailscale.com/version"
|
"tailscale.com/version"
|
||||||
"tailscale.com/version/distro"
|
"tailscale.com/version/distro"
|
||||||
)
|
)
|
||||||
@ -26,14 +25,6 @@ func CanRunTailscaleSSH() error {
|
|||||||
if distro.Get() == distro.QNAP && !envknob.UseWIPCode() {
|
if distro.Get() == distro.QNAP && !envknob.UseWIPCode() {
|
||||||
return errors.New("The Tailscale SSH server does not run on QNAP.")
|
return errors.New("The Tailscale SSH server does not run on QNAP.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setting SSH on Home Assistant causes trouble on startup
|
|
||||||
// (since the flag is not being passed to `tailscale up`).
|
|
||||||
// Although Tailscale SSH does work here,
|
|
||||||
// it's not terribly useful since it's running in a separate container.
|
|
||||||
if hostinfo.GetEnvType() == hostinfo.HomeAssistantAddOn {
|
|
||||||
return errors.New("The Tailscale SSH server does not run on HomeAssistant.")
|
|
||||||
}
|
|
||||||
// otherwise okay
|
// otherwise okay
|
||||||
case "darwin":
|
case "darwin":
|
||||||
// okay only in tailscaled mode for now.
|
// okay only in tailscaled mode for now.
|
||||||
@ -58,10 +49,5 @@ func CanUseExitNode() error {
|
|||||||
distro.QNAP:
|
distro.QNAP:
|
||||||
return errors.New("Tailscale exit nodes cannot be used on " + string(dist))
|
return errors.New("Tailscale exit nodes cannot be used on " + string(dist))
|
||||||
}
|
}
|
||||||
|
|
||||||
if hostinfo.GetEnvType() == hostinfo.HomeAssistantAddOn {
|
|
||||||
return errors.New("Tailscale exit nodes cannot be used on HomeAssistant.")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user