// Copyright (C) 2024  mieru authors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v6.33.5
// source: appctl/proto/base.proto

package appctlpb

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type AppStatus int32

const (
	AppStatus_UNKNOWN AppStatus = 0
	// RPC service is available, but proxy is not started.
	AppStatus_IDLE AppStatus = 1
	// Proxy is starting.
	AppStatus_STARTING AppStatus = 2
	// Proxy is running.
	AppStatus_RUNNING AppStatus = 3
	// Proxy is being stopped.
	AppStatus_STOPPING AppStatus = 4
)

// Enum value maps for AppStatus.
var (
	AppStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "IDLE",
		2: "STARTING",
		3: "RUNNING",
		4: "STOPPING",
	}
	AppStatus_value = map[string]int32{
		"UNKNOWN":  0,
		"IDLE":     1,
		"STARTING": 2,
		"RUNNING":  3,
		"STOPPING": 4,
	}
)

func (x AppStatus) Enum() *AppStatus {
	p := new(AppStatus)
	*p = x
	return p
}

func (x AppStatus) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (AppStatus) Descriptor() protoreflect.EnumDescriptor {
	return file_appctl_proto_base_proto_enumTypes[0].Descriptor()
}

func (AppStatus) Type() protoreflect.EnumType {
	return &file_appctl_proto_base_proto_enumTypes[0]
}

func (x AppStatus) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use AppStatus.Descriptor instead.
func (AppStatus) EnumDescriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{0}
}

type LoggingLevel int32

const (
	LoggingLevel_DEFAULT LoggingLevel = 0
	LoggingLevel_FATAL   LoggingLevel = 1
	LoggingLevel_ERROR   LoggingLevel = 2
	LoggingLevel_WARN    LoggingLevel = 3
	LoggingLevel_INFO    LoggingLevel = 4
	LoggingLevel_DEBUG   LoggingLevel = 5
	LoggingLevel_TRACE   LoggingLevel = 6
)

// Enum value maps for LoggingLevel.
var (
	LoggingLevel_name = map[int32]string{
		0: "DEFAULT",
		1: "FATAL",
		2: "ERROR",
		3: "WARN",
		4: "INFO",
		5: "DEBUG",
		6: "TRACE",
	}
	LoggingLevel_value = map[string]int32{
		"DEFAULT": 0,
		"FATAL":   1,
		"ERROR":   2,
		"WARN":    3,
		"INFO":    4,
		"DEBUG":   5,
		"TRACE":   6,
	}
)

func (x LoggingLevel) Enum() *LoggingLevel {
	p := new(LoggingLevel)
	*p = x
	return p
}

func (x LoggingLevel) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (LoggingLevel) Descriptor() protoreflect.EnumDescriptor {
	return file_appctl_proto_base_proto_enumTypes[1].Descriptor()
}

func (LoggingLevel) Type() protoreflect.EnumType {
	return &file_appctl_proto_base_proto_enumTypes[1]
}

func (x LoggingLevel) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use LoggingLevel.Descriptor instead.
func (LoggingLevel) EnumDescriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{1}
}

type DualStack int32

const (
	DualStack_USE_FIRST_IP DualStack = 0
	DualStack_PREFER_IPv4  DualStack = 1
	DualStack_PREFER_IPv6  DualStack = 2
	DualStack_ONLY_IPv4    DualStack = 3
	DualStack_ONLY_IPv6    DualStack = 4
)

// Enum value maps for DualStack.
var (
	DualStack_name = map[int32]string{
		0: "USE_FIRST_IP",
		1: "PREFER_IPv4",
		2: "PREFER_IPv6",
		3: "ONLY_IPv4",
		4: "ONLY_IPv6",
	}
	DualStack_value = map[string]int32{
		"USE_FIRST_IP": 0,
		"PREFER_IPv4":  1,
		"PREFER_IPv6":  2,
		"ONLY_IPv4":    3,
		"ONLY_IPv6":    4,
	}
)

func (x DualStack) Enum() *DualStack {
	p := new(DualStack)
	*p = x
	return p
}

func (x DualStack) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (DualStack) Descriptor() protoreflect.EnumDescriptor {
	return file_appctl_proto_base_proto_enumTypes[2].Descriptor()
}

func (DualStack) Type() protoreflect.EnumType {
	return &file_appctl_proto_base_proto_enumTypes[2]
}

func (x DualStack) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use DualStack.Descriptor instead.
func (DualStack) EnumDescriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{2}
}

type TransportProtocol int32

const (
	TransportProtocol_UNKNOWN_TRANSPORT_PROTOCOL TransportProtocol = 0
	TransportProtocol_UDP                        TransportProtocol = 1
	TransportProtocol_TCP                        TransportProtocol = 2
)

// Enum value maps for TransportProtocol.
var (
	TransportProtocol_name = map[int32]string{
		0: "UNKNOWN_TRANSPORT_PROTOCOL",
		1: "UDP",
		2: "TCP",
	}
	TransportProtocol_value = map[string]int32{
		"UNKNOWN_TRANSPORT_PROTOCOL": 0,
		"UDP":                        1,
		"TCP":                        2,
	}
)

func (x TransportProtocol) Enum() *TransportProtocol {
	p := new(TransportProtocol)
	*p = x
	return p
}

func (x TransportProtocol) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (TransportProtocol) Descriptor() protoreflect.EnumDescriptor {
	return file_appctl_proto_base_proto_enumTypes[3].Descriptor()
}

func (TransportProtocol) Type() protoreflect.EnumType {
	return &file_appctl_proto_base_proto_enumTypes[3]
}

func (x TransportProtocol) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use TransportProtocol.Descriptor instead.
func (TransportProtocol) EnumDescriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{3}
}

type ProxyProtocol int32

const (
	ProxyProtocol_UNKNOWN_PROXY_PROTOCOL ProxyProtocol = 0
	ProxyProtocol_SOCKS5_PROXY_PROTOCOL  ProxyProtocol = 1
)

// Enum value maps for ProxyProtocol.
var (
	ProxyProtocol_name = map[int32]string{
		0: "UNKNOWN_PROXY_PROTOCOL",
		1: "SOCKS5_PROXY_PROTOCOL",
	}
	ProxyProtocol_value = map[string]int32{
		"UNKNOWN_PROXY_PROTOCOL": 0,
		"SOCKS5_PROXY_PROTOCOL":  1,
	}
)

func (x ProxyProtocol) Enum() *ProxyProtocol {
	p := new(ProxyProtocol)
	*p = x
	return p
}

func (x ProxyProtocol) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ProxyProtocol) Descriptor() protoreflect.EnumDescriptor {
	return file_appctl_proto_base_proto_enumTypes[4].Descriptor()
}

func (ProxyProtocol) Type() protoreflect.EnumType {
	return &file_appctl_proto_base_proto_enumTypes[4]
}

func (x ProxyProtocol) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use ProxyProtocol.Descriptor instead.
func (ProxyProtocol) EnumDescriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{4}
}

type NonceType int32

const (
	// Do not make change to the original random nonce.
	NonceType_NONCE_TYPE_RANDOM NonceType = 0
	// Use printable ASCII characters from 0x20 to 0x7E.
	NonceType_NONCE_TYPE_PRINTABLE NonceType = 1
	// Use a pre-defined subset of printable ASCII characters.
	NonceType_NONCE_TYPE_PRINTABLE_SUBSET NonceType = 2
	// Use a customized nonce prefix.
	// If field customHexStrings is not set in NoncePattern,
	// the behavior is the same as NONCE_TYPE_RANDOM.
	NonceType_NONCE_TYPE_FIXED NonceType = 3
)

// Enum value maps for NonceType.
var (
	NonceType_name = map[int32]string{
		0: "NONCE_TYPE_RANDOM",
		1: "NONCE_TYPE_PRINTABLE",
		2: "NONCE_TYPE_PRINTABLE_SUBSET",
		3: "NONCE_TYPE_FIXED",
	}
	NonceType_value = map[string]int32{
		"NONCE_TYPE_RANDOM":           0,
		"NONCE_TYPE_PRINTABLE":        1,
		"NONCE_TYPE_PRINTABLE_SUBSET": 2,
		"NONCE_TYPE_FIXED":            3,
	}
)

func (x NonceType) Enum() *NonceType {
	p := new(NonceType)
	*p = x
	return p
}

func (x NonceType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (NonceType) Descriptor() protoreflect.EnumDescriptor {
	return file_appctl_proto_base_proto_enumTypes[5].Descriptor()
}

func (NonceType) Type() protoreflect.EnumType {
	return &file_appctl_proto_base_proto_enumTypes[5]
}

func (x NonceType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use NonceType.Descriptor instead.
func (NonceType) EnumDescriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{5}
}

type AppStatusMsg struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Status        *AppStatus             `protobuf:"varint,1,opt,name=status,proto3,enum=mieru.appctl.AppStatus,oneof" json:"status,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *AppStatusMsg) Reset() {
	*x = AppStatusMsg{}
	mi := &file_appctl_proto_base_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *AppStatusMsg) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*AppStatusMsg) ProtoMessage() {}

func (x *AppStatusMsg) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use AppStatusMsg.ProtoReflect.Descriptor instead.
func (*AppStatusMsg) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{0}
}

func (x *AppStatusMsg) GetStatus() AppStatus {
	if x != nil && x.Status != nil {
		return *x.Status
	}
	return AppStatus_UNKNOWN
}

type PortBinding struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A single port number.
	// This field can't be set with portRange at the same time.
	Port     *int32             `protobuf:"varint,1,opt,name=port,proto3,oneof" json:"port,omitempty"`
	Protocol *TransportProtocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=mieru.appctl.TransportProtocol,oneof" json:"protocol,omitempty"`
	// A port number range.
	// For example, "8000-9000" contains 1001 ports from 8000 to 9000.
	// This field can't be set with port at the same time.
	PortRange     *string `protobuf:"bytes,3,opt,name=portRange,proto3,oneof" json:"portRange,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PortBinding) Reset() {
	*x = PortBinding{}
	mi := &file_appctl_proto_base_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PortBinding) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PortBinding) ProtoMessage() {}

func (x *PortBinding) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PortBinding.ProtoReflect.Descriptor instead.
func (*PortBinding) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{1}
}

func (x *PortBinding) GetPort() int32 {
	if x != nil && x.Port != nil {
		return *x.Port
	}
	return 0
}

func (x *PortBinding) GetProtocol() TransportProtocol {
	if x != nil && x.Protocol != nil {
		return *x.Protocol
	}
	return TransportProtocol_UNKNOWN_TRANSPORT_PROTOCOL
}

func (x *PortBinding) GetPortRange() string {
	if x != nil && x.PortRange != nil {
		return *x.PortRange
	}
	return ""
}

type User struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// User name is also the ID of user.
	// Typically this is an email address.
	Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// Raw password.
	// For safety this shouldn't be persisted at the server side.
	Password *string `protobuf:"bytes,2,opt,name=password,proto3,oneof" json:"password,omitempty"`
	// Hashed password.
	// Stored with hex encoding.
	HashedPassword *string `protobuf:"bytes,3,opt,name=hashedPassword,proto3,oneof" json:"hashedPassword,omitempty"`
	// User quotas.
	// This field has no effect at the client side.
	Quotas []*Quota `protobuf:"bytes,4,rep,name=quotas,proto3" json:"quotas,omitempty"`
	// Allow user to use private IP as the destination.
	// This field has no effect at the client side.
	AllowPrivateIP *bool `protobuf:"varint,5,opt,name=allowPrivateIP,proto3,oneof" json:"allowPrivateIP,omitempty"`
	// Allow user to use loopback IP as the destination.
	// This field has no effect at the client side.
	AllowLoopbackIP *bool `protobuf:"varint,6,opt,name=allowLoopbackIP,proto3,oneof" json:"allowLoopbackIP,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *User) Reset() {
	*x = User{}
	mi := &file_appctl_proto_base_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *User) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*User) ProtoMessage() {}

func (x *User) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{2}
}

func (x *User) GetName() string {
	if x != nil && x.Name != nil {
		return *x.Name
	}
	return ""
}

func (x *User) GetPassword() string {
	if x != nil && x.Password != nil {
		return *x.Password
	}
	return ""
}

func (x *User) GetHashedPassword() string {
	if x != nil && x.HashedPassword != nil {
		return *x.HashedPassword
	}
	return ""
}

func (x *User) GetQuotas() []*Quota {
	if x != nil {
		return x.Quotas
	}
	return nil
}

func (x *User) GetAllowPrivateIP() bool {
	if x != nil && x.AllowPrivateIP != nil {
		return *x.AllowPrivateIP
	}
	return false
}

func (x *User) GetAllowLoopbackIP() bool {
	if x != nil && x.AllowLoopbackIP != nil {
		return *x.AllowLoopbackIP
	}
	return false
}

type Quota struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Number of days to renew the quota.
	// The renew is rolling based.
	Days *int32 `protobuf:"varint,1,opt,name=days,proto3,oneof" json:"days,omitempty"`
	// Number of megabytes the user allowed to send and receive.
	Megabytes     *int32 `protobuf:"varint,2,opt,name=megabytes,proto3,oneof" json:"megabytes,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Quota) Reset() {
	*x = Quota{}
	mi := &file_appctl_proto_base_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Quota) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Quota) ProtoMessage() {}

func (x *Quota) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Quota.ProtoReflect.Descriptor instead.
func (*Quota) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{3}
}

func (x *Quota) GetDays() int32 {
	if x != nil && x.Days != nil {
		return *x.Days
	}
	return 0
}

func (x *Quota) GetMegabytes() int32 {
	if x != nil && x.Megabytes != nil {
		return *x.Megabytes
	}
	return 0
}

type Auth struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Username used for authentication.
	User *string `protobuf:"bytes,1,opt,name=user,proto3,oneof" json:"user,omitempty"`
	// Password used for authentication.
	Password      *string `protobuf:"bytes,2,opt,name=password,proto3,oneof" json:"password,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Auth) Reset() {
	*x = Auth{}
	mi := &file_appctl_proto_base_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Auth) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Auth) ProtoMessage() {}

func (x *Auth) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Auth.ProtoReflect.Descriptor instead.
func (*Auth) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{4}
}

func (x *Auth) GetUser() string {
	if x != nil && x.User != nil {
		return *x.User
	}
	return ""
}

func (x *Auth) GetPassword() string {
	if x != nil && x.Password != nil {
		return *x.Password
	}
	return ""
}

type TrafficPattern struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Generate stable implicit traffic patterns that are not explictly set.
	// Generated traffic patterns are also influenced by "unlockAll" below.
	Seed *int32 `protobuf:"varint,1,opt,name=seed,proto3,oneof" json:"seed,omitempty"`
	// If true, implicit traffic patterns can use all possible options,
	// which may not be desired. Otherwise, implicit traffic patterns
	// only use limited options.
	// All explicitly set traffic patterns are available regardless of this.
	UnlockAll *bool `protobuf:"varint,2,opt,name=unlockAll,proto3,oneof" json:"unlockAll,omitempty"`
	// Split TCP packets by fragmentation.
	TcpFragment *TCPFragment `protobuf:"bytes,3,opt,name=tcpFragment,proto3,oneof" json:"tcpFragment,omitempty"`
	// Manipulate nonce prefix.
	Nonce         *NoncePattern `protobuf:"bytes,4,opt,name=nonce,proto3,oneof" json:"nonce,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *TrafficPattern) Reset() {
	*x = TrafficPattern{}
	mi := &file_appctl_proto_base_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *TrafficPattern) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*TrafficPattern) ProtoMessage() {}

func (x *TrafficPattern) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[5]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use TrafficPattern.ProtoReflect.Descriptor instead.
func (*TrafficPattern) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{5}
}

func (x *TrafficPattern) GetSeed() int32 {
	if x != nil && x.Seed != nil {
		return *x.Seed
	}
	return 0
}

func (x *TrafficPattern) GetUnlockAll() bool {
	if x != nil && x.UnlockAll != nil {
		return *x.UnlockAll
	}
	return false
}

func (x *TrafficPattern) GetTcpFragment() *TCPFragment {
	if x != nil {
		return x.TcpFragment
	}
	return nil
}

func (x *TrafficPattern) GetNonce() *NoncePattern {
	if x != nil {
		return x.Nonce
	}
	return nil
}

type TCPFragment struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Enable additional TCP fragmentation.
	Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"`
	// Max sleep time in milliseconds between sending two fragments.
	// This value can't exceed 100.
	// If not set, a reasonable default value is used.
	MaxSleepMs    *int32 `protobuf:"varint,2,opt,name=maxSleepMs,proto3,oneof" json:"maxSleepMs,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *TCPFragment) Reset() {
	*x = TCPFragment{}
	mi := &file_appctl_proto_base_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *TCPFragment) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*TCPFragment) ProtoMessage() {}

func (x *TCPFragment) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[6]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use TCPFragment.ProtoReflect.Descriptor instead.
func (*TCPFragment) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{6}
}

func (x *TCPFragment) GetEnable() bool {
	if x != nil && x.Enable != nil {
		return *x.Enable
	}
	return false
}

func (x *TCPFragment) GetMaxSleepMs() int32 {
	if x != nil && x.MaxSleepMs != nil {
		return *x.MaxSleepMs
	}
	return 0
}

type NoncePattern struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Strategy to manipulate nonce.
	Type *NonceType `protobuf:"varint,1,opt,name=type,proto3,enum=mieru.appctl.NonceType,oneof" json:"type,omitempty"`
	// If the pattern applies to each UDP packet,
	// or only applies to the first UDP packet.
	ApplyToAllUDPPacket *bool `protobuf:"varint,2,opt,name=applyToAllUDPPacket,proto3,oneof" json:"applyToAllUDPPacket,omitempty"`
	// Minimum number of bytes to manipulate.
	// It is ignored when NonceType is NONCE_TYPE_RANDOM or NONCE_TYPE_FIXED.
	MinLen *int32 `protobuf:"varint,3,opt,name=minLen,proto3,oneof" json:"minLen,omitempty"`
	// Maximum number of bytes to manipulate.
	// This value can't exceed 12.
	// It is ignored when NonceType is NONCE_TYPE_RANDOM or NONCE_TYPE_FIXED.
	MaxLen *int32 `protobuf:"varint,4,opt,name=maxLen,proto3,oneof" json:"maxLen,omitempty"`
	// A list of hex string (without 0x) that represent customized
	// nonce prefix to use. For example, string "00010203"
	// represent a 4 bytes nonce prefix [0, 1, 2, 3].
	//
	// Each nonce prefix can't exceed 12 bytes.
	//
	// When multiple strings are provided, a random one is used each time.
	//
	// It has no effect when NonceType is not NONCE_TYPE_FIXED.
	CustomHexStrings []string `protobuf:"bytes,5,rep,name=customHexStrings,proto3" json:"customHexStrings,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

func (x *NoncePattern) Reset() {
	*x = NoncePattern{}
	mi := &file_appctl_proto_base_proto_msgTypes[7]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *NoncePattern) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*NoncePattern) ProtoMessage() {}

func (x *NoncePattern) ProtoReflect() protoreflect.Message {
	mi := &file_appctl_proto_base_proto_msgTypes[7]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use NoncePattern.ProtoReflect.Descriptor instead.
func (*NoncePattern) Descriptor() ([]byte, []int) {
	return file_appctl_proto_base_proto_rawDescGZIP(), []int{7}
}

func (x *NoncePattern) GetType() NonceType {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return NonceType_NONCE_TYPE_RANDOM
}

func (x *NoncePattern) GetApplyToAllUDPPacket() bool {
	if x != nil && x.ApplyToAllUDPPacket != nil {
		return *x.ApplyToAllUDPPacket
	}
	return false
}

func (x *NoncePattern) GetMinLen() int32 {
	if x != nil && x.MinLen != nil {
		return *x.MinLen
	}
	return 0
}

func (x *NoncePattern) GetMaxLen() int32 {
	if x != nil && x.MaxLen != nil {
		return *x.MaxLen
	}
	return 0
}

func (x *NoncePattern) GetCustomHexStrings() []string {
	if x != nil {
		return x.CustomHexStrings
	}
	return nil
}

var File_appctl_proto_base_proto protoreflect.FileDescriptor

const file_appctl_proto_base_proto_rawDesc = "" +
	"\n" +
	"\x17appctl/proto/base.proto\x12\fmieru.appctl\"O\n" +
	"\fAppStatusMsg\x124\n" +
	"\x06status\x18\x01 \x01(\x0e2\x17.mieru.appctl.AppStatusH\x00R\x06status\x88\x01\x01B\t\n" +
	"\a_status\"\xaf\x01\n" +
	"\vPortBinding\x12\x17\n" +
	"\x04port\x18\x01 \x01(\x05H\x00R\x04port\x88\x01\x01\x12@\n" +
	"\bprotocol\x18\x02 \x01(\x0e2\x1f.mieru.appctl.TransportProtocolH\x01R\bprotocol\x88\x01\x01\x12!\n" +
	"\tportRange\x18\x03 \x01(\tH\x02R\tportRange\x88\x01\x01B\a\n" +
	"\x05_portB\v\n" +
	"\t_protocolB\f\n" +
	"\n" +
	"_portRange\"\xc6\x02\n" +
	"\x04User\x12\x17\n" +
	"\x04name\x18\x01 \x01(\tH\x00R\x04name\x88\x01\x01\x12\x1f\n" +
	"\bpassword\x18\x02 \x01(\tH\x01R\bpassword\x88\x01\x01\x12+\n" +
	"\x0ehashedPassword\x18\x03 \x01(\tH\x02R\x0ehashedPassword\x88\x01\x01\x12+\n" +
	"\x06quotas\x18\x04 \x03(\v2\x13.mieru.appctl.QuotaR\x06quotas\x12+\n" +
	"\x0eallowPrivateIP\x18\x05 \x01(\bH\x03R\x0eallowPrivateIP\x88\x01\x01\x12-\n" +
	"\x0fallowLoopbackIP\x18\x06 \x01(\bH\x04R\x0fallowLoopbackIP\x88\x01\x01B\a\n" +
	"\x05_nameB\v\n" +
	"\t_passwordB\x11\n" +
	"\x0f_hashedPasswordB\x11\n" +
	"\x0f_allowPrivateIPB\x12\n" +
	"\x10_allowLoopbackIP\"Z\n" +
	"\x05Quota\x12\x17\n" +
	"\x04days\x18\x01 \x01(\x05H\x00R\x04days\x88\x01\x01\x12!\n" +
	"\tmegabytes\x18\x02 \x01(\x05H\x01R\tmegabytes\x88\x01\x01B\a\n" +
	"\x05_daysB\f\n" +
	"\n" +
	"_megabytes\"V\n" +
	"\x04Auth\x12\x17\n" +
	"\x04user\x18\x01 \x01(\tH\x00R\x04user\x88\x01\x01\x12\x1f\n" +
	"\bpassword\x18\x02 \x01(\tH\x01R\bpassword\x88\x01\x01B\a\n" +
	"\x05_userB\v\n" +
	"\t_password\"\xf6\x01\n" +
	"\x0eTrafficPattern\x12\x17\n" +
	"\x04seed\x18\x01 \x01(\x05H\x00R\x04seed\x88\x01\x01\x12!\n" +
	"\tunlockAll\x18\x02 \x01(\bH\x01R\tunlockAll\x88\x01\x01\x12@\n" +
	"\vtcpFragment\x18\x03 \x01(\v2\x19.mieru.appctl.TCPFragmentH\x02R\vtcpFragment\x88\x01\x01\x125\n" +
	"\x05nonce\x18\x04 \x01(\v2\x1a.mieru.appctl.NoncePatternH\x03R\x05nonce\x88\x01\x01B\a\n" +
	"\x05_seedB\f\n" +
	"\n" +
	"_unlockAllB\x0e\n" +
	"\f_tcpFragmentB\b\n" +
	"\x06_nonce\"i\n" +
	"\vTCPFragment\x12\x1b\n" +
	"\x06enable\x18\x01 \x01(\bH\x00R\x06enable\x88\x01\x01\x12#\n" +
	"\n" +
	"maxSleepMs\x18\x02 \x01(\x05H\x01R\n" +
	"maxSleepMs\x88\x01\x01B\t\n" +
	"\a_enableB\r\n" +
	"\v_maxSleepMs\"\x94\x02\n" +
	"\fNoncePattern\x120\n" +
	"\x04type\x18\x01 \x01(\x0e2\x17.mieru.appctl.NonceTypeH\x00R\x04type\x88\x01\x01\x125\n" +
	"\x13applyToAllUDPPacket\x18\x02 \x01(\bH\x01R\x13applyToAllUDPPacket\x88\x01\x01\x12\x1b\n" +
	"\x06minLen\x18\x03 \x01(\x05H\x02R\x06minLen\x88\x01\x01\x12\x1b\n" +
	"\x06maxLen\x18\x04 \x01(\x05H\x03R\x06maxLen\x88\x01\x01\x12*\n" +
	"\x10customHexStrings\x18\x05 \x03(\tR\x10customHexStringsB\a\n" +
	"\x05_typeB\x16\n" +
	"\x14_applyToAllUDPPacketB\t\n" +
	"\a_minLenB\t\n" +
	"\a_maxLen*K\n" +
	"\tAppStatus\x12\v\n" +
	"\aUNKNOWN\x10\x00\x12\b\n" +
	"\x04IDLE\x10\x01\x12\f\n" +
	"\bSTARTING\x10\x02\x12\v\n" +
	"\aRUNNING\x10\x03\x12\f\n" +
	"\bSTOPPING\x10\x04*[\n" +
	"\fLoggingLevel\x12\v\n" +
	"\aDEFAULT\x10\x00\x12\t\n" +
	"\x05FATAL\x10\x01\x12\t\n" +
	"\x05ERROR\x10\x02\x12\b\n" +
	"\x04WARN\x10\x03\x12\b\n" +
	"\x04INFO\x10\x04\x12\t\n" +
	"\x05DEBUG\x10\x05\x12\t\n" +
	"\x05TRACE\x10\x06*]\n" +
	"\tDualStack\x12\x10\n" +
	"\fUSE_FIRST_IP\x10\x00\x12\x0f\n" +
	"\vPREFER_IPv4\x10\x01\x12\x0f\n" +
	"\vPREFER_IPv6\x10\x02\x12\r\n" +
	"\tONLY_IPv4\x10\x03\x12\r\n" +
	"\tONLY_IPv6\x10\x04*E\n" +
	"\x11TransportProtocol\x12\x1e\n" +
	"\x1aUNKNOWN_TRANSPORT_PROTOCOL\x10\x00\x12\a\n" +
	"\x03UDP\x10\x01\x12\a\n" +
	"\x03TCP\x10\x02*F\n" +
	"\rProxyProtocol\x12\x1a\n" +
	"\x16UNKNOWN_PROXY_PROTOCOL\x10\x00\x12\x19\n" +
	"\x15SOCKS5_PROXY_PROTOCOL\x10\x01*s\n" +
	"\tNonceType\x12\x15\n" +
	"\x11NONCE_TYPE_RANDOM\x10\x00\x12\x18\n" +
	"\x14NONCE_TYPE_PRINTABLE\x10\x01\x12\x1f\n" +
	"\x1bNONCE_TYPE_PRINTABLE_SUBSET\x10\x02\x12\x14\n" +
	"\x10NONCE_TYPE_FIXED\x10\x03B0Z.github.com/enfein/mieru/v3/pkg/appctl/appctlpbb\x06proto3"

var (
	file_appctl_proto_base_proto_rawDescOnce sync.Once
	file_appctl_proto_base_proto_rawDescData []byte
)

func file_appctl_proto_base_proto_rawDescGZIP() []byte {
	file_appctl_proto_base_proto_rawDescOnce.Do(func() {
		file_appctl_proto_base_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_appctl_proto_base_proto_rawDesc), len(file_appctl_proto_base_proto_rawDesc)))
	})
	return file_appctl_proto_base_proto_rawDescData
}

var file_appctl_proto_base_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
var file_appctl_proto_base_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_appctl_proto_base_proto_goTypes = []any{
	(AppStatus)(0),         // 0: mieru.appctl.AppStatus
	(LoggingLevel)(0),      // 1: mieru.appctl.LoggingLevel
	(DualStack)(0),         // 2: mieru.appctl.DualStack
	(TransportProtocol)(0), // 3: mieru.appctl.TransportProtocol
	(ProxyProtocol)(0),     // 4: mieru.appctl.ProxyProtocol
	(NonceType)(0),         // 5: mieru.appctl.NonceType
	(*AppStatusMsg)(nil),   // 6: mieru.appctl.AppStatusMsg
	(*PortBinding)(nil),    // 7: mieru.appctl.PortBinding
	(*User)(nil),           // 8: mieru.appctl.User
	(*Quota)(nil),          // 9: mieru.appctl.Quota
	(*Auth)(nil),           // 10: mieru.appctl.Auth
	(*TrafficPattern)(nil), // 11: mieru.appctl.TrafficPattern
	(*TCPFragment)(nil),    // 12: mieru.appctl.TCPFragment
	(*NoncePattern)(nil),   // 13: mieru.appctl.NoncePattern
}
var file_appctl_proto_base_proto_depIdxs = []int32{
	0,  // 0: mieru.appctl.AppStatusMsg.status:type_name -> mieru.appctl.AppStatus
	3,  // 1: mieru.appctl.PortBinding.protocol:type_name -> mieru.appctl.TransportProtocol
	9,  // 2: mieru.appctl.User.quotas:type_name -> mieru.appctl.Quota
	12, // 3: mieru.appctl.TrafficPattern.tcpFragment:type_name -> mieru.appctl.TCPFragment
	13, // 4: mieru.appctl.TrafficPattern.nonce:type_name -> mieru.appctl.NoncePattern
	5,  // 5: mieru.appctl.NoncePattern.type:type_name -> mieru.appctl.NonceType
	6,  // [6:6] is the sub-list for method output_type
	6,  // [6:6] is the sub-list for method input_type
	6,  // [6:6] is the sub-list for extension type_name
	6,  // [6:6] is the sub-list for extension extendee
	0,  // [0:6] is the sub-list for field type_name
}

func init() { file_appctl_proto_base_proto_init() }
func file_appctl_proto_base_proto_init() {
	if File_appctl_proto_base_proto != nil {
		return
	}
	file_appctl_proto_base_proto_msgTypes[0].OneofWrappers = []any{}
	file_appctl_proto_base_proto_msgTypes[1].OneofWrappers = []any{}
	file_appctl_proto_base_proto_msgTypes[2].OneofWrappers = []any{}
	file_appctl_proto_base_proto_msgTypes[3].OneofWrappers = []any{}
	file_appctl_proto_base_proto_msgTypes[4].OneofWrappers = []any{}
	file_appctl_proto_base_proto_msgTypes[5].OneofWrappers = []any{}
	file_appctl_proto_base_proto_msgTypes[6].OneofWrappers = []any{}
	file_appctl_proto_base_proto_msgTypes[7].OneofWrappers = []any{}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_appctl_proto_base_proto_rawDesc), len(file_appctl_proto_base_proto_rawDesc)),
			NumEnums:      6,
			NumMessages:   8,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_appctl_proto_base_proto_goTypes,
		DependencyIndexes: file_appctl_proto_base_proto_depIdxs,
		EnumInfos:         file_appctl_proto_base_proto_enumTypes,
		MessageInfos:      file_appctl_proto_base_proto_msgTypes,
	}.Build()
	File_appctl_proto_base_proto = out.File
	file_appctl_proto_base_proto_goTypes = nil
	file_appctl_proto_base_proto_depIdxs = nil
}
