bypass

package
v0.3.1-rc.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 BypassConfig

type BypassConfig 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 (*BypassConfig) Descriptor deprecated

func (*BypassConfig) Descriptor() ([]byte, []int)

Deprecated: Use BypassConfig.ProtoReflect.Descriptor instead.

func (*BypassConfig) GetBypassFile

func (x *BypassConfig) GetBypassFile() string

func (*BypassConfig) GetCustomRuleV3

func (x *BypassConfig) GetCustomRuleV3() []*ModeConfig

func (*BypassConfig) GetTcp

func (x *BypassConfig) GetTcp() Mode

func (*BypassConfig) GetUdp

func (x *BypassConfig) GetUdp() Mode

func (*BypassConfig) ProtoMessage

func (*BypassConfig) ProtoMessage()

func (*BypassConfig) ProtoReflect

func (x *BypassConfig) ProtoReflect() protoreflect.Message

func (*BypassConfig) Reset

func (x *BypassConfig) Reset()

func (*BypassConfig) String

func (x *BypassConfig) String() string

type Mode

type Mode int32
const (
	Mode_bypass Mode = 0
	Mode_direct Mode = 1
	Mode_proxy  Mode = 2
	Mode_block  Mode = 3
)

func (Mode) Descriptor

func (Mode) Descriptor() protoreflect.EnumDescriptor

func (Mode) Enum

func (x Mode) Enum() *Mode

func (Mode) EnumDescriptor deprecated

func (Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use Mode.Descriptor instead.

func (Mode) GetResolveStrategy

func (Mode) GetResolveStrategy() ResolveStrategy

func (Mode) GetTag

func (Mode) GetTag() string

func (Mode) Mode

func (m Mode) Mode() Mode

func (Mode) Number

func (x Mode) Number() protoreflect.EnumNumber

func (Mode) String

func (x Mode) String() string

func (Mode) Type

func (Mode) Type() protoreflect.EnumType

func (Mode) Unknown

func (m Mode) Unknown() bool

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) 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 (ResolveStrategy) String

func (x ResolveStrategy) String() string

func (ResolveStrategy) Type

func (ResolveStrategy) Unknown

func (ResolveStrategy) Unknown() bool

type Tag

type Tag string

func (Tag) GetResolveStrategy

func (Tag) GetResolveStrategy() ResolveStrategy

func (Tag) GetTag

func (f Tag) GetTag() string

func (Tag) Mode

func (Tag) Mode() Mode

func (Tag) Unknown

func (Tag) Unknown() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL