x: within.website/x/tor Index | Files

package tor

import "within.website/x/tor"

Package tor manages and automates starting a child tor process for exposing TCP services into onionland.


Package Files


type Config Uses

type Config struct {
    DataDir               string
    HashedControlPassword string
    ClearPassword         string
    Timeout               time.Duration

Config is a wrapper struct for tor configuration.

type Tor Uses

type Tor struct {
    // contains filtered or unexported fields

Tor is a higher level wrapper to a child tor process

func StartTor Uses

func StartTor(cfg Config) (*Tor, error)

StartTor starts a new instance of tor or doesn't with the reason why.

func (*Tor) AddOnion Uses

func (t *Tor) AddOnion(pKey *rsa.PrivateKey, virtPort uint16, destination string) (*bulb.OnionInfo, error)

AddOnion adds an onion service to this machine with the given private key (can be nil for an auto-generated key), virtual onion port and TCP destunation.

Package tor imports 8 packages (graph). Updated 2019-11-30. Refresh now. Tools for package owners.