Documentation
¶
Overview ¶
Package debug provides HTTP debug endpoints and CLI client for the proxy server.
Package debug provides HTTP debug endpoints for the proxy server.
Index ¶
- type CaptureOptions
- type Client
- func (c *Client) Capture(ctx context.Context, opts CaptureOptions) error
- func (c *Client) ClientStatus(ctx context.Context, accountID string, filters StatusFilters) error
- func (c *Client) ClientSyncResponse(ctx context.Context, accountID string) error
- func (c *Client) Health(ctx context.Context) error
- func (c *Client) ListClients(ctx context.Context) error
- func (c *Client) PerfSet(ctx context.Context, value uint32) error
- func (c *Client) PingTCP(ctx context.Context, accountID, host string, port int, timeout time.Duration, ...) error
- func (c *Client) Runtime(ctx context.Context) error
- func (c *Client) SetLogLevel(ctx context.Context, accountID, level string) error
- func (c *Client) StartClient(ctx context.Context, accountID string) error
- func (c *Client) StopClient(ctx context.Context, accountID string) error
- type Handler
- type InboundListenerInfo
- type InboundProvider
- type StatusFilters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureOptions ¶ added in v0.70.5
type CaptureOptions struct {
AccountID string
Duration string
FilterExpr string
Text bool
Verbose bool
ASCII bool
Output io.Writer
}
CaptureOptions configures a capture request.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides CLI access to debug endpoints.
func (*Client) Capture ¶ added in v0.70.5
func (c *Client) Capture(ctx context.Context, opts CaptureOptions) error
Capture streams a packet capture from the debug endpoint. The response body (pcap or text) is written directly to opts.Output until the server closes the connection or the context is cancelled.
func (*Client) ClientStatus ¶
ClientStatus fetches the status of a specific client.
func (*Client) ClientSyncResponse ¶
ClientSyncResponse fetches the sync response of a specific client.
func (*Client) ListClients ¶
ListClients fetches the list of all clients.
func (*Client) PerfSet ¶ added in v0.72.0
PerfSet live-retunes the tunnel buffer pool cap on all running embedded clients. Batch size is not live-tunable; configure it at proxy startup.
func (*Client) PingTCP ¶
func (c *Client) PingTCP(ctx context.Context, accountID, host string, port int, timeout time.Duration, ipVersion string) error
PingTCP performs a TCP ping through a client. ipVersion may be "4", "6", or "" for automatic.
func (*Client) SetLogLevel ¶
SetLogLevel sets the log level of a specific client.
func (*Client) StartClient ¶
StartClient starts a specific client.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler provides HTTP debug endpoints.
func NewHandler ¶
NewHandler creates a new debug handler.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles debug requests.
func (*Handler) SetCertStatus ¶
func (h *Handler) SetCertStatus(cs certStatus)
SetCertStatus sets the certificate status provider for ACME prefetch observability.
func (*Handler) SetInboundProvider ¶ added in v0.72.0
func (h *Handler) SetInboundProvider(p InboundProvider)
SetInboundProvider wires per-account inbound listener observability. Pass nil (or skip the call) to keep the inbound section out of debug responses on proxies that don't run --private.
type InboundListenerInfo ¶ added in v0.72.0
type InboundListenerInfo struct {
TunnelIP string `json:"tunnel_ip"`
HTTPSPort uint16 `json:"https_port"`
HTTPPort uint16 `json:"http_port"`
}
InboundListenerInfo describes a per-account inbound listener as surfaced through the debug HTTP handler. Mirrors the proto sub-message emitted with SendStatusUpdate so dashboards and CLI tooling see the same shape.
type InboundProvider ¶ added in v0.72.0
type InboundProvider interface {
InboundListeners() map[types.AccountID]InboundListenerInfo
}
InboundProvider exposes per-account inbound listener state. Optional; when nil the debug endpoint omits the inbound section entirely so the existing JSON shape stays additive.