iptables

package
v0.0.0-...-109c5d9 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartUDPTProxyListener

func StartUDPTProxyListener(port int) (*os.File, error)

Initialize a port as a TPROXY socket. This can be sent over UDS from the root, and used for UDP capture.

Types

type TProxyUDP

type TProxyUDP struct {
	// contains filtered or unexported fields
}

Handles UDP packets intercepted using TProxy. Can send packets preserving original IP/port.

func NewTproxy

func NewTproxy(udpNat *udp.UDPGate, addr string) (*TProxyUDP, error)

func (*TProxyUDP) BlockingLoop

func (tu *TProxyUDP) BlockingLoop(u ugate.UDPHandler)

Handle packets received on the tproxy interface.

func (*TProxyUDP) WriteTo

func (tudp *TProxyUDP) WriteTo(data []byte, dstAddr *net.UDPAddr, srcAddr *net.UDPAddr) (int, error)

UDP write with source address control.

Jump to

Keyboard shortcuts

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