Documentation ¶
Overview ¶
Package tsweb contains code between various Tailscale webservers.
Index ¶
- Variables
- func AllowDebugAccess(r *http.Request) bool
- func DefaultCertDir(leafDir string) string
- func IsProd443(addr string) bool
- func NewMux(debugHandler http.Handler) *http.ServeMux
- func Protected(h http.Handler) http.Handler
- func RegisterCommonDebug(mux *http.ServeMux)
- func Uptime() time.Duration
- type Port80Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var DevMode bool
DevMode controls whether extra output in shown, for when the binary is being run in dev mode.
Functions ¶
func AllowDebugAccess ¶
AllowDebugAccess reports whether r should be permitted to access various debug endpoints.
func DefaultCertDir ¶
func NewMux ¶
NewMux returns a new ServeMux with debugHandler registered (and protected) at /debug/.
func Protected ¶
Protected wraps a provided debug handler, h, returning a Handler that enforces AllowDebugAccess and returns forbiden replies for unauthorized requests.
func RegisterCommonDebug ¶
Types ¶
type Port80Handler ¶
Port80Handler is the handler to be given to autocert.Manager.HTTPHandler. The inner handler is the mux returned by NewMux containing registered /debug handlers.
func (Port80Handler) ServeHTTP ¶
func (h Port80Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.