torproxy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TorClient

type TorClient struct {
	Host string
	Port int
	// contains filtered or unexported fields
}

TorClient holds the Host and Port for the tor client and if useEmbedded=true means is using an embedded tor client instance

type TorProxy

type TorProxy struct {
	Address   string
	Client    *TorClient
	Redirects []string
}

TorProxy holds the tor client details and the list cleartext addresses to be redirect to the onions

func NewTorProxy

func NewTorProxy(address string) *TorProxy

NewTorProxy returns a default *TorProxy connecting on canonical localhost:9050

func NewTorProxyFromHostAndPort

func NewTorProxyFromHostAndPort(address string, torHost string, torPort int) *TorProxy

NewTorProxyFromHostAndPort returns a *TorProxy with givnen host and port

func (*TorProxy) Serve

func (tp *TorProxy) Serve() (err error)

Serve ...

func (*TorProxy) StartTor

func (tp *TorProxy) StartTor() error

StartTor starts the embedded tor client

func (*TorProxy) Stop

func (tp *TorProxy) Stop() error

Stop stops the tor client

func (*TorProxy) WithRedirects

func (tp *TorProxy) WithRedirects(redirects []string)

WithRedirects modify the TorProxy struct with givend from -> to map

Jump to

Keyboard shortcuts

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