proxy

package
v0.0.0-...-c3e73d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyProtocolInfo

type ProxyProtocolInfo struct {
	Protocol     string // TCP4 or TCP6
	SrcIP        string
	DestIP       string
	SrcPort      int
	DestPort     int
	OriginalConn net.Conn // The original connection after PROXY protocol parsing
}

ProxyProtocolInfo holds information parsed from incoming PROXY protocol header

type RouteAPIResponse

type RouteAPIResponse struct {
	Endpoints []string `json:"endpoints"`
}

RouteAPIResponse represents the response from the route API

type RouteRecord

type RouteRecord struct {
	Hostname   string
	TargetHost string
	TargetPort int
}

RouteRecord represents a routing configuration

type SNIProxy

type SNIProxy struct {
	// contains filtered or unexported fields
}

SNIProxy represents the main proxy server

func NewSNIProxy

func NewSNIProxy(port int, remoteConfigURL, publicKey, localProxyAddr string, localProxyPort int, localOverrides []string, proxyProtocol bool, trustedUpstreams []string) (*SNIProxy, error)

NewSNIProxy creates a new SNI proxy instance

func (*SNIProxy) ClearCache

func (p *SNIProxy) ClearCache()

ClearCache clears all cached entries

func (*SNIProxy) GetCacheStats

func (p *SNIProxy) GetCacheStats() (int, int)

GetCacheStats returns cache statistics

func (*SNIProxy) Start

func (p *SNIProxy) Start() error

Start begins listening for connections

func (*SNIProxy) Stop

func (p *SNIProxy) Stop() error

Stop gracefully shuts down the proxy

func (*SNIProxy) UpdateLocalSNIs

func (p *SNIProxy) UpdateLocalSNIs(fullDomains []string)

UpdateLocalSNIs updates the local SNIs and invalidates cache for changed domains

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL