Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// AuthKey is the tailscale authentication key.
AuthKey string `json:"auth_key,omitempty"`
// Hostname is the name of this node on the tailnet.
Hostname string `json:"hostname,omitempty"`
// StateDir is the directory where tsnet stores its state.
StateDir string `json:"state_dir,omitempty"`
// contains filtered or unexported fields
}
App configures the global Tailscale tsnet node for Caddy.
func (App) CaddyModule ¶
func (App) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*App) Cleanup ¶
Cleanup implements caddy.CleanerUpper. It ensures the tsnet server is closed if provisioning of other modules fails after this module has already started its server.
func (*App) DialContext ¶
DialContext returns the DialContext function from the tsnet server.
type Transport ¶
type Transport struct {
// Embed the standard HTTPTransport so we inherit all its config
// and JSON parsing behavior for standard transport options.
*reverseproxy.HTTPTransport
}
Transport implements a custom HTTP transport for Caddy's reverse_proxy that dials out using the global tsnet App.
func (Transport) CaddyModule ¶
func (Transport) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Transport) Provision ¶
Provision sets up the transport. It gets a reference to the global tstun App and overrides the underlying http.Transport's DialContext.