(ctx context.Context, args []string)
| 496 | } |
| 497 | |
| 498 | func 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 | |
| 512 | func looksLikeHTTPMethod(s string) bool { |
| 513 | if len(s) > len("OPTIONS") { |
nothing calls this directly
no test coverage detected
searching dependent graphs…