mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-26 13:14:14 +00:00
352 lines
11 KiB
Go
352 lines
11 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v5.28.2
|
|
// source: proxy/wireguard/config.proto
|
|
|
|
package wireguard
|
|
|
|
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 DeviceConfig_DomainStrategy int32
|
|
|
|
const (
|
|
DeviceConfig_FORCE_IP DeviceConfig_DomainStrategy = 0
|
|
DeviceConfig_FORCE_IP4 DeviceConfig_DomainStrategy = 1
|
|
DeviceConfig_FORCE_IP6 DeviceConfig_DomainStrategy = 2
|
|
DeviceConfig_FORCE_IP46 DeviceConfig_DomainStrategy = 3
|
|
DeviceConfig_FORCE_IP64 DeviceConfig_DomainStrategy = 4
|
|
)
|
|
|
|
// Enum value maps for DeviceConfig_DomainStrategy.
|
|
var (
|
|
DeviceConfig_DomainStrategy_name = map[int32]string{
|
|
0: "FORCE_IP",
|
|
1: "FORCE_IP4",
|
|
2: "FORCE_IP6",
|
|
3: "FORCE_IP46",
|
|
4: "FORCE_IP64",
|
|
}
|
|
DeviceConfig_DomainStrategy_value = map[string]int32{
|
|
"FORCE_IP": 0,
|
|
"FORCE_IP4": 1,
|
|
"FORCE_IP6": 2,
|
|
"FORCE_IP46": 3,
|
|
"FORCE_IP64": 4,
|
|
}
|
|
)
|
|
|
|
func (x DeviceConfig_DomainStrategy) Enum() *DeviceConfig_DomainStrategy {
|
|
p := new(DeviceConfig_DomainStrategy)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x DeviceConfig_DomainStrategy) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (DeviceConfig_DomainStrategy) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_proxy_wireguard_config_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (DeviceConfig_DomainStrategy) Type() protoreflect.EnumType {
|
|
return &file_proxy_wireguard_config_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x DeviceConfig_DomainStrategy) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use DeviceConfig_DomainStrategy.Descriptor instead.
|
|
func (DeviceConfig_DomainStrategy) EnumDescriptor() ([]byte, []int) {
|
|
return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{1, 0}
|
|
}
|
|
|
|
type PeerConfig struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
|
PreSharedKey string `protobuf:"bytes,2,opt,name=pre_shared_key,json=preSharedKey,proto3" json:"pre_shared_key,omitempty"`
|
|
Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
|
|
KeepAlive uint32 `protobuf:"varint,4,opt,name=keep_alive,json=keepAlive,proto3" json:"keep_alive,omitempty"`
|
|
AllowedIps []string `protobuf:"bytes,5,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *PeerConfig) Reset() {
|
|
*x = PeerConfig{}
|
|
mi := &file_proxy_wireguard_config_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *PeerConfig) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PeerConfig) ProtoMessage() {}
|
|
|
|
func (x *PeerConfig) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proxy_wireguard_config_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 PeerConfig.ProtoReflect.Descriptor instead.
|
|
func (*PeerConfig) Descriptor() ([]byte, []int) {
|
|
return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *PeerConfig) GetPublicKey() string {
|
|
if x != nil {
|
|
return x.PublicKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PeerConfig) GetPreSharedKey() string {
|
|
if x != nil {
|
|
return x.PreSharedKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PeerConfig) GetEndpoint() string {
|
|
if x != nil {
|
|
return x.Endpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PeerConfig) GetKeepAlive() uint32 {
|
|
if x != nil {
|
|
return x.KeepAlive
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *PeerConfig) GetAllowedIps() []string {
|
|
if x != nil {
|
|
return x.AllowedIps
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type DeviceConfig struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
SecretKey string `protobuf:"bytes,1,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
|
|
Endpoint []string `protobuf:"bytes,2,rep,name=endpoint,proto3" json:"endpoint,omitempty"`
|
|
Peers []*PeerConfig `protobuf:"bytes,3,rep,name=peers,proto3" json:"peers,omitempty"`
|
|
Mtu int32 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"`
|
|
NumWorkers int32 `protobuf:"varint,5,opt,name=num_workers,json=numWorkers,proto3" json:"num_workers,omitempty"`
|
|
Reserved []byte `protobuf:"bytes,6,opt,name=reserved,proto3" json:"reserved,omitempty"`
|
|
DomainStrategy DeviceConfig_DomainStrategy `protobuf:"varint,7,opt,name=domain_strategy,json=domainStrategy,proto3,enum=xray.proxy.wireguard.DeviceConfig_DomainStrategy" json:"domain_strategy,omitempty"`
|
|
IsClient bool `protobuf:"varint,8,opt,name=is_client,json=isClient,proto3" json:"is_client,omitempty"`
|
|
NoKernelTun bool `protobuf:"varint,9,opt,name=no_kernel_tun,json=noKernelTun,proto3" json:"no_kernel_tun,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DeviceConfig) Reset() {
|
|
*x = DeviceConfig{}
|
|
mi := &file_proxy_wireguard_config_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DeviceConfig) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DeviceConfig) ProtoMessage() {}
|
|
|
|
func (x *DeviceConfig) ProtoReflect() protoreflect.Message {
|
|
mi := &file_proxy_wireguard_config_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 DeviceConfig.ProtoReflect.Descriptor instead.
|
|
func (*DeviceConfig) Descriptor() ([]byte, []int) {
|
|
return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *DeviceConfig) GetSecretKey() string {
|
|
if x != nil {
|
|
return x.SecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DeviceConfig) GetEndpoint() []string {
|
|
if x != nil {
|
|
return x.Endpoint
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DeviceConfig) GetPeers() []*PeerConfig {
|
|
if x != nil {
|
|
return x.Peers
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DeviceConfig) GetMtu() int32 {
|
|
if x != nil {
|
|
return x.Mtu
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DeviceConfig) GetNumWorkers() int32 {
|
|
if x != nil {
|
|
return x.NumWorkers
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *DeviceConfig) GetReserved() []byte {
|
|
if x != nil {
|
|
return x.Reserved
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *DeviceConfig) GetDomainStrategy() DeviceConfig_DomainStrategy {
|
|
if x != nil {
|
|
return x.DomainStrategy
|
|
}
|
|
return DeviceConfig_FORCE_IP
|
|
}
|
|
|
|
func (x *DeviceConfig) GetIsClient() bool {
|
|
if x != nil {
|
|
return x.IsClient
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *DeviceConfig) GetNoKernelTun() bool {
|
|
if x != nil {
|
|
return x.NoKernelTun
|
|
}
|
|
return false
|
|
}
|
|
|
|
var File_proxy_wireguard_config_proto protoreflect.FileDescriptor
|
|
|
|
const file_proxy_wireguard_config_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x1cproxy/wireguard/config.proto\x12\x14xray.proxy.wireguard\"\xad\x01\n" +
|
|
"\n" +
|
|
"PeerConfig\x12\x1d\n" +
|
|
"\n" +
|
|
"public_key\x18\x01 \x01(\tR\tpublicKey\x12$\n" +
|
|
"\x0epre_shared_key\x18\x02 \x01(\tR\fpreSharedKey\x12\x1a\n" +
|
|
"\bendpoint\x18\x03 \x01(\tR\bendpoint\x12\x1d\n" +
|
|
"\n" +
|
|
"keep_alive\x18\x04 \x01(\rR\tkeepAlive\x12\x1f\n" +
|
|
"\vallowed_ips\x18\x05 \x03(\tR\n" +
|
|
"allowedIps\"\xcb\x03\n" +
|
|
"\fDeviceConfig\x12\x1d\n" +
|
|
"\n" +
|
|
"secret_key\x18\x01 \x01(\tR\tsecretKey\x12\x1a\n" +
|
|
"\bendpoint\x18\x02 \x03(\tR\bendpoint\x126\n" +
|
|
"\x05peers\x18\x03 \x03(\v2 .xray.proxy.wireguard.PeerConfigR\x05peers\x12\x10\n" +
|
|
"\x03mtu\x18\x04 \x01(\x05R\x03mtu\x12\x1f\n" +
|
|
"\vnum_workers\x18\x05 \x01(\x05R\n" +
|
|
"numWorkers\x12\x1a\n" +
|
|
"\breserved\x18\x06 \x01(\fR\breserved\x12Z\n" +
|
|
"\x0fdomain_strategy\x18\a \x01(\x0e21.xray.proxy.wireguard.DeviceConfig.DomainStrategyR\x0edomainStrategy\x12\x1b\n" +
|
|
"\tis_client\x18\b \x01(\bR\bisClient\x12\"\n" +
|
|
"\rno_kernel_tun\x18\t \x01(\bR\vnoKernelTun\"\\\n" +
|
|
"\x0eDomainStrategy\x12\f\n" +
|
|
"\bFORCE_IP\x10\x00\x12\r\n" +
|
|
"\tFORCE_IP4\x10\x01\x12\r\n" +
|
|
"\tFORCE_IP6\x10\x02\x12\x0e\n" +
|
|
"\n" +
|
|
"FORCE_IP46\x10\x03\x12\x0e\n" +
|
|
"\n" +
|
|
"FORCE_IP64\x10\x04B^\n" +
|
|
"\x18com.xray.proxy.wireguardP\x01Z)github.com/xtls/xray-core/proxy/wireguard\xaa\x02\x14Xray.Proxy.WireGuardb\x06proto3"
|
|
|
|
var (
|
|
file_proxy_wireguard_config_proto_rawDescOnce sync.Once
|
|
file_proxy_wireguard_config_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_proxy_wireguard_config_proto_rawDescGZIP() []byte {
|
|
file_proxy_wireguard_config_proto_rawDescOnce.Do(func() {
|
|
file_proxy_wireguard_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proxy_wireguard_config_proto_rawDesc), len(file_proxy_wireguard_config_proto_rawDesc)))
|
|
})
|
|
return file_proxy_wireguard_config_proto_rawDescData
|
|
}
|
|
|
|
var file_proxy_wireguard_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_proxy_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_proxy_wireguard_config_proto_goTypes = []any{
|
|
(DeviceConfig_DomainStrategy)(0), // 0: xray.proxy.wireguard.DeviceConfig.DomainStrategy
|
|
(*PeerConfig)(nil), // 1: xray.proxy.wireguard.PeerConfig
|
|
(*DeviceConfig)(nil), // 2: xray.proxy.wireguard.DeviceConfig
|
|
}
|
|
var file_proxy_wireguard_config_proto_depIdxs = []int32{
|
|
1, // 0: xray.proxy.wireguard.DeviceConfig.peers:type_name -> xray.proxy.wireguard.PeerConfig
|
|
0, // 1: xray.proxy.wireguard.DeviceConfig.domain_strategy:type_name -> xray.proxy.wireguard.DeviceConfig.DomainStrategy
|
|
2, // [2:2] is the sub-list for method output_type
|
|
2, // [2:2] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_proxy_wireguard_config_proto_init() }
|
|
func file_proxy_wireguard_config_proto_init() {
|
|
if File_proxy_wireguard_config_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proxy_wireguard_config_proto_rawDesc), len(file_proxy_wireguard_config_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_proxy_wireguard_config_proto_goTypes,
|
|
DependencyIndexes: file_proxy_wireguard_config_proto_depIdxs,
|
|
EnumInfos: file_proxy_wireguard_config_proto_enumTypes,
|
|
MessageInfos: file_proxy_wireguard_config_proto_msgTypes,
|
|
}.Build()
|
|
File_proxy_wireguard_config_proto = out.File
|
|
file_proxy_wireguard_config_proto_goTypes = nil
|
|
file_proxy_wireguard_config_proto_depIdxs = nil
|
|
}
|