cmd/tailscaled: add whois/identd-ish debug handler

This commit is contained in:
Brad Fitzpatrick
2021-01-28 15:29:17 -08:00
parent c7fc4a06da
commit c611d8480b
3 changed files with 95 additions and 0 deletions

View File

@@ -935,3 +935,9 @@ func eqCIDRs(a, b []netaddr.IPPrefix) bool {
func eqTimePtr(a, b *time.Time) bool {
return ((a == nil) == (b == nil)) && (a == nil || a.Equal(*b))
}
// WhoIsResponse is the JSON type returned by tailscaled debug server's /whois?ip=$IP handler.
type WhoIsResponse struct {
Node *Node
UserProfile *UserProfile
}