niaucchi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

README

niaucchi: the traffic smuggler

niaucchi is a drop-in replacement for TCP that incorporates MiniSS/LLObfs obfuscation. It's specifically designed to quickly traverse the Great Firewall of China, so it also splits traffic over multiple TCP connections to get good throughput across the lossy, fat, and long links that typify international connections out of mainland China.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOperationTimeout = errors.New("operation timed out")

ErrOperationTimeout indicates that an operation (such as waiting for an ack) timed out fatally.

View Source
var ErrProtocolFail = errors.New("protocol failure")

ErrProtocolFail indicates a fatal protocol failure.

View Source
var ErrWatchdogTimeout = errors.New("watchdog timed out")

ErrWatchdogTimeout indicates that the watchdog timed out fatally.

Functions

This section is empty.

Types

type Listener

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

Listener is a niaucchi listener.

func Listen

func Listen(ocookie []byte, identity natrium.ECDHPrivate, addr string) (lsnr *Listener, err error)

Listen returns a niaucchi listener. If the given obfuscation cookie is nil, the unobfuscated protocol will be used.

func (*Listener) AcceptSubstrate

func (ln *Listener) AcceptSubstrate() (*Substrate, error)

AcceptSubstrate accepts a new client.

func (*Listener) Addr

func (ln *Listener) Addr() net.Addr

Addr returns the listening address.

type Substrate

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

Substrate represents a pool of connections over which carried connections are multiplexed.

func DialSubstrate

func DialSubstrate(ocookie []byte, ourSK natrium.ECDHPrivate,
	theirPK natrium.ECDHPublic, addr string, mult int) (ss *Substrate, err error)

DialSubstrate dials to the given destination and returns a substrate. A nil obfuscation cookie means the unobfuscated protocol would be used.

func NewSubstrate

func NewSubstrate(transport []net.Conn) *Substrate

NewSubstrate creates a Substrate from the given connections.

func (*Substrate) AcceptConn

func (ss *Substrate) AcceptConn() (cn net.Conn, data []byte, err error)

AcceptConn accepts a new tunneled connection over the substrate.

func (*Substrate) OpenConn

func (ss *Substrate) OpenConn() (cn net.Conn, err error)

OpenConn opens a new tunneled connection over the substrate.

func (*Substrate) RemotePK

func (ss *Substrate) RemotePK() natrium.ECDHPublic

RemotePK gets their PK.

func (*Substrate) Tomb

func (ss *Substrate) Tomb() *tomb.Tomb

Tomb returns the substrate's associated tomb.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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