Versions in this module Expand all Collapse all v0 v0.5.1 Feb 26, 2020 Changes in this version + const MinTorVersion + const OnionSuffix + const OnionSuffixLen + const ProtocolInfoVersion + const V2DecodedLen + const V2Len + const V3DecodedLen + const V3Len + var Base32Encoding = base32.NewEncoding(base32Alphabet) + func Dial(address, socksAddr string, streamIsolation bool) (net.Conn, error) + func IsOnionHost(host string) bool + func LookupHost(host, socksAddr string) ([]string, error) + func LookupSRV(service, proto, name, socksAddr, dnsServer string, streamIsolation bool) (string, []*net.SRV, error) + func ParseAddr(address, socksAddr string) (net.Addr, error) + func ResolveTCPAddr(address, socksAddr string) (*net.TCPAddr, error) + type AddOnionConfig struct + PrivateKeyPath string + TargetPorts []int + Type OnionType + VirtualPort int + type ClearNet struct + func (r *ClearNet) Dial(network, address string) (net.Conn, error) + func (r *ClearNet) LookupHost(host string) ([]string, error) + func (r *ClearNet) LookupSRV(service, proto, name string) (string, []*net.SRV, error) + func (r *ClearNet) ResolveTCPAddr(network, address string) (*net.TCPAddr, error) + type Controller struct + func NewController(controlAddr string, targetIPAddress string) *Controller + func (c *Controller) AddOnion(cfg AddOnionConfig) (*OnionAddr, error) + func (c *Controller) ProtocolInfo() ([]string, string, string, error) + func (c *Controller) Start() error + func (c *Controller) Stop() error + type Net interface + Dial func(network, address string) (net.Conn, error) + LookupHost func(host string) ([]string, error) + LookupSRV func(service, proto, name string) (string, []*net.SRV, error) + ResolveTCPAddr func(network, address string) (*net.TCPAddr, error) + type OnionAddr struct + OnionService string + Port int + func (o *OnionAddr) Network() string + func (o *OnionAddr) String() string + type OnionType int + const V2 + const V3 + type ProxyNet struct + DNS string + SOCKS string + StreamIsolation bool + func (p *ProxyNet) Dial(network, address string) (net.Conn, error) + func (p *ProxyNet) LookupHost(host string) ([]string, error) + func (p *ProxyNet) LookupSRV(service, proto, name string) (string, []*net.SRV, error) + func (p *ProxyNet) ResolveTCPAddr(network, address string) (*net.TCPAddr, error)