psiphonx

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package psiphonx is a wrapper around the psiphon-tunnel-core.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Dependencies contains dependencies for Start.
	Dependencies Dependencies

	// WorkDir is the directory where Psiphon should store
	// its configuration database.
	WorkDir string
}

Config contains the settings for Start. The empty config object implies that we will be using default settings for starting the tunnel.

type Dependencies

type Dependencies interface {
	MkdirAll(path string, perm os.FileMode) error
	RemoveAll(path string) error
	Start(ctx context.Context, config []byte,
		workdir string) (*clientlib.PsiphonTunnel, error)
}

Dependencies contains dependencies for Start

type Tunnel

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

Tunnel is a psiphon tunnel

func Start

func Start(
	ctx context.Context, sess model.ExperimentSession, config Config) (*Tunnel, error)

Start starts the psiphon tunnel.

func (*Tunnel) BootstrapTime

func (t *Tunnel) BootstrapTime() (duration time.Duration)

BootstrapTime returns the bootstrap time

func (*Tunnel) SOCKS5ProxyURL

func (t *Tunnel) SOCKS5ProxyURL() (proxyURL *url.URL)

SOCKS5ProxyURL returns the SOCKS5 proxy URL.

func (*Tunnel) Stop

func (t *Tunnel) Stop()

Stop is an idempotent method that shuts down the tunnel

Jump to

Keyboard shortcuts

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