Documentation ¶
Overview ¶
Package obfs4 provides an implementation of the Tor Project's obfs4 obfuscation protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.
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.
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.
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 ¶
func RunLocalObfs4Server ¶ added in v2.1.12
RunLocalObfs4Server runs the server side in the background for the test
Types ¶
type ClientArgs ¶ added in v2.1.12
type ClientArgs struct {
// contains filtered or unexported fields
}
ClientArgs contains arguments for client side
type InvalidAuthError ¶
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 ¶
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 ¶
func (e InvalidPayloadLengthError) Error() string
type OptimizerTransport ¶ added in v2.1.12
OptimizerTransport contains parameters to be used in Optimizer
type ServerFactory ¶ added in v2.1.12
type ServerFactory struct {
// contains filtered or unexported fields
}
ServerFactory contains arguments for server side
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport that uses the obfs4 protocol to shapeshift the application network traffic
func NewObfs4Client ¶
NewObfs4Client initializes the obfs4 client side
func NewObfs4Server ¶
NewObfs4Server initializes the obfs4 server side
func RunObfs4Client ¶ added in v2.1.12
RunObfs4Client runs the client side in the background for the test