obfs

package
Version: v0.0.0-...-9a4d6f5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptionNone  = byte(0x00)
	OptionData  = byte(0x01)
	OptionError = byte(0x02)
)

Variables

This section is empty.

Functions

func NewV2rayObfs

func NewV2rayObfs(conn net.Conn, option *Option) (net.Conn, error)

NewV2rayObfs return a HTTPObfs

Types

type Mux

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

Mux is an mux-compatible client for v2ray-plugin, not a complete implementation

func NewMux

func NewMux(conn net.Conn, option MuxOption) *Mux

func (*Mux) Close

func (m *Mux) Close() error

func (*Mux) Read

func (m *Mux) Read(b []byte) (int, error)

func (*Mux) Write

func (m *Mux) Write(b []byte) (int, error)

type MuxOption

type MuxOption struct {
	ID   [2]byte
	Port uint16
	Host string
	Type string
}

type Option

type Option struct {
	Host      string
	Path      string
	Headers   map[string]string
	TLSConfig *tls.Config
	Mux       bool
}

Option is options of websocket obfs

type SessionStatus

type SessionStatus = byte
const (
	SessionStatusNew       SessionStatus = 0x01
	SessionStatusKeep      SessionStatus = 0x02
	SessionStatusEnd       SessionStatus = 0x03
	SessionStatusKeepAlive SessionStatus = 0x04
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL