Versions in this module Expand all Collapse all v1 v1.0.0 Dec 9, 2024 Changes in this version + var File_app_tun_config_proto protoreflect.FileDescriptor + func NewDeviceWithSorter(overlay device.Device, sorter *tunsorter.TunSorter) device.Device + type Config struct + EnablePromiscuousMode bool + EnableSpoofing bool + Ips []*routercommon.CIDR + Mtu uint32 + Name string + PacketEncoding packetaddr.PacketAddrType + Routes []*routercommon.CIDR + SniffingSettings *proxyman.SniffingConfig + SocketSettings *internet.SocketConfig + Tag string + UserLevel uint32 + func (*Config) Descriptor() ([]byte, []int) + func (*Config) ProtoMessage() + func (x *Config) GetEnablePromiscuousMode() bool + func (x *Config) GetEnableSpoofing() bool + func (x *Config) GetIps() []*routercommon.CIDR + func (x *Config) GetMtu() uint32 + func (x *Config) GetName() string + func (x *Config) GetPacketEncoding() packetaddr.PacketAddrType + func (x *Config) GetRoutes() []*routercommon.CIDR + func (x *Config) GetSniffingSettings() *proxyman.SniffingConfig + func (x *Config) GetSocketSettings() *internet.SocketConfig + func (x *Config) GetTag() string + func (x *Config) GetUserLevel() uint32 + func (x *Config) ProtoReflect() protoreflect.Message + func (x *Config) Reset() + func (x *Config) String() string + type StackOption func(*stack.Stack) error + func AddProtocolAddress(id tcpip.NICID, ips []*routercommon.CIDR) StackOption + func CreateNIC(id tcpip.NICID, linkEndpoint stack.LinkEndpoint) StackOption + func SetPromiscuousMode(id tcpip.NICID, enable bool) StackOption + func SetRouteTable(id tcpip.NICID, routes []*routercommon.CIDR) StackOption + func SetSpoofing(id tcpip.NICID, enable bool) StackOption + func SetTCPHandler(ctx context.Context, dispatcher routing.Dispatcher, ...) StackOption + func SetTCPReceiveBufferSize(size int) StackOption + func SetTCPSendBufferSize(size int) StackOption + func SetUDPHandler(ctx context.Context, dispatcher routing.Dispatcher, ...) StackOption + type TCPHandler struct + func (h *TCPHandler) Handle(conn tun_net.TCPConn) error + type TUN struct + func (t *TUN) Close() error + func (t *TUN) CreateStack(linkedEndpoint stack.LinkEndpoint) (*stack.Stack, error) + func (t *TUN) Init(ctx context.Context, config *Config, dispatcher routing.Dispatcher, ...) error + func (t *TUN) Start() error + func (t *TUN) Type() interface{} + type UDPHandler struct + func (h *UDPHandler) Handle(conn tun_net.UDPConn) error