-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should "Run exit node" GUI checkboxes also prevent computer from sleeping? #3574
Comments
I don't think it should be a separate checkbox. If you run as an exit node, sleep should be disabled. But I would be fine with shipping the first version without that, just with a warning. |
Yeah, having an app that prevents your computer from sleeping but is not purpose-built for that effect is really unexpected, despite making total sense for this one feature. I would definitely give a warning, whether we are preventing sleep or not. |
Then next questions:
|
On macOS, I/O kit can do it but I have no idea if we can use it from inside the sandbox. https://developer.apple.com/library/archive/qa/qa1340/_index.html |
Definitely possible from the sandbox, there are a few Mac App Store apps that provide this functionality. I'll have to take a look at various approaches to see if it is something that can be shared between all variants. My gut says |
And is there a way to listen for sleep requests from the OS? This way a notification from tailscale could say But also, I can think of times where I have tailscale in use as an exit node on my field laptop (for my home network to see what my laptop sees) but I still want my laptop to sleep when I close the lid. |
Or there should just be a small note under the use as exit-node checkbox reminding the user to disable sleep on host OS. This way tailscale doesn't have to police the OS. Leaving tailscale to worry about tailscale |
PowerToys Awake may be a helpful reference for Windows: https://github.com/microsoft/PowerToys/tree/main/src/modules/awake |
It'd be great if Tailscale could prevent a machine from sleeping more generally if there is any meaningful incoming traffic (other than keep-alive pings), not necessarily only when used as exit node. This is useful when one wants to connect through Tailnet to the machine, e.g. SSH, SMB, etc. At least on macOS, currently incoming Tailscale traffic doesn't seem to prevent macOS from sleeping and cutting of any incoming SSH or SMB connections through Tailscale. This is different if the incoming connections come from the LAN which aren't cut off. Currently, one workaround is having at least one other always-on machine in the LAN that proxies the traffic. This could be done either through Tailscale like on a Raspberry Pi or going back to a traditional Wireguard VPN like on the router itself. Though maybe SSH or SMB connections create traffic too intermittently before the machine goes to sleep again, so the issue I'm seeing may actually be waking up on incoming Tailscale traffic as discussed in #306. But it still feels like a sleep problem and a "prevent sleep" checkbox would mostly alleviate it, apart from the initial wake up which would still need the workaround and the chore to keep toggling a checkbox. |
Unlike startup apps, most OSs don't have a GUI method to view apps that are setup to block sleeping/shutdown. This is why if this feature is to be implemented, the OS would need to tell the user which app (tailscale) is blocking it from doing its job. |
Tailscale 1.20 on both Windows and Mac will support a "Run exit node" checkbox.
I bet the first support requests we get will be people losing access to them when their desktops at home go to sleep.
Should running an exit node (or subnet router) prevent the computer from sleeping?
Should that be a separate checkbox?
Should we just warn people about them and have them use a separate app (like Caffeine etc)?
/cc @crawshaw @DentonGentry @mayakacz @tailscale/frontend
The text was updated successfully, but these errors were encountered: