Documentation ¶
Index ¶
- func BindToInterface0(finder InterfaceFinder, conn syscall.RawConn, network string, address string, ...) error
- func Conn(conn syscall.Conn, block func(fd uintptr) error) error
- func Conn0[T any](conn syscall.Conn, block func(fd uintptr) (T, error)) (T, error)
- func GetOriginalDestination(conn net.Conn) (netip.AddrPort, error)
- func GetOriginalDestinationFromOOB(oob []byte) (netip.AddrPort, error)
- func Raw(rawConn syscall.RawConn, block func(fd uintptr) error) error
- func Raw0[T any](rawConn syscall.RawConn, block func(fd uintptr) (T, error)) (T, error)
- func TProxy(fd uintptr, family int) error
- type DefaultInterfaceFinder
- func (f *DefaultInterfaceFinder) InterfaceByAddr(addr netip.Addr) (*Interface, error)
- func (f *DefaultInterfaceFinder) InterfaceIndexByName(name string) (int, error)
- func (f *DefaultInterfaceFinder) InterfaceNameByIndex(index int) (string, error)
- func (f *DefaultInterfaceFinder) Interfaces() []Interface
- func (f *DefaultInterfaceFinder) Update() error
- func (f *DefaultInterfaceFinder) UpdateInterfaces(interfaces []Interface)
- type Func
- func Append(oldFunc Func, newFunc Func) Func
- func BindToInterface(finder InterfaceFinder, interfaceName string, interfaceIndex int) Func
- func BindToInterfaceFunc(finder InterfaceFinder, ...) Func
- func DisableUDPFragment() Func
- func ProtectPath(protectPath string) Func
- func ReuseAddr() Func
- func RoutingMark(mark uint32) Func
- func SetKeepAlivePeriod(idle time.Duration, interval time.Duration) Func
- func TProxyWriteBack() Func
- type Interface
- type InterfaceFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindToInterface0 ¶
func GetOriginalDestination ¶ added in v0.5.0
func GetOriginalDestinationFromOOB ¶ added in v0.5.0
Types ¶
type DefaultInterfaceFinder ¶
type DefaultInterfaceFinder struct {
// contains filtered or unexported fields
}
func NewDefaultInterfaceFinder ¶ added in v0.4.0
func NewDefaultInterfaceFinder() *DefaultInterfaceFinder
func (*DefaultInterfaceFinder) InterfaceByAddr ¶ added in v0.4.0
func (f *DefaultInterfaceFinder) InterfaceByAddr(addr netip.Addr) (*Interface, error)
func (*DefaultInterfaceFinder) InterfaceIndexByName ¶ added in v0.4.0
func (f *DefaultInterfaceFinder) InterfaceIndexByName(name string) (int, error)
func (*DefaultInterfaceFinder) InterfaceNameByIndex ¶ added in v0.4.0
func (f *DefaultInterfaceFinder) InterfaceNameByIndex(index int) (string, error)
func (*DefaultInterfaceFinder) Interfaces ¶ added in v0.5.0
func (f *DefaultInterfaceFinder) Interfaces() []Interface
func (*DefaultInterfaceFinder) Update ¶ added in v0.4.0
func (f *DefaultInterfaceFinder) Update() error
func (*DefaultInterfaceFinder) UpdateInterfaces ¶ added in v0.4.0
func (f *DefaultInterfaceFinder) UpdateInterfaces(interfaces []Interface)
type Func ¶
func BindToInterface ¶
func BindToInterface(finder InterfaceFinder, interfaceName string, interfaceIndex int) Func
func BindToInterfaceFunc ¶
func DisableUDPFragment ¶
func DisableUDPFragment() Func
func ProtectPath ¶
func RoutingMark ¶
func SetKeepAlivePeriod ¶ added in v0.4.0
func TProxyWriteBack ¶ added in v0.5.0
func TProxyWriteBack() Func
Click to show internal directories.
Click to hide internal directories.