bypass

package
v0.3.1-rc.5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 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 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"`
	CustomRuleV2 map[string]*ModeConfig `` /* 169-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated added in v0.3.7

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetBypassFile added in v0.3.7

func (x *Config) GetBypassFile() string

func (*Config) GetCustomRuleV2

func (x *Config) GetCustomRuleV2() map[string]*ModeConfig

func (*Config) GetTcp added in v0.3.7

func (x *Config) GetTcp() Mode

func (*Config) GetUdp added in v0.3.7

func (x *Config) GetUdp() Mode

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

func (*Config) Reset added in v0.3.7

func (x *Config) Reset()

func (*Config) String added in v0.3.7

func (x *Config) 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) 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 {
	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"`
	// contains filtered or unexported fields
}

func (*ModeConfig) Descriptor deprecated

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

Deprecated: Use ModeConfig.ProtoReflect.Descriptor instead.

func (*ModeConfig) GetMode

func (x *ModeConfig) GetMode() Mode

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) Unknown

func (m *ModeConfig) Unknown() bool

type ModeEnum

type ModeEnum interface {
	Mode() Mode
	Unknown() bool
	GetTag() string
}

type Tag

type Tag string

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