Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶ added in v1.18.0
type Server struct {
// contains filtered or unexported fields
}
Server is an IPN backend and its set of 0 or more active localhost TCP or unix socket connections talking to that backend.
func New ¶ added in v1.18.0
New returns a new Server. The netMon parameter is optional; if non-nil it's used to do faster interface lookups.
To start it, use the Server.Run method.
At some point, either before or after Run, the Server's SetLocalBackend method must also be called before Server can do anything useful.
func (*Server) Run ¶ added in v1.18.0
Run runs the server, accepting connections from ln forever.
If the context is done, the listener is closed. It is also the base context of all HTTP requests.
If the Server's LocalBackend has already been set, Run starts it. Otherwise, the next call to SetLocalBackend will start it.
func (*Server) ServeHTMLStatus ¶ added in v1.18.0
func (s *Server) ServeHTMLStatus(w http.ResponseWriter, r *http.Request)
ServeHTMLStatus serves an HTML status page at http://localhost:41112/ for Windows and via $DEBUG_LISTENER/debug/ipn when tailscaled's --debug flag is used to run a debug server.
func (*Server) SetLocalBackend ¶ added in v1.34.0
func (s *Server) SetLocalBackend(lb *ipnlocal.LocalBackend)
SetLocalBackend sets the server's LocalBackend.
If b.Run has already been called, then lb.Start will be called. Otherwise Start will be called once Run is called.