MCPcopy
hub / github.com/tailscale/tailscale / runLocalCreds

Function runLocalCreds

cmd/tailscale/cli/debug.go:498–510  ·  view source on GitHub ↗
(ctx context.Context, args []string)

Source from the content-addressed store, hash-verified

496}
497
498func runLocalCreds(ctx context.Context, args []string) error {
499 port, token, err := safesocket.LocalTCPPortAndToken()
500 if err == nil {
501 printf("curl -u:%s http://localhost:%d/localapi/v0/status\n", token, port)
502 return nil
503 }
504 if runtime.GOOS == "windows" {
505 runLocalAPIProxy()
506 return nil
507 }
508 printf("curl --unix-socket %s http://local-tailscaled.sock/localapi/v0/status\n", paths.DefaultTailscaledSocket())
509 return nil
510}
511
512func looksLikeHTTPMethod(s string) bool {
513 if len(s) > len("OPTIONS") {

Callers

nothing calls this directly

Calls 4

LocalTCPPortAndTokenFunction · 0.92
DefaultTailscaledSocketFunction · 0.92
runLocalAPIProxyFunction · 0.85
printfFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…