mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
client/tailscale, tsnet, ipn/ipnlocal: prove nodekey ownership over noise
Fixes #5972 Change-Id: Ic33a93d3613ac5dbf172d6a8a459ca06a7f9e547 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
8c790207a0
commit
910db02652
@@ -493,11 +493,8 @@ func (s *Server) APIClient() (*tailscale.Client, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
nm := s.lb.NetMap()
|
||||
if nm == nil {
|
||||
return nil, errors.New("no netmap, not logged in?")
|
||||
}
|
||||
c := tailscale.NewNoiseClient(nm.Domain, s.lb.NoiseRoundTripper(), nm.NodeKey)
|
||||
c := tailscale.NewClient("-", nil)
|
||||
c.HTTPClient = &http.Client{Transport: s.lb.KeyProvingNoiseRoundTripper()}
|
||||
return c, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user