Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainFilter ¶
type DomainFilter struct {
// contains filtered or unexported fields
}
DomainFilter handles domain allowlisting.
func NewDomainFilter ¶
func NewDomainFilter() *DomainFilter
NewDomainFilter creates a new domain filter.
func (*DomainFilter) AddAllowed ¶
func (f *DomainFilter) AddAllowed(domain string)
AddAllowed adds a domain to the allow list. Supports wildcards like *.github.com
func (*DomainFilter) AllowAll ¶
func (f *DomainFilter) AllowAll()
AllowAll allows all domains (disables filtering).
func (*DomainFilter) IsAllowed ¶
func (f *DomainFilter) IsAllowed(host string) bool
IsAllowed checks if a domain is allowed.
type HTTPProxy ¶
type HTTPProxy struct {
// contains filtered or unexported fields
}
HTTPProxy is a filtering HTTP/HTTPS proxy server.
func NewHTTPProxy ¶
func NewHTTPProxy(filter *DomainFilter) (*HTTPProxy, error)
NewHTTPProxy creates a new HTTP proxy server with domain filtering.
func NewHTTPProxyWithListener ¶
func NewHTTPProxyWithListener(listener net.Listener, filter *DomainFilter) *HTTPProxy
NewHTTPProxyWithListener creates an HTTP proxy using an existing listener. If listener is nil, call StartUnix to create a Unix socket listener.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager coordinates HTTP and SOCKS5 proxy servers for sandboxed execution.
func NewManager ¶
func NewManager(cfg ManagerConfig) (*Manager, error)
NewManager creates and starts all necessary proxy servers. Returns nil if no proxies are needed.
func (*Manager) EnvVars ¶
EnvVars returns environment variables for configuring proxy in subprocesses.
func (*Manager) SOCKS5Port ¶
SOCKS5Port returns the SOCKS5 proxy port.
func (*Manager) SocketPath ¶
SocketPath returns the Unix socket path (Linux only).
type ManagerConfig ¶
ManagerConfig holds configuration for the proxy manager.
type SOCKS5Proxy ¶
type SOCKS5Proxy struct {
// contains filtered or unexported fields
}
SOCKS5Proxy is a filtering SOCKS5 proxy server
func NewSOCKS5Proxy ¶
func NewSOCKS5Proxy(filter *DomainFilter) (*SOCKS5Proxy, error)
NewSOCKS5Proxy creates a new SOCKS5 proxy server with domain filtering
func (*SOCKS5Proxy) Addr ¶
func (p *SOCKS5Proxy) Addr() string
Addr returns the proxy's address (host:port)