Documentation
¶
Overview ¶
Package web provides the Tailscale client for web.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the backend server for a Tailscale web client.
func NewServer ¶
func NewServer(opts ServerOpts) (s *Server, cleanup func())
NewServer constructs a new Tailscale web client server.
type ServerOpts ¶ added in v1.50.0
type ServerOpts struct {
DevMode bool
// CGIMode indicates if the server is running as a CGI script.
CGIMode bool
// PathPrefix is the URL prefix added to requests by CGI or reverse proxy.
PathPrefix string
// LocalClient is the tailscale.LocalClient to use for this web server.
// If nil, a new one will be created.
LocalClient *tailscale.LocalClient
// TimeNow optionally provides a time function.
// time.Now is used as default.
TimeNow func() time.Time
}
ServerOpts contains options for constructing a new Server.
Click to show internal directories.
Click to hide internal directories.