interceptor

package
v0.0.0-...-fd97e0e Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2016 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

interceptor acts as an intermediary between a local SOCKS proxy intercepting VPN traffic and Lantern

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManyFailures = errors.New("Too many connection failures")
	ErrNoSocksProxy    = errors.New("Unable to start local SOCKS proxy")
	ErrDialTimeout     = errors.New("Error dialing tunnel: timeout")
)

Errors introduced by the interceptor service

Functions

This section is empty.

Types

type DialFunc

type DialFunc func(network, addr string) (net.Conn, error)

type InterceptedConn

type InterceptedConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*InterceptedConn) Do

func (ic *InterceptedConn) Do() error

type Interceptor

type Interceptor struct {

	// Maximum duration for full request writing (including body).
	//
	// By default request write timeout is unlimited.
	WriteTimeout time.Duration

	ReadTimeout time.Duration

	Dial DialFunc
	// contains filtered or unexported fields
}

Interceptor is responsible for intercepting traffic on the VPN interface.

func Do

func Do(client *client.Client,
	socksAddr, httpAddr string, notice func(string, bool)) (*Interceptor, error)

func (*Interceptor) Do

func (i *Interceptor) Do(conn *socks.SocksConn) error

func (*Interceptor) Stop

func (i *Interceptor) Stop()

Stop closes the SOCKS listener and stats service it also closes all pending connections

Jump to

Keyboard shortcuts

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