common

package
v0.0.0-...-5808d2a Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProxyType_name = map[int32]string{
		0: "ReverseProxyEnum",
		1: "RedirectProxyEnum",
		2: "StreamProxyEnum",
		4: "R404ProxyEnum",
	}
	ProxyType_value = map[string]int32{
		"ReverseProxyEnum":  0,
		"RedirectProxyEnum": 1,
		"StreamProxyEnum":   2,
		"R404ProxyEnum":     4,
	}
)

Enum value maps for ProxyType.

View Source
var (
	RedirectStateType_name = map[int32]string{
		0: "MultipleChoices300",
		1: "MovedPermanently301",
		2: "Found302",
		3: "SeeOther303",
		4: "TemporaryRedirect307",
		5: "PermanentRedirect308",
	}
	RedirectStateType_value = map[string]int32{
		"MultipleChoices300":   0,
		"MovedPermanently301":  1,
		"Found302":             2,
		"SeeOther303":          3,
		"TemporaryRedirect307": 4,
		"PermanentRedirect308": 5,
	}
)

Enum value maps for RedirectStateType.

View Source
var File_common_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	PublicKey        string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"`               // 公钥
	PrivateKey       string `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"`             // 私钥
	Expiration       int64  `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"`            // 过期时间
	Domain           string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain,omitempty"`                     // 域名
	CertificateBrand string `protobuf:"bytes,5,opt,name=certificateBrand,proto3" json:"certificateBrand,omitempty"` // 证书品牌
	// contains filtered or unexported fields
}

func (*Certificate) Descriptor deprecated

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

Deprecated: Use Certificate.ProtoReflect.Descriptor instead.

func (*Certificate) GetCertificateBrand

func (x *Certificate) GetCertificateBrand() string

func (*Certificate) GetDomain

func (x *Certificate) GetDomain() string

func (*Certificate) GetExpiration

func (x *Certificate) GetExpiration() int64

func (*Certificate) GetPrivateKey

func (x *Certificate) GetPrivateKey() string

func (*Certificate) GetPublicKey

func (x *Certificate) GetPublicKey() string

func (*Certificate) ProtoMessage

func (*Certificate) ProtoMessage()

func (*Certificate) ProtoReflect

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

func (*Certificate) Reset

func (x *Certificate) Reset()

func (*Certificate) String

func (x *Certificate) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ProxyType

type ProxyType int32
const (
	ProxyType_ReverseProxyEnum  ProxyType = 0 // 反向代理
	ProxyType_RedirectProxyEnum ProxyType = 1 // 重定向
	ProxyType_StreamProxyEnum   ProxyType = 2 // 流代理
	ProxyType_R404ProxyEnum     ProxyType = 4 // 404
)

func (ProxyType) Descriptor

func (ProxyType) Descriptor() protoreflect.EnumDescriptor

func (ProxyType) Enum

func (x ProxyType) Enum() *ProxyType

func (ProxyType) EnumDescriptor deprecated

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

Deprecated: Use ProxyType.Descriptor instead.

func (ProxyType) Number

func (x ProxyType) Number() protoreflect.EnumNumber

func (ProxyType) String

func (x ProxyType) String() string

func (ProxyType) Type

type RedirectProxy

type RedirectProxy struct {
	Target            string            `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	ReservedPath      bool              `protobuf:"varint,2,opt,name=reservedPath,proto3" json:"reservedPath,omitempty"` // 保留路径
	RedirectStateType RedirectStateType `protobuf:"varint,3,opt,name=redirectStateType,proto3,enum=common.RedirectStateType" json:"redirectStateType,omitempty"`
	// contains filtered or unexported fields
}

func (*RedirectProxy) Descriptor deprecated

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

Deprecated: Use RedirectProxy.ProtoReflect.Descriptor instead.

func (*RedirectProxy) GetRedirectStateType

func (x *RedirectProxy) GetRedirectStateType() RedirectStateType

func (*RedirectProxy) GetReservedPath

func (x *RedirectProxy) GetReservedPath() bool

func (*RedirectProxy) GetTarget

func (x *RedirectProxy) GetTarget() string

func (*RedirectProxy) ProtoMessage

func (*RedirectProxy) ProtoMessage()

func (*RedirectProxy) ProtoReflect

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

func (*RedirectProxy) Reset

func (x *RedirectProxy) Reset()

func (*RedirectProxy) String

func (x *RedirectProxy) String() string

type RedirectStateType

type RedirectStateType int32
const (
	RedirectStateType_MultipleChoices300   RedirectStateType = 0
	RedirectStateType_MovedPermanently301  RedirectStateType = 1
	RedirectStateType_Found302             RedirectStateType = 2
	RedirectStateType_SeeOther303          RedirectStateType = 3
	RedirectStateType_TemporaryRedirect307 RedirectStateType = 4
	RedirectStateType_PermanentRedirect308 RedirectStateType = 5
)

func (RedirectStateType) Descriptor

func (RedirectStateType) Enum

func (RedirectStateType) EnumDescriptor deprecated

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

Deprecated: Use RedirectStateType.Descriptor instead.

func (RedirectStateType) Number

func (RedirectStateType) String

func (x RedirectStateType) String() string

func (RedirectStateType) Type

type ReverseProxy

type ReverseProxy struct {
	Target            string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	CacheAssets       bool   `protobuf:"varint,2,opt,name=cacheAssets,proto3" json:"cacheAssets,omitempty"`
	PathSubstitution  bool   `protobuf:"varint,3,opt,name=pathSubstitution,proto3" json:"pathSubstitution,omitempty"` // 路径替换
	WebsocketsSupport bool   `protobuf:"varint,4,opt,name=websocketsSupport,proto3" json:"websocketsSupport,omitempty"`
	// contains filtered or unexported fields
}

func (*ReverseProxy) Descriptor deprecated

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

Deprecated: Use ReverseProxy.ProtoReflect.Descriptor instead.

func (*ReverseProxy) GetCacheAssets

func (x *ReverseProxy) GetCacheAssets() bool

func (*ReverseProxy) GetPathSubstitution

func (x *ReverseProxy) GetPathSubstitution() bool

func (*ReverseProxy) GetTarget

func (x *ReverseProxy) GetTarget() string

func (*ReverseProxy) GetWebsocketsSupport

func (x *ReverseProxy) GetWebsocketsSupport() bool

func (*ReverseProxy) ProtoMessage

func (*ReverseProxy) ProtoMessage()

func (*ReverseProxy) ProtoReflect

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

func (*ReverseProxy) Reset

func (x *ReverseProxy) Reset()

func (*ReverseProxy) String

func (x *ReverseProxy) String() string

type StreamProxy

type StreamProxy struct {
	Target      string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	ExposedPort int64  `protobuf:"varint,2,opt,name=exposedPort,proto3" json:"exposedPort,omitempty"` // 暴露端口
	EnableTcp   bool   `protobuf:"varint,3,opt,name=enableTcp,proto3" json:"enableTcp,omitempty"`
	EnableUdp   bool   `protobuf:"varint,4,opt,name=enableUdp,proto3" json:"enableUdp,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamProxy) Descriptor deprecated

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

Deprecated: Use StreamProxy.ProtoReflect.Descriptor instead.

func (*StreamProxy) GetEnableTcp

func (x *StreamProxy) GetEnableTcp() bool

func (*StreamProxy) GetEnableUdp

func (x *StreamProxy) GetEnableUdp() bool

func (*StreamProxy) GetExposedPort

func (x *StreamProxy) GetExposedPort() int64

func (*StreamProxy) GetTarget

func (x *StreamProxy) GetTarget() string

func (*StreamProxy) ProtoMessage

func (*StreamProxy) ProtoMessage()

func (*StreamProxy) ProtoReflect

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

func (*StreamProxy) Reset

func (x *StreamProxy) Reset()

func (*StreamProxy) String

func (x *StreamProxy) String() string

type TaskInfo

type TaskInfo struct {
	TaskID        string         `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"`
	Domain        []string       `protobuf:"bytes,2,rep,name=domain,proto3" json:"domain,omitempty"` // 域名
	EnableProxy   bool           `protobuf:"varint,3,opt,name=enableProxy,proto3" json:"enableProxy,omitempty"`
	EnableSsl     bool           `protobuf:"varint,4,opt,name=enableSsl,proto3" json:"enableSsl,omitempty"`
	EnableWaf     bool           `protobuf:"varint,5,opt,name=enableWaf,proto3" json:"enableWaf,omitempty"`
	DeleteTask    bool           `protobuf:"varint,6,opt,name=deleteTask,proto3" json:"deleteTask,omitempty"`
	ProxyType     ProxyType      `protobuf:"varint,7,opt,name=proxyType,proto3,enum=common.ProxyType" json:"proxyType,omitempty"`
	ReverseProxy  *ReverseProxy  `protobuf:"bytes,8,opt,name=reverseProxy,proto3" json:"reverseProxy,omitempty"`
	RedirectProxy *RedirectProxy `protobuf:"bytes,9,opt,name=redirectProxy,proto3" json:"redirectProxy,omitempty"`
	StreamProxy   *StreamProxy   `protobuf:"bytes,10,opt,name=streamProxy,proto3" json:"streamProxy,omitempty"`
	Certificate   *Certificate   `protobuf:"bytes,11,opt,name=certificate,proto3" json:"certificate,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskInfo) Descriptor deprecated

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

Deprecated: Use TaskInfo.ProtoReflect.Descriptor instead.

func (*TaskInfo) GetCertificate

func (x *TaskInfo) GetCertificate() *Certificate

func (*TaskInfo) GetDeleteTask

func (x *TaskInfo) GetDeleteTask() bool

func (*TaskInfo) GetDomain

func (x *TaskInfo) GetDomain() []string

func (*TaskInfo) GetEnableProxy

func (x *TaskInfo) GetEnableProxy() bool

func (*TaskInfo) GetEnableSsl

func (x *TaskInfo) GetEnableSsl() bool

func (*TaskInfo) GetEnableWaf

func (x *TaskInfo) GetEnableWaf() bool

func (*TaskInfo) GetProxyType

func (x *TaskInfo) GetProxyType() ProxyType

func (*TaskInfo) GetRedirectProxy

func (x *TaskInfo) GetRedirectProxy() *RedirectProxy

func (*TaskInfo) GetReverseProxy

func (x *TaskInfo) GetReverseProxy() *ReverseProxy

func (*TaskInfo) GetStreamProxy

func (x *TaskInfo) GetStreamProxy() *StreamProxy

func (*TaskInfo) GetTaskID

func (x *TaskInfo) GetTaskID() string

func (*TaskInfo) ProtoMessage

func (*TaskInfo) ProtoMessage()

func (*TaskInfo) ProtoReflect

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

func (*TaskInfo) Reset

func (x *TaskInfo) Reset()

func (*TaskInfo) String

func (x *TaskInfo) String() string

Jump to

Keyboard shortcuts

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