Documentation
¶
Index ¶
Constants ¶
View Source
const (
SO_ORIGINAL_DST = 80
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CAPool ¶
type CAPool struct {
// contains filtered or unexported fields
}
func (*CAPool) GetCertificate ¶
func (p *CAPool) GetCertificate(serverName string) (*tls.Certificate, error)
type DNSForwarder ¶ added in v0.2.9
type DNSForwarder struct {
// contains filtered or unexported fields
}
DNSForwarder relays guest DNS queries to upstream resolvers.
func NewDNSForwarder ¶ added in v0.2.9
func NewDNSForwarder(bindAddr string, dnsServers []string) (*DNSForwarder, error)
NewDNSForwarder starts a UDP forwarder on bindAddr.
func (*DNSForwarder) Close ¶ added in v0.2.9
func (d *DNSForwarder) Close() error
Close stops the server and releases the socket.
func (*DNSForwarder) Port ¶ added in v0.2.9
func (d *DNSForwarder) Port() int
Port returns the ephemeral port chosen by the kernel.
type HTTPInterceptor ¶
type HTTPInterceptor struct {
// contains filtered or unexported fields
}
func NewHTTPInterceptor ¶
func (*HTTPInterceptor) HandleHTTP ¶
func (i *HTTPInterceptor) HandleHTTP(guestConn net.Conn, dstIP string, dstPort int)
func (*HTTPInterceptor) HandleHTTPS ¶
func (i *HTTPInterceptor) HandleHTTPS(guestConn net.Conn, dstIP string, dstPort int)
type NFTablesNAT ¶
type NFTablesNAT struct {
// contains filtered or unexported fields
}
func NewNFTablesNAT ¶
func NewNFTablesNAT(tapInterface string) *NFTablesNAT
func (*NFTablesNAT) Cleanup ¶
func (n *NFTablesNAT) Cleanup() error
func (*NFTablesNAT) Setup ¶
func (n *NFTablesNAT) Setup() error
type NFTablesRules ¶
type NFTablesRules struct {
// contains filtered or unexported fields
}
func NewNFTablesRules ¶
func NewNFTablesRules(tapInterface, gatewayIP string, httpPort, httpsPort, passthroughPort int, dnsServers []string) *NFTablesRules
func (*NFTablesRules) Cleanup ¶
func (r *NFTablesRules) Cleanup() error
func (*NFTablesRules) SetDNSForwarderPort ¶ added in v0.2.9
func (r *NFTablesRules) SetDNSForwarderPort(port int)
func (*NFTablesRules) Setup ¶
func (r *NFTablesRules) Setup() error
type ProxyConfig ¶
type ProxyConfig struct {
BindAddr string // Address to bind (e.g., "192.168.100.1")
HTTPPort int // Port for HTTP interception (e.g., 8080)
HTTPSPort int // Port for HTTPS interception (e.g., 8443)
PassthroughPort int // Port for policy-gated TCP passthrough (non-80/443). 0 = OS-assigned, negative = disabled
Policy *policy.Engine
Events chan api.Event
CAPool *CAPool
}
type TransparentProxy ¶
type TransparentProxy struct {
// contains filtered or unexported fields
}
func NewTransparentProxy ¶
func NewTransparentProxy(cfg *ProxyConfig) (*TransparentProxy, error)
func (*TransparentProxy) BindAddr ¶
func (tp *TransparentProxy) BindAddr() string
func (*TransparentProxy) Close ¶
func (tp *TransparentProxy) Close() error
func (*TransparentProxy) HTTPPort ¶
func (tp *TransparentProxy) HTTPPort() int
func (*TransparentProxy) HTTPSPort ¶
func (tp *TransparentProxy) HTTPSPort() int
func (*TransparentProxy) PassthroughPort ¶ added in v0.1.7
func (tp *TransparentProxy) PassthroughPort() int
func (*TransparentProxy) Start ¶
func (tp *TransparentProxy) Start()
Click to show internal directories.
Click to hide internal directories.