ebpf

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyWrapper added in v0.30.0

type ProxyWrapper struct {
	WgeBPFProxy *WGEBPFProxy
	// contains filtered or unexported fields
}

ProxyWrapper help to keep the remoteConn instance for net.Conn.Close function call

func (*ProxyWrapper) AddTurnConn added in v0.30.0

func (p *ProxyWrapper) AddTurnConn(ctx context.Context, remoteConn net.Conn) error

func (*ProxyWrapper) CloseConn added in v0.30.0

func (e *ProxyWrapper) CloseConn() error

CloseConn close the remoteConn and automatically remove the conn instance from the map

func (*ProxyWrapper) EndpointAddr added in v0.30.2

func (p *ProxyWrapper) EndpointAddr() *net.UDPAddr

func (*ProxyWrapper) Pause added in v0.30.2

func (p *ProxyWrapper) Pause()

func (*ProxyWrapper) Work added in v0.30.2

func (p *ProxyWrapper) Work()

type WGEBPFProxy added in v0.30.0

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

WGEBPFProxy definition for proxy with EBPF support

func NewWGEBPFProxy added in v0.30.0

func NewWGEBPFProxy(wgPort int) *WGEBPFProxy

NewWGEBPFProxy create new WGEBPFProxy instance

func (*WGEBPFProxy) AddTurnConn added in v0.30.0

func (p *WGEBPFProxy) AddTurnConn(turnConn net.Conn) (*net.UDPAddr, error)

AddTurnConn add new turn connection for the proxy

func (*WGEBPFProxy) Free added in v0.30.0

func (p *WGEBPFProxy) Free() error

Free resources except the remoteConns will be keep open.

func (*WGEBPFProxy) Listen added in v0.30.0

func (p *WGEBPFProxy) Listen() error

Listen load ebpf program and listen the proxy

Jump to

Keyboard shortcuts

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