Documentation
¶
Index ¶
- type Options
- type Server
- func (s *Server) AdminServer() *admin.Server
- func (s *Server) ReconcileAdmin(cfg *config.FileConfig) error
- func (s *Server) SetReloadManager(m *config.Manager)
- func (s *Server) Start() error
- func (s *Server) Stop() error
- func (s *Server) UpdateConfig(getToken types.GetToken, notificationConfig *client.NotificationConfig, ...) error
- type WebSocketMonitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Version string
Domain string
Port int
TCPPort int
Secure bool
Token types.GetToken
Notification *client.NotificationConfig
BandwidthLimits *limiter.ClientBandwidthLimits
// PublicHTTPNoAuthSessionTTL: max lifetime for public (unauthenticated) monitor clients.
// Zero means default 10m. Independent of tunnel type and public URL auth.
PublicHTTPNoAuthSessionTTL time.Duration
// PublicHTTPNoAuthWarnLeadTime: lead time before close warning.
// Zero means default 2m.
PublicHTTPNoAuthWarnLeadTime time.Duration
ConfigPath string
ReloadManager *config.Manager
Admin *config.ResolvedAdmin
PidFile string
}
Options contains options for creating a server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the main server instance
func (*Server) AdminServer ¶ added in v1.29.0
AdminServer returns the admin console server when enabled.
func (*Server) ReconcileAdmin ¶ added in v1.29.3
func (s *Server) ReconcileAdmin(cfg *config.FileConfig) error
ReconcileAdmin (re)starts the admin HTTP listener when admin.listen or related settings change. Hot reload updates tunnel auth and limits but admin binds its own socket at startup; without this, saving 0.0.0.0:9090 in the UI would not take effect until process restart.
func (*Server) SetReloadManager ¶ added in v1.29.0
SetReloadManager attaches the hot-reload manager after construction.
func (*Server) UpdateConfig ¶
func (s *Server) UpdateConfig( getToken types.GetToken, notificationConfig *client.NotificationConfig, bandwidthLimits *limiter.ClientBandwidthLimits, publicHTTPNoAuthSessionTTL time.Duration, publicHTTPNoAuthWarnLeadTime time.Duration, ) error
UpdateConfig updates the server configuration dynamically
type WebSocketMonitor ¶
type WebSocketMonitor struct {
// contains filtered or unexported fields
}
WebSocketMonitor manages WebSocket connections and authentication
func CreateWebSocketMonitor ¶
func CreateWebSocketMonitor(ctx *types.Context, options *monitorchannel.CreateWebSocketOptions) *WebSocketMonitor
CreateWebSocketMonitor creates a new WebSocket monitor
func (*WebSocketMonitor) Attach ¶
func (m *WebSocketMonitor) Attach(server *http.Server)
Attach attaches the WebSocket monitor to an HTTP server
func (*WebSocketMonitor) OnTunnel ¶
func (m *WebSocketMonitor) OnTunnel(handler func(data map[string]interface{}))
OnTunnel registers a handler for tunnel events