mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
tsnet: add Server.ControlURL option
As requested in #6250 from @majst01. Change-Id: Ia4bc5c4ebc98cd67d07328a1a42b87574261ddde Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
f81351fdef
commit
1950e56478
@ -84,6 +84,10 @@ type Server struct {
|
||||
// used.
|
||||
AuthKey string
|
||||
|
||||
// ControlURL optionally specifies the coordination server URL.
|
||||
// If empty, the Tailscale default is used.
|
||||
ControlURL string
|
||||
|
||||
initOnce sync.Once
|
||||
initErr error
|
||||
lb *ipnlocal.LocalBackend
|
||||
@ -340,6 +344,7 @@ func (s *Server) start() (reterr error) {
|
||||
prefs := ipn.NewPrefs()
|
||||
prefs.Hostname = s.hostname
|
||||
prefs.WantRunning = true
|
||||
prefs.ControlURL = s.ControlURL
|
||||
authKey := s.getAuthKey()
|
||||
err = lb.Start(ipn.Options{
|
||||
UpdatePrefs: prefs,
|
||||
|
Loading…
Reference in New Issue
Block a user