socks5

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddrERROR  AddrType = 0
	AddrV4              = 1
	AddrDomain          = 3
	AddrV6              = 4
)

网络地址类型

Variables

This section is empty.

Functions

func SocksOPType2NetOPType

func SocksOPType2NetOPType(ct CMDType) mynet.OpType

SocksOPType2NetOPType 将socks5的网络操作类型转换为net中的网络操作类型

Types

type AddrType added in v0.9.6

type AddrType byte

AddrType 地址类型

type CMDType added in v0.9.6

type CMDType int

CMDType 命令类型

const (
	ERROR CMDType = iota
	CONNECT
	BIND
	UDP
)

SOCKS请求的类型

func NetOPType2SocksOPType

func NetOPType2SocksOPType(ot mynet.OpType) CMDType

NetOPType2SocksOPType 将net中的网络操作类型转换为socks5的网络操作类型

type RepType added in v0.9.6

type RepType byte

RepType 反馈的类型

const (
	REPSUCCESS RepType = iota
	REPERROR
)

SOCKS请求是否成功的反馈

type Socks5

type Socks5 struct {
}

Socks5 Socks5协议的实现

func (*Socks5) Handle

func (conn *Socks5) Handle(e *mynet.Arg) (err error)

Handle 处理SOCKS5请求

func (*Socks5) Match

func (conn *Socks5) Match(firstMsg []byte) bool

Match 匹配业务

func (*Socks5) Name

func (conn *Socks5) Name() string

Name 名字

Jump to

Keyboard shortcuts

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