obfs4

package
v0.0.0-...-08f4d47 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2018 License: BSD-2-Clause, BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Overview

Package obfs4 provides an implementation of the Tor Project's obfs4 obfuscation protocol.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidHandshake = errors.New("handshake: Failed to find M_[C,S]")

ErrInvalidHandshake is the error returned when the obfs4 handshake fails due to the peer not sending the correct mark. This error is fatal and the connection MUST be dropped.

View Source
var ErrMarkNotFoundYet = errors.New("handshake: M_[C,S] not found yet")

ErrMarkNotFoundYet is the error returned when the obfs4 handshake is incomplete and requires more data to continue. This error is non-fatal and is the equivalent to EAGAIN/EWOULDBLOCK.

View Source
var ErrNtorFailed = errors.New("handshake: ntor handshake failure")

ErrNtorFailed is the error returned when the ntor handshake fails. This error is fatal and the connection MUST be dropped.

View Source
var ErrReplayedHandshake = errors.New("handshake: Replay detected")

ErrReplayedHandshake is the error returned when the obfs4 handshake fails due it being replayed. This error is fatal and the connection MUST be dropped.

Functions

This section is empty.

Types

type InvalidAuthError

type InvalidAuthError struct {
	Derived  *ntor.Auth
	Received *ntor.Auth
}

InvalidAuthError is the error returned when the ntor AUTH tags do not match. This error is fatal and the connection MUST be dropped.

func (*InvalidAuthError) Error

func (e *InvalidAuthError) Error() string

type InvalidMacError

type InvalidMacError struct {
	Derived  []byte
	Received []byte
}

InvalidMacError is the error returned when the handshake MACs do not match. This error is fatal and the connection MUST be dropped.

func (*InvalidMacError) Error

func (e *InvalidMacError) Error() string

type InvalidPacketLengthError

type InvalidPacketLengthError int

InvalidPacketLengthError is the error returned when decodePacket detects a invalid packet length/

func (InvalidPacketLengthError) Error

func (e InvalidPacketLengthError) Error() string

type InvalidPayloadLengthError

type InvalidPayloadLengthError int

InvalidPayloadLengthError is the error returned when decodePacket rejects the payload length.

func (InvalidPayloadLengthError) Error

type Transport

type Transport struct{}

Transport is the obfs4 implementation of the base.Transport interface.

func (*Transport) ClientFactory

func (t *Transport) ClientFactory(stateDir string) (base.ClientFactory, error)

ClientFactory returns a new obfs4ClientFactory instance.

func (*Transport) Name

func (t *Transport) Name() string

Name returns the name of the obfs4 transport protocol.

func (*Transport) ServerFactory

func (t *Transport) ServerFactory(stateDir string, args *pt.Args) (base.ServerFactory, error)

ServerFactory returns a new obfs4ServerFactory instance.

Directories

Path Synopsis
Package framing implements the obfs4 link framing and cryptography.
Package framing implements the obfs4 link framing and cryptography.

Jump to

Keyboard shortcuts

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