nat

package
v1.19.32-clash.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: GPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriteBackProxy

func NewWriteBackProxy(wb C.WriteBack) C.WriteBackProxy

Types

type Table

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

func New

func New() *Table

New return *Cache

func (*Table) AddForLocalConn

func (t *Table) AddForLocalConn(lAddr, rAddr string, conn *net.UDPConn) bool

func (*Table) Delete

func (t *Table) Delete(key string)

func (*Table) DeleteForLocalConn

func (t *Table) DeleteForLocalConn(lAddr, key string)

func (*Table) DeleteLockForLocalConn

func (t *Table) DeleteLockForLocalConn(lAddr, key string)

func (*Table) GetForLocalConn

func (t *Table) GetForLocalConn(lAddr, rAddr string) *net.UDPConn

func (*Table) GetOrCreate

func (t *Table) GetOrCreate(key string, maker func() C.PacketSender) (C.PacketSender, bool)

func (*Table) GetOrCreateLockForLocalConn

func (t *Table) GetOrCreateLockForLocalConn(lAddr, key string) (*sync.Cond, bool)

func (*Table) RangeForLocalConn

func (t *Table) RangeForLocalConn(lAddr string, f func(key string, value *net.UDPConn) bool)

Jump to

Keyboard shortcuts

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