Documentation ¶
Index ¶
- func AllowTcpDial(c *confStore.Config) error
- func DoSlowStart(c *confStore.Config) error
- type Configurator
- func Merge(cs ...Configurator) Configurator
- func SetBinaryPath(path string) Configurator
- func SetDataDir(path string) Configurator
- func SetNodeDebug(debug io.Writer) Configurator
- func SetSetupTimeout(t time.Duration) Configurator
- func SetTorrcPath(path string) Configurator
- func WithDNSPort(port int) Configurator
- func WithPrivateKey(key crypto.PrivateKey) Configurator
- func WithResourceManager(rcmgr network.ResourceManager) Configurator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowTcpDial ¶
AllowTcpDial allows the tor transport to dial tcp address. By Default TcpDial is off.
func DoSlowStart ¶
DoSlowStart set the tor node to bootstrap only when a Dial or a Listen is issued. By Default DoSlowStart is off.
Types ¶
type Configurator ¶
func Merge ¶
func Merge(cs ...Configurator) Configurator
ConfMerge Merges different configs, starting at the first ending at the last.
func SetBinaryPath ¶
func SetBinaryPath(path string) Configurator
SetBinaryPath set the path to the Tor's binary if you don't use the embeded Tor node.
func SetDataDir ¶
func SetDataDir(path string) Configurator
SetDataDir sets the data directory where Tor is gonna put his data dir.
If this isn't set a temp directory will be used.
func SetNodeDebug ¶
func SetNodeDebug(debug io.Writer) Configurator
SetNodeDebug set the writer for the tor node debug output.
func SetSetupTimeout ¶
func SetSetupTimeout(t time.Duration) Configurator
SetSetupTimeout change the timeout for the bootstrap of the node and the publication of the tunnel. By Default SetupTimeout is at 5 minutes.
func SetTorrcPath ¶
func SetTorrcPath(path string) Configurator
SetTorrc sets the torrc file for tor to use instead of an blank one.
func WithDNSPort ¶
func WithDNSPort(port int) Configurator
WithDNSPort optionally sets the tor DNS port setting to use DNS over tor.
func WithPrivateKey ¶
func WithPrivateKey(key crypto.PrivateKey) Configurator
WithPrivateKey provides an option to set the private key used when creating onion addresses.
The key is an ed25519 key which you can create with crypto/ed25519.
If this option is omitted the key will be random.
func WithResourceManager ¶
func WithResourceManager(rcmgr network.ResourceManager) Configurator
WithResourceManager sets a global resource manager for the transport otherwise it will be set to a null manager.