obfs

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: GPL-3.0 Imports: 9 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
	Port           string
	Path           string
	Headers        map[string]string
	TLS            bool
	SkipCertVerify bool
	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
y or Y : Canonical URL