tproxy

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUdpIdleTimeout   = 5 * time.Minute
	DefaultUdpCheckInterval = 30 * time.Second
)

Variables

This section is empty.

Functions

func New

func New(config Config) (intercept.Interceptor, error)

Types

type Config

type Config struct {
	LanIf            string
	Diverter         string
	UDPIdleTimeout   time.Duration
	UDPCheckInterval time.Duration
}

type IPPortAddr

type IPPortAddr interface {
	GetIP() net.IP
	GetPort() int
	GetProtocol() string
}

type TCPIPPortAddr

type TCPIPPortAddr net.TCPAddr

func (*TCPIPPortAddr) GetIP

func (addr *TCPIPPortAddr) GetIP() net.IP

func (*TCPIPPortAddr) GetPort

func (addr *TCPIPPortAddr) GetPort() int

func (*TCPIPPortAddr) GetProtocol

func (addr *TCPIPPortAddr) GetProtocol() string

type UDPIPPortAddr

type UDPIPPortAddr net.UDPAddr

func (*UDPIPPortAddr) GetIP

func (addr *UDPIPPortAddr) GetIP() net.IP

func (*UDPIPPortAddr) GetPort

func (addr *UDPIPPortAddr) GetPort() int

func (*UDPIPPortAddr) GetProtocol

func (addr *UDPIPPortAddr) GetProtocol() string

Jump to

Keyboard shortcuts

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