tcp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SocksInvalid = iota
	Socks4
	Socks4A
	Socks5

	Socks4Version = 0x04
	Socks5Version = 0x05

	Socks4ReplyVN = 0x00

	Socks4CmdTCPConnect = 0x01
	Socks4CmdTCPBind    = 0x02

	Socks4ReqGranted        = 0x5A
	Socks4ReqRejectOrFailed = 0x5B
	Socks4ReqRejectIdentd   = 0x5C
	Socks4ReqRejectUser     = 0x5D

	Socks5CmdTCPConnect   = 0x01
	Socks5CmdTCPBind      = 0x02
	Socks5CmdUDPAssociate = 0x03

	Socks5AuthNotRequired      = 0x00
	Socks5AuthPassword         = 0x02
	Socks5AuthNoMatchingMethod = 0xFF

	Socks5AuthSuccess = 0x00
	Socks5AuthFailure = 0x01

	Socks5AddrTypeIPv4   = 0x01
	Socks5AddrTypeDomain = 0x03
	Socks5AddrTypeIPv6   = 0x04
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FETAnalyzer

type FETAnalyzer struct{}

FETAnalyzer stands for "Fully Encrypted Traffic" analyzer. It implements an algorithm to detect fully encrypted proxy protocols such as Shadowsocks, mentioned in the following paper: https://gfw.report/publications/usenixsecurity23/data/paper/paper.pdf

func (*FETAnalyzer) Limit

func (a *FETAnalyzer) Limit() int

func (*FETAnalyzer) Name

func (a *FETAnalyzer) Name() string

func (*FETAnalyzer) NewTCP

func (a *FETAnalyzer) NewTCP(info analyzer.TCPInfo, logger analyzer.Logger) analyzer.TCPStream

type HTTPAnalyzer

type HTTPAnalyzer struct{}

func (*HTTPAnalyzer) Limit

func (a *HTTPAnalyzer) Limit() int

func (*HTTPAnalyzer) Name

func (a *HTTPAnalyzer) Name() string

func (*HTTPAnalyzer) NewTCP

func (a *HTTPAnalyzer) NewTCP(info analyzer.TCPInfo, logger analyzer.Logger) analyzer.TCPStream

type SSHAnalyzer

type SSHAnalyzer struct{}

func (*SSHAnalyzer) Limit

func (a *SSHAnalyzer) Limit() int

func (*SSHAnalyzer) Name

func (a *SSHAnalyzer) Name() string

func (*SSHAnalyzer) NewTCP

func (a *SSHAnalyzer) NewTCP(info analyzer.TCPInfo, logger analyzer.Logger) analyzer.TCPStream

type SocksAnalyzer added in v0.0.4

type SocksAnalyzer struct{}

func (*SocksAnalyzer) Limit added in v0.0.4

func (a *SocksAnalyzer) Limit() int

func (*SocksAnalyzer) Name added in v0.0.4

func (a *SocksAnalyzer) Name() string

func (*SocksAnalyzer) NewTCP added in v0.0.4

type TLSAnalyzer

type TLSAnalyzer struct{}

func (*TLSAnalyzer) Limit

func (a *TLSAnalyzer) Limit() int

func (*TLSAnalyzer) Name

func (a *TLSAnalyzer) Name() string

func (*TLSAnalyzer) NewTCP

func (a *TLSAnalyzer) NewTCP(info analyzer.TCPInfo, logger analyzer.Logger) analyzer.TCPStream

type TrojanAnalyzer added in v0.0.2

type TrojanAnalyzer struct{}

TrojanAnalyzer uses a very simple packet length based check to determine if a TLS connection is actually the Trojan proxy protocol. The algorithm is from the following project, with small modifications: https://github.com/XTLS/Trojan-killer Warning: Experimental only. This method is known to have significant false positives and false negatives.

func (*TrojanAnalyzer) Limit added in v0.0.2

func (a *TrojanAnalyzer) Limit() int

func (*TrojanAnalyzer) Name added in v0.0.2

func (a *TrojanAnalyzer) Name() string

func (*TrojanAnalyzer) NewTCP added in v0.0.2

Jump to

Keyboard shortcuts

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