tcpioneer

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCP_FIN = byte(0x01)
	TCP_SYN = byte(0x02)
	TCP_RST = byte(0x04)
	TCP_PSH = byte(0x08)
	TCP_ACK = byte(0x10)
	TCP_URG = byte(0x20)
	TCP_ECE = byte(0x40)
	TCP_CWR = byte(0x80)
)
View Source
const (
	OPT_NONE   = 0x0
	OPT_TTL    = 0x1 << 0
	OPT_MD5    = 0x1 << 1
	OPT_WMD5   = 0x1 << 2
	OPT_WACK   = 0x1 << 3
	OPT_WCSUM  = 0x1 << 4
	OPT_BAD    = 0x1 << 5
	OPT_IPOPT  = 0x1 << 6
	OPT_SEQ    = 0x1 << 7
	OPT_HTTPS  = 0x1 << 8
	OPT_MSS    = 0x1 << 9
	OPT_WTFO   = 0x1 << 10
	OPT_TFO    = 0x10000 << 0
	OPT_SYN    = 0x10000 << 1
	OPT_NOFLAG = 0x10000 << 2
	OPT_QUIC   = 0x10000 << 3
)

Variables

View Source
var CookiesMap map[string][]byte
View Source
var DNS string = ""
View Source
var DNS64 string = ""
View Source
var DomainMap map[string]Config
View Source
var Forward bool = false
View Source
var IPBlock = false
View Source
var IPMap map[string]IPConfig
View Source
var IPMode = false
View Source
var LogLevel = 0
View Source
var Logger *log.Logger
View Source
var MethodMap = map[string]uint32{
	"none":    OPT_NONE,
	"ttl":     OPT_TTL,
	"mss":     OPT_MSS,
	"md5":     OPT_MD5,
	"w-md5":   OPT_WMD5,
	"w-ack":   OPT_WACK,
	"w-csum":  OPT_WCSUM,
	"bad":     OPT_BAD,
	"ipopt":   OPT_IPOPT,
	"seq":     OPT_SEQ,
	"https":   OPT_HTTPS,
	"w-tfo":   OPT_WTFO,
	"tfo":     OPT_TFO,
	"syn":     OPT_SYN,
	"no-flag": OPT_NOFLAG,
	"quic":    OPT_QUIC,
}
View Source
var PortList4 [65536]*ConnInfo
View Source
var PortList6 [65536]*ConnInfo
View Source
var SubdomainDepth = 2
View Source
var SynOption []byte
View Source
var TFOEnable = false

Functions

func DNSDaemon

func DNSDaemon()

func DNSRecvDaemon

func DNSRecvDaemon()

func LoadConfig

func LoadConfig() error

func NAT64

func NAT64(ipv6 net.IP, ipv4 net.IP, forward bool)

func SendFakePacket

func SendFakePacket(winDivert *godivert.WinDivertHandle, info *ConnInfo, packet *godivert.Packet, host_offset int, host_length int, id int) (int, error)

func TCPDaemon

func TCPDaemon(address string, forward bool)

func TCPlookup

func TCPlookup(request []byte, address string) ([]byte, error)

func TCPlookupDNS64

func TCPlookupDNS64(request []byte, address string, offset int, prefix []byte) ([]byte, error)

func TFORecv

func TFORecv(srcPort int, forward bool)

func UDPDaemon

func UDPDaemon(dstPort int, forward bool)

func Wait

func Wait()

Types

type Config

type Config struct {
	Option   uint32
	TTL      byte
	MAXTTL   byte
	MSS      uint16
	ANCount4 int16
	ANCount6 int16
	Answers4 []byte
	Answers6 []byte
}

type ConnInfo

type ConnInfo struct {
	Option uint32
	SeqNum uint32
	TTL    byte
	MAXTTL byte
}

type IPConfig

type IPConfig struct {
	Option uint32
	TTL    byte
	MAXTTL byte
	MSS    uint16
}

func IPBlockLookup

func IPBlockLookup(addr string) (IPConfig, bool)

func IPLookup

func IPLookup(addr string) (IPConfig, bool)

Jump to

Keyboard shortcuts

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