socks

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Q_SOCKS   byte = 7
	SOCKS_5   byte = 5
	CONNECT   byte = 1
	ASSOCIATE byte = 3
)

Variables

This section is empty.

Functions

func NewLocal

func NewLocal(p *proxy.Proto) proxy.Peer

func NewQSocksLocal

func NewQSocksLocal(p *proxy.Proto) proxy.Peer

func NewRemote

func NewRemote(p *proxy.Proto) proxy.Peer

Types

type Local

type Local struct {
	Socks
}

func (Local) BeforeSend

func (l Local) BeforeSend(t *proxy.Tunnel) (err error)

type Socks

type Socks struct {
	*proxy.Proto
	Ver byte
}

func (Socks) Handle

func (s Socks) Handle(src net.Conn)

func (Socks) WriteMethod

func (s Socks) WriteMethod(t *proxy.Tunnel) (err error)

*

socks5 header
+----+-----+-------+------+------+----+
|  CMD | ATYP | DST.ADDR  |  DST.PORT |
+----+-----+-------+------+------+----+
|   1  |  1   | Variable  |    2      |
+----+-----+-------+------+------+----+

Jump to

Keyboard shortcuts

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