Identify tailnet callers once per connection; list processes via sysctl
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user