Documentation ¶
Index ¶
- Variables
- func Providers() map[string]provider.ProxyProvider
- func Proxies() map[string]C.Proxy
- func Rules() []C.Rule
- func SetMode(m TunnelMode)
- func TCPIn() chan<- C.ConnContext
- func UDPIn() chan<- *inbound.PacketAdapter
- 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 = map[string]TunnelMode{ Global.String(): Global, Rule.String(): Rule, Direct.String(): Direct, }
ModeMapping is a mapping for Mode enum
Functions ¶
func Providers ¶
func Providers() map[string]provider.ProxyProvider
Providers return all compatible providers
func UpdateProxies ¶
UpdateProxies handle update proxies
Types ¶
type TunnelMode ¶
type TunnelMode int
const ( Global TunnelMode = iota Rule Direct )
func (TunnelMode) MarshalJSON ¶
func (m TunnelMode) MarshalJSON() ([]byte, error)
MarshalJSON serialize Mode
func (TunnelMode) MarshalYAML ¶
func (m TunnelMode) MarshalYAML() (any, error)
MarshalYAML serialize TunnelMode with yaml
func (TunnelMode) String ¶
func (m TunnelMode) String() string
func (*TunnelMode) UnmarshalJSON ¶
func (m *TunnelMode) UnmarshalJSON(data []byte) error
UnmarshalJSON unserialize Mode
func (*TunnelMode) UnmarshalYAML ¶
func (m *TunnelMode) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML unserialize Mode with yaml
Click to show internal directories.
Click to hide internal directories.