MCPcopy Create free account
hub / github.com/tailscale/tailcat / AddAllowedClient

Method AddAllowedClient

tailcat.go:596–605  ·  view source on GitHub ↗

AddAllowedClient adds k as an allowed client. Until a key is allowed (here or via [Server.AllowedClients]), all clients are allowed.

(k key.NodePublic)

Source from the content-addressed store, hash-verified

594// Until a key is allowed (here or via [Server.AllowedClients]), all
595// clients are allowed.
596func (s *Server) AddAllowedClient(k key.NodePublic) {
597 if s.lb == nil {
598 // Not yet started; applied at Start.
599 s.AllowedClients = append(s.AllowedClients, k)
600 return
601 }
602 s.lb.mu.Lock()
603 defer s.lb.mu.Unlock()
604 mak.Set(&s.lb.allowedClients, k, true)
605}
606
607// ConnBlob returns the token that clients use to connect to this
608// server. It embeds the full DERP region, so clients don't need to

Callers 2

TestTailcatFunction · 0.95
serverFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestTailcatFunction · 0.76