config

package
v0.0.0-...-d99ed51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowTcpDial

func AllowTcpDial(c *confStore.Config) error

AllowTcpDial allows the tor transport to dial tcp address. By Default TcpDial is off.

func DoSlowStart

func DoSlowStart(c *confStore.Config) error

DoSlowStart set the tor node to bootstrap only when a Dial or a Listen is issued. By Default DoSlowStart is off.

Types

type Configurator

type Configurator func(*confStore.Config) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL