forwarding

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NonAnonymous

func NonAnonymous(s *Service)

NonAnonymous configures this service to forward as a non-anonymous service. The use of this option requires tor.Start to have been configured with tor.NonAnonymous. Import forwards are also not allowed with this option, because Tor will not accept Socks proxy connections in this mode.

Types

type Option

type Option func(s *Service)

Option is an option that configures Tor.

func AuthClients

func AuthClients(authClients []string) Option

AuthClients configures this service to only authorize the given client public keys access to onion services.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements a forwarding service. It sets up and operates forwarding as defined by configuration.

func New

func New(t *tor.Tor, fwds ...*config.Forward) *Service

New returns a new forwarding service.

func (*Service) Done

func (s *Service) Done() <-chan struct{}

Done returns a channel that closes when the forwarding service is shut down. This may be used to wait for all the forwards to close before shutting down tor.

func (*Service) Start

func (s *Service) Start(ctx context.Context, options ...Option) (map[string]string, error)

Start starts forwarding.

Jump to

Keyboard shortcuts

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