obfs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn(c net.Conn, o Obfs) net.Conn

NewConn wraps a stream-oriented net.Conn with obfs decoding/encoding

Types

type Base

type Base struct {
	IVSize  int
	Key     []byte
	HeadLen int
	Host    string
	Port    int
	Param   string
}

Base information for obfs

type Conn

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

Conn represents an obfs connection

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

type Obfs

type Obfs interface {
	GetObfsOverhead() int
	Decode(b []byte) ([]byte, bool, error)
	Encode(b []byte) ([]byte, error)
	// contains filtered or unexported methods
}

Obfs provides methods for decoding and encoding

func PickObfs

func PickObfs(name string, b *Base) (Obfs, error)

PickObfs returns an obfs of the given name

Jump to

Keyboard shortcuts

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