mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-20 09:57:31 +00:00
client/systray: allow specifying tailscaled socket
Pass a local.Client to systray.Run, so we can use the existing global localClient in the cmd/tailscale CLI. Add socket flag to cmd/systray. Updates #1708 Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
@@ -7,9 +7,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
||||
"tailscale.com/client/local"
|
||||
"tailscale.com/client/systray"
|
||||
"tailscale.com/paths"
|
||||
)
|
||||
|
||||
var socket = flag.String("socket", paths.DefaultTailscaledSocket(), "path to tailscaled socket")
|
||||
|
||||
func main() {
|
||||
new(systray.Menu).Run()
|
||||
flag.Parse()
|
||||
lc := &local.Client{Socket: *socket}
|
||||
new(systray.Menu).Run(lc)
|
||||
}
|
||||
|
Reference in New Issue
Block a user