Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetBypassFile() string
- func (x *Config) GetCustomRuleV3() []*ModeConfig
- func (x *Config) GetTcp() Mode
- func (x *Config) GetUdp() Mode
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type Mode
- func (Mode) Descriptor() protoreflect.EnumDescriptor
- func (x Mode) Enum() *Mode
- func (Mode) EnumDescriptor() ([]byte, []int)deprecated
- func (Mode) GetResolveStrategy() ResolveStrategy
- func (Mode) GetTag() string
- func (m Mode) Mode() Mode
- func (x Mode) Number() protoreflect.EnumNumber
- func (x Mode) String() string
- func (Mode) Type() protoreflect.EnumType
- func (m Mode) Unknown() bool
- type ModeConfig
- func (*ModeConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ModeConfig) GetHostname() []string
- func (x *ModeConfig) GetMode() Mode
- func (x *ModeConfig) GetResolveStrategy() ResolveStrategy
- func (x *ModeConfig) GetTag() string
- func (*ModeConfig) ProtoMessage()
- func (x *ModeConfig) ProtoReflect() protoreflect.Message
- func (x *ModeConfig) Reset()
- func (f *ModeConfig) StoreKV(fs [][]byte)
- func (x *ModeConfig) String() string
- func (f *ModeConfig) ToModeEnum() ModeEnum
- func (m *ModeConfig) Unknown() bool
- type ModeEnum
- type ResolveStrategy
- func (ResolveStrategy) Descriptor() protoreflect.EnumDescriptor
- func (x ResolveStrategy) Enum() *ResolveStrategy
- func (ResolveStrategy) EnumDescriptor() ([]byte, []int)deprecated
- func (r ResolveStrategy) GetResolveStrategy() ResolveStrategy
- func (ResolveStrategy) GetTag() string
- func (ResolveStrategy) Mode() Mode
- func (x ResolveStrategy) Number() protoreflect.EnumNumber
- func (x ResolveStrategy) String() string
- func (ResolveStrategy) Type() protoreflect.EnumType
- func (ResolveStrategy) Unknown() bool
- type Tag
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Mode_name = map[int32]string{ 0: "bypass", 1: "direct", 2: "proxy", 3: "block", } Mode_value = map[string]int32{ "bypass": 0, "direct": 1, "proxy": 2, "block": 3, } )
Enum value maps for Mode.
View Source
var ( ResolveStrategy_name = map[int32]string{ 0: "default", 1: "prefer_ipv4", 2: "only_ipv4", 3: "prefer_ipv6", 4: "only_ipv6", } ResolveStrategy_value = map[string]int32{ "default": 0, "prefer_ipv4": 1, "only_ipv4": 2, "prefer_ipv6": 3, "only_ipv6": 4, } )
Enum value maps for ResolveStrategy.
View Source
var File_config_bypass_bypass_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.3.7
type Config struct { Tcp Mode `protobuf:"varint,3,opt,name=tcp,proto3,enum=yuhaiin.bypass.Mode" json:"tcp,omitempty"` Udp Mode `protobuf:"varint,4,opt,name=udp,proto3,enum=yuhaiin.bypass.Mode" json:"udp,omitempty"` BypassFile string `protobuf:"bytes,2,opt,name=bypass_file,proto3" json:"bypass_file,omitempty"` CustomRuleV3 []*ModeConfig `protobuf:"bytes,7,rep,name=custom_rule_v3,proto3" json:"custom_rule_v3,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
added in
v0.3.7
func (*Config) GetBypassFile ¶ added in v0.3.7
func (*Config) GetCustomRuleV3 ¶ added in v0.3.7
func (x *Config) GetCustomRuleV3() []*ModeConfig
func (*Config) ProtoMessage ¶ added in v0.3.7
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶ added in v0.3.7
func (x *Config) ProtoReflect() protoreflect.Message
type Mode ¶
type Mode int32
func (Mode) Descriptor ¶
func (Mode) Descriptor() protoreflect.EnumDescriptor
func (Mode) EnumDescriptor
deprecated
func (Mode) GetResolveStrategy ¶
func (Mode) GetResolveStrategy() ResolveStrategy
func (Mode) Number ¶
func (x Mode) Number() protoreflect.EnumNumber
func (Mode) Type ¶
func (Mode) Type() protoreflect.EnumType
type ModeConfig ¶
type ModeConfig struct { Hostname []string `protobuf:"bytes,3,rep,name=hostname,proto3" json:"hostname,omitempty"` Mode Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=yuhaiin.bypass.Mode" json:"mode,omitempty"` Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` ResolveStrategy ResolveStrategy `protobuf:"varint,4,opt,name=resolve_strategy,proto3,enum=yuhaiin.bypass.ResolveStrategy" json:"resolve_strategy,omitempty"` // contains filtered or unexported fields }
func (*ModeConfig) Descriptor
deprecated
func (*ModeConfig) Descriptor() ([]byte, []int)
Deprecated: Use ModeConfig.ProtoReflect.Descriptor instead.
func (*ModeConfig) GetHostname ¶
func (x *ModeConfig) GetHostname() []string
func (*ModeConfig) GetMode ¶
func (x *ModeConfig) GetMode() Mode
func (*ModeConfig) GetResolveStrategy ¶
func (x *ModeConfig) GetResolveStrategy() ResolveStrategy
func (*ModeConfig) GetTag ¶
func (x *ModeConfig) GetTag() string
func (*ModeConfig) ProtoMessage ¶
func (*ModeConfig) ProtoMessage()
func (*ModeConfig) ProtoReflect ¶
func (x *ModeConfig) ProtoReflect() protoreflect.Message
func (*ModeConfig) Reset ¶
func (x *ModeConfig) Reset()
func (*ModeConfig) StoreKV ¶
func (f *ModeConfig) StoreKV(fs [][]byte)
func (*ModeConfig) String ¶
func (x *ModeConfig) String() string
func (*ModeConfig) ToModeEnum ¶
func (f *ModeConfig) ToModeEnum() ModeEnum
func (*ModeConfig) Unknown ¶
func (m *ModeConfig) Unknown() bool
type ModeEnum ¶
type ModeEnum interface { Mode() Mode Unknown() bool GetTag() string GetResolveStrategy() ResolveStrategy }
type ResolveStrategy ¶
type ResolveStrategy int32
const ( ResolveStrategy_default ResolveStrategy = 0 ResolveStrategy_prefer_ipv4 ResolveStrategy = 1 ResolveStrategy_only_ipv4 ResolveStrategy = 2 ResolveStrategy_prefer_ipv6 ResolveStrategy = 3 ResolveStrategy_only_ipv6 ResolveStrategy = 4 )
func (ResolveStrategy) Descriptor ¶
func (ResolveStrategy) Descriptor() protoreflect.EnumDescriptor
func (ResolveStrategy) Enum ¶
func (x ResolveStrategy) Enum() *ResolveStrategy
func (ResolveStrategy) EnumDescriptor
deprecated
func (ResolveStrategy) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResolveStrategy.Descriptor instead.
func (ResolveStrategy) GetResolveStrategy ¶
func (r ResolveStrategy) GetResolveStrategy() ResolveStrategy
func (ResolveStrategy) GetTag ¶
func (ResolveStrategy) GetTag() string
func (ResolveStrategy) Mode ¶
func (ResolveStrategy) Mode() Mode
func (ResolveStrategy) Number ¶
func (x ResolveStrategy) Number() protoreflect.EnumNumber
func (ResolveStrategy) String ¶
func (x ResolveStrategy) String() string
func (ResolveStrategy) Type ¶
func (ResolveStrategy) Type() protoreflect.EnumType
func (ResolveStrategy) Unknown ¶
func (ResolveStrategy) Unknown() bool
Click to show internal directories.
Click to hide internal directories.