|
|
@ -22,6 +22,7 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/peterbourgon/ff/v3/ffcli"
|
|
|
|
"github.com/peterbourgon/ff/v3/ffcli"
|
|
|
|
"tailscale.com/client/tailscale"
|
|
|
|
"tailscale.com/client/tailscale"
|
|
|
|
|
|
|
|
"tailscale.com/hostinfo"
|
|
|
|
"tailscale.com/ipn"
|
|
|
|
"tailscale.com/ipn"
|
|
|
|
"tailscale.com/paths"
|
|
|
|
"tailscale.com/paths"
|
|
|
|
"tailscale.com/safesocket"
|
|
|
|
"tailscale.com/safesocket"
|
|
|
@ -65,6 +66,11 @@ var debugCmd = &ffcli.Command{
|
|
|
|
Exec: runEnv,
|
|
|
|
Exec: runEnv,
|
|
|
|
ShortHelp: "print cmd/tailscale environment",
|
|
|
|
ShortHelp: "print cmd/tailscale environment",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "hostinfo",
|
|
|
|
|
|
|
|
Exec: runHostinfo,
|
|
|
|
|
|
|
|
ShortHelp: "print hostinfo",
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name: "local-creds",
|
|
|
|
Name: "local-creds",
|
|
|
|
Exec: runLocalCreds,
|
|
|
|
Exec: runLocalCreds,
|
|
|
@ -270,6 +276,13 @@ func runEnv(ctx context.Context, args []string) error {
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func runHostinfo(ctx context.Context, args []string) error {
|
|
|
|
|
|
|
|
hi := hostinfo.New()
|
|
|
|
|
|
|
|
j, _ := json.MarshalIndent(hi, "", " ")
|
|
|
|
|
|
|
|
os.Stdout.Write(j)
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func runDaemonGoroutines(ctx context.Context, args []string) error {
|
|
|
|
func runDaemonGoroutines(ctx context.Context, args []string) error {
|
|
|
|
goroutines, err := tailscale.Goroutines(ctx)
|
|
|
|
goroutines, err := tailscale.Goroutines(ctx)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|