goproxy

package module
v0.0.0-...-9ed9f2e Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

README

goproxy

go proxy

Documentation

Index

Constants

View Source
const (
	AddrTypeIPv4       byte = 0x01
	AddrTypeDomainName byte = 0x03
	AddrTypeIPv6       byte = 0x04

	ActionAccept  = "ACCEPT"
	ActionProxy   = "PROXY"
	ActionReject  = "REJECT"
	ActionDirect  = "DIRECT"
	ActionForward = "FORWARD"

	KB = 1024
	MB = KB * 1024
	GB = MB * 1024
)

Variables

This section is empty.

Functions

func HumanFriendlyTraffic

func HumanFriendlyTraffic(bytes uint64) string

Types

type Conn

type Conn interface {
	// host, raw, net.Conn
	CreateRemoteConn(string, []byte, net.Conn) (net.Conn, error)
	CreatePacketConn(net.Addr, []byte, net.PacketConn)
}

type Logger

type Logger interface {
	Info(...interface{})
	Infof(string, ...interface{})
	Error(...interface{})
	Errorf(string, ...interface{})
	Debug(...interface{})
}

type Match

type Match interface {
	MatchBypass(string) bool
	MatchHosts(string) string
	MatchPort(string) bool
	MatchRule(Metadata) Rule
}

type Metadata

type Metadata interface {
	AddrType() byte
	Port() string
	Host() string
	String() string
}

type Rule

type Rule interface {
	RuleType() byte
	Adapter() string
	String() string
}

Directories

Path Synopsis
Package dns_resolver is a simple dns resolver based on miekg/dns
Package dns_resolver is a simple dns resolver based on miekg/dns

Jump to

Keyboard shortcuts

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