Versions in this module Expand all Collapse all v0 v0.0.20 Sep 9, 2023 v0.0.10 Sep 9, 2023 v0.0.3 Sep 9, 2023 Changes in this version + const DefaultConnTimeout + const MinTorVersion + const OnionSuffix + const OnionSuffixLen + const ProtocolInfoVersion + const Subsystem + const V2DecodedLen + const V2Len + const V3DecodedLen + const V3Len + var Base32Encoding = base32.NewEncoding(base32Alphabet) + var ErrNoPrivateKey = errors.New("private key not found") + var ErrNoServiceFound = errors.New("no active service found") + var ErrServiceIDMismatch = errors.New("onion serviceIDs don't match") + var ErrServiceNotCreated = errors.New("onion service hasn't been created") + func Dial(address, socksAddr string, streamIsolation bool, ...) (net.Conn, error) + func DisableLog() + func FakeIPToOnionHost(fakeIP net.Addr) (net.Addr, error) + func IsOnionFakeIP(addr net.Addr) bool + 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 OnionHostToFakeIP(host string) (net.IP, error) + func ParseAddr(address, socksAddr string) (net.Addr, error) + func ResolveTCPAddr(address, socksAddr string) (*net.TCPAddr, error) + func UseLogger(logger btclog.Logger) + type AddOnionConfig struct + Store OnionStore + TargetPorts []int + Type OnionType + VirtualPort int + type ClearNet struct + func (r *ClearNet) Dial(network, address string, timeout time.Duration) (net.Conn, error) + func (r *ClearNet) LookupHost(host string) ([]string, error) + func (r *ClearNet) LookupSRV(service, proto, name string, timeout time.Duration) (string, []*net.SRV, error) + func (r *ClearNet) ResolveTCPAddr(network, address string) (*net.TCPAddr, error) + type Controller struct + func NewController(controlAddr string, targetIPAddress string, password string) *Controller + func (c *Controller) AddOnion(cfg AddOnionConfig) (*OnionAddr, error) + func (c *Controller) CheckOnionService() error + func (c *Controller) DelOnion(serviceID string) error + func (c *Controller) Reconnect() error + func (c *Controller) Start() error + func (c *Controller) Stop() error + type DialFunc func(net, addr string, timeout time.Duration) (net.Conn, error) + type Net interface + Dial func(network, address string, timeout time.Duration) (net.Conn, error) + LookupHost func(host string) ([]string, error) + LookupSRV func(service, proto, name string, timeout time.Duration) (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 OnionFile struct + func NewOnionFile(privateKeyPath string, privateKeyPerm os.FileMode) *OnionFile + func (f *OnionFile) DeletePrivateKey(_ OnionType) error + func (f *OnionFile) PrivateKey(_ OnionType) ([]byte, error) + func (f *OnionFile) StorePrivateKey(_ OnionType, privateKey []byte) error + type OnionStore interface + DeletePrivateKey func(OnionType) error + PrivateKey func(OnionType) ([]byte, error) + StorePrivateKey func(OnionType, []byte) error + type OnionType int + const V2 + const V3 + type ProxyNet struct + DNS string + SOCKS string + SkipProxyForClearNetTargets bool + StreamIsolation bool + func (p *ProxyNet) Dial(network, address string, timeout time.Duration) (net.Conn, error) + func (p *ProxyNet) LookupHost(host string) ([]string, error) + func (p *ProxyNet) LookupSRV(service, proto, name string, timeout time.Duration) (string, []*net.SRV, error) + func (p *ProxyNet) ResolveTCPAddr(network, address string) (*net.TCPAddr, error)