Identify tailnet callers once per connection; list processes via sysctl

This commit is contained in:
Ian Gulliver
2026-10-23 11:22:16 -07:00
parent 69848a2c6e
commit 0a094aaa72
6 changed files with 58 additions and 31 deletions
+2 -1
View File
@@ -19,6 +19,7 @@ import (
"g.fc.run/ai/byre/internal/clients"
"g.fc.run/ai/byre/internal/git"
"g.fc.run/ai/byre/internal/ids"
"g.fc.run/ai/byre/internal/peer"
"g.fc.run/ai/byre/internal/schedule"
"g.fc.run/ai/byre/internal/store"
"g.fc.run/ai/byre/internal/terminal"
@@ -172,7 +173,7 @@ func (s *Server) GetTailnet(w http.ResponseWriter, r *http.Request) {
func (s *Server) identify(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
identified := trace.Start(r.Context(), "whois")
who, err := s.tailnet.WhoIs(r.Context(), r.RemoteAddr)
who, err := peer.WhoIs(r, s.tailnet)
identified()
if err != nil {
writeError(w, http.StatusUnauthorized, fmt.Errorf("identify %s on the tailnet: %w", r.RemoteAddr, err))