Documentation ¶
Index ¶
- Variables
- func Add(ctx C.ConnContext)
- func AddPacket(packet *inbound.PacketAdapter)
- func Providers() map[string]provider.ProxyProvider
- func Proxies() map[string]C.Proxy
- func Rules() []C.Rule
- func SetMode(m TunnelMode)
- func UpdateProxies(newProxies map[string]C.Proxy, newProviders map[string]provider.ProxyProvider)
- func UpdateRules(newRules []C.Rule)
- type TunnelMode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ModeMapping is a mapping for Mode enum ModeMapping = map[string]TunnelMode{ Global.String(): Global, Rule.String(): Rule, Direct.String(): Direct, } )
Functions ¶
func AddPacket ¶ added in v0.18.0
func AddPacket(packet *inbound.PacketAdapter)
AddPacket add udp Packet to queue
func Providers ¶ added in v0.18.0
func Providers() map[string]provider.ProxyProvider
Providers return all compatible providers
func UpdateProxies ¶ added in v0.18.0
UpdateProxies handle update proxies
func UpdateRules ¶ added in v0.18.0
UpdateRules handle update rules
Types ¶
type TunnelMode ¶ added in v0.18.0
type TunnelMode int
const ( Global TunnelMode = iota Rule Direct )
func (TunnelMode) MarshalJSON ¶ added in v0.18.0
func (m TunnelMode) MarshalJSON() ([]byte, error)
MarshalJSON serialize Mode
func (TunnelMode) MarshalYAML ¶ added in v0.19.0
func (m TunnelMode) MarshalYAML() (interface{}, error)
MarshalYAML serialize TunnelMode with yaml
func (TunnelMode) String ¶ added in v0.18.0
func (m TunnelMode) String() string
func (*TunnelMode) UnmarshalJSON ¶ added in v0.18.0
func (m *TunnelMode) UnmarshalJSON(data []byte) error
UnmarshalJSON unserialize Mode
func (*TunnelMode) UnmarshalYAML ¶ added in v0.18.0
func (m *TunnelMode) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unserialize Mode with yaml
Click to show internal directories.
Click to hide internal directories.