tor

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NonAnonymous

func NonAnonymous(c *StartConf)

NonAnonymous configures Tor to publish non-anonymous services. This allows trading anonymity for a possible performance increase as less hops are used with this option.

func Start

func Start(ctx context.Context, options ...Option) (*tor.Tor, error)

Start starts a new Tor process.

Types

type ClientAuth

type ClientAuth struct {
	// OnionID is the base32-encoded onion ID (without the .onion suffix) which
	// the client is authenticating to.
	OnionID string
	// PrivateKey is a 32-byte x25519 private key, which only the client
	// should know.
	PrivateKey []byte
}

ClientAuth represents client authorization needed to connect to auth-protected onion services.

type Option

type Option func(*StartConf)

Option is an option that configures Tor.

func ClientAuths

func ClientAuths(clientAuths ...ClientAuth) Option

ClientAuths configures Tor with client authorizations needed in order to connect to protected onion services.

func Debug

func Debug(w io.Writer) Option

Debug configures Tor to write debug log messages to the given writer.

type StartConf

type StartConf struct {
	tor.StartConf

	ClientAuths []ClientAuth
}

StartConf configures the managed Tor daemon.

type Tor

type Tor = tor.Tor

Tor represents a controller over a local Tor node.

Jump to

Keyboard shortcuts

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