Documentation
¶
Index ¶
- Variables
- func NewDeviceWithSorter(overlay device.Device, sorter *tunsorter.TunSorter) device.Device
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- 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) GetPacketEncodingBypassPorts() []uint32
- func (x *Config) GetPreopenedFd() int32
- 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) GetUdpBridge() *UDPBridgeConfig
- func (x *Config) GetUserLevel() uint32
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type StackOption
- 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
- type TUN
- type UDPBridgeConfig
- func (*UDPBridgeConfig) Descriptor() ([]byte, []int)deprecated
- func (x *UDPBridgeConfig) GetListenAddress() string
- func (x *UDPBridgeConfig) GetListenPort() uint32
- func (x *UDPBridgeConfig) GetPeerAddress() string
- func (x *UDPBridgeConfig) GetPeerPort() uint32
- func (x *UDPBridgeConfig) GetQueueSize() uint32
- func (*UDPBridgeConfig) ProtoMessage()
- func (x *UDPBridgeConfig) ProtoReflect() protoreflect.Message
- func (x *UDPBridgeConfig) Reset()
- func (x *UDPBridgeConfig) String() string
- type UDPHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var File_app_tun_config_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Config ¶
type Config struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Mtu uint32 `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"`
UserLevel uint32 `protobuf:"varint,3,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
PacketEncoding packetaddr.PacketAddrType `` /* 150-byte string literal not displayed */
Tag string `protobuf:"bytes,5,opt,name=tag,proto3" json:"tag,omitempty"`
Ips []*routercommon.CIDR `protobuf:"bytes,6,rep,name=ips,proto3" json:"ips,omitempty"`
Routes []*routercommon.CIDR `protobuf:"bytes,7,rep,name=routes,proto3" json:"routes,omitempty"`
EnablePromiscuousMode bool `` /* 127-byte string literal not displayed */
EnableSpoofing bool `protobuf:"varint,9,opt,name=enable_spoofing,json=enableSpoofing,proto3" json:"enable_spoofing,omitempty"`
SocketSettings *internet.SocketConfig `protobuf:"bytes,10,opt,name=socket_settings,json=socketSettings,proto3" json:"socket_settings,omitempty"`
SniffingSettings *proxyman.SniffingConfig `protobuf:"bytes,11,opt,name=sniffing_settings,json=sniffingSettings,proto3" json:"sniffing_settings,omitempty"`
PreopenedFd *int32 `protobuf:"varint,12,opt,name=preopened_fd,json=preopenedFd,proto3,oneof" json:"preopened_fd,omitempty"`
UdpBridge *UDPBridgeConfig `protobuf:"bytes,13,opt,name=udp_bridge,json=udpBridge,proto3" json:"udp_bridge,omitempty"`
PacketEncodingBypassPorts []uint32 `` /* 149-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*Config) Descriptor
deprecated
func (*Config) GetEnablePromiscuousMode ¶
func (*Config) GetEnableSpoofing ¶
func (*Config) GetIps ¶
func (x *Config) GetIps() []*routercommon.CIDR
func (*Config) GetPacketEncoding ¶
func (x *Config) GetPacketEncoding() packetaddr.PacketAddrType
func (*Config) GetPacketEncodingBypassPorts ¶ added in v5.54.0
func (*Config) GetPreopenedFd ¶ added in v5.53.0
func (*Config) GetRoutes ¶
func (x *Config) GetRoutes() []*routercommon.CIDR
func (*Config) GetSniffingSettings ¶ added in v5.11.0
func (x *Config) GetSniffingSettings() *proxyman.SniffingConfig
func (*Config) GetSocketSettings ¶
func (x *Config) GetSocketSettings() *internet.SocketConfig
func (*Config) GetUdpBridge ¶ added in v5.54.0
func (x *Config) GetUdpBridge() *UDPBridgeConfig
func (*Config) GetUserLevel ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type StackOption ¶
func AddProtocolAddress ¶
func AddProtocolAddress(id tcpip.NICID, ips []*routercommon.CIDR) StackOption
func CreateNIC ¶
func CreateNIC(id tcpip.NICID, linkEndpoint stack.LinkEndpoint) StackOption
func SetPromiscuousMode ¶
func SetPromiscuousMode(id tcpip.NICID, enable bool) StackOption
func SetRouteTable ¶
func SetRouteTable(id tcpip.NICID, routes []*routercommon.CIDR) StackOption
func SetSpoofing ¶
func SetSpoofing(id tcpip.NICID, enable bool) StackOption
func SetTCPHandler ¶
func SetTCPHandler(ctx context.Context, dispatcher routing.Dispatcher, policyManager policy.Manager, config *Config) StackOption
func SetTCPReceiveBufferSize ¶
func SetTCPReceiveBufferSize(size int) StackOption
func SetTCPSendBufferSize ¶
func SetTCPSendBufferSize(size int) StackOption
func SetUDPHandler ¶
func SetUDPHandler(ctx context.Context, dispatcher routing.Dispatcher, policyManager policy.Manager, config *Config) StackOption
type TCPHandler ¶
type TCPHandler struct {
// contains filtered or unexported fields
}
type TUN ¶
type TUN struct {
// contains filtered or unexported fields
}
func (*TUN) CreateStack ¶
type UDPBridgeConfig ¶ added in v5.54.0
type UDPBridgeConfig struct {
ListenAddress string `protobuf:"bytes,1,opt,name=listen_address,json=listenAddress,proto3" json:"listen_address,omitempty"`
ListenPort uint32 `protobuf:"varint,2,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"`
PeerAddress string `protobuf:"bytes,3,opt,name=peer_address,json=peerAddress,proto3" json:"peer_address,omitempty"`
PeerPort uint32 `protobuf:"varint,4,opt,name=peer_port,json=peerPort,proto3" json:"peer_port,omitempty"`
QueueSize uint32 `protobuf:"varint,5,opt,name=queue_size,json=queueSize,proto3" json:"queue_size,omitempty"`
// contains filtered or unexported fields
}
func (*UDPBridgeConfig) Descriptor
deprecated
added in
v5.54.0
func (*UDPBridgeConfig) Descriptor() ([]byte, []int)
Deprecated: Use UDPBridgeConfig.ProtoReflect.Descriptor instead.
func (*UDPBridgeConfig) GetListenAddress ¶ added in v5.54.0
func (x *UDPBridgeConfig) GetListenAddress() string
func (*UDPBridgeConfig) GetListenPort ¶ added in v5.54.0
func (x *UDPBridgeConfig) GetListenPort() uint32
func (*UDPBridgeConfig) GetPeerAddress ¶ added in v5.54.0
func (x *UDPBridgeConfig) GetPeerAddress() string
func (*UDPBridgeConfig) GetPeerPort ¶ added in v5.54.0
func (x *UDPBridgeConfig) GetPeerPort() uint32
func (*UDPBridgeConfig) GetQueueSize ¶ added in v5.54.0
func (x *UDPBridgeConfig) GetQueueSize() uint32
func (*UDPBridgeConfig) ProtoMessage ¶ added in v5.54.0
func (*UDPBridgeConfig) ProtoMessage()
func (*UDPBridgeConfig) ProtoReflect ¶ added in v5.54.0
func (x *UDPBridgeConfig) ProtoReflect() protoreflect.Message
func (*UDPBridgeConfig) Reset ¶ added in v5.54.0
func (x *UDPBridgeConfig) Reset()
func (*UDPBridgeConfig) String ¶ added in v5.54.0
func (x *UDPBridgeConfig) String() string
type UDPHandler ¶
type UDPHandler struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.