github.com/xmplusdev/xray-core@v1.8.10/proxy/wireguard/config.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.33.0 4 // protoc v4.23.1 5 // source: proxy/wireguard/config.proto 6 7 package wireguard 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 reflect "reflect" 13 sync "sync" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 type DeviceConfig_DomainStrategy int32 24 25 const ( 26 DeviceConfig_FORCE_IP DeviceConfig_DomainStrategy = 0 27 DeviceConfig_FORCE_IP4 DeviceConfig_DomainStrategy = 1 28 DeviceConfig_FORCE_IP6 DeviceConfig_DomainStrategy = 2 29 DeviceConfig_FORCE_IP46 DeviceConfig_DomainStrategy = 3 30 DeviceConfig_FORCE_IP64 DeviceConfig_DomainStrategy = 4 31 ) 32 33 // Enum value maps for DeviceConfig_DomainStrategy. 34 var ( 35 DeviceConfig_DomainStrategy_name = map[int32]string{ 36 0: "FORCE_IP", 37 1: "FORCE_IP4", 38 2: "FORCE_IP6", 39 3: "FORCE_IP46", 40 4: "FORCE_IP64", 41 } 42 DeviceConfig_DomainStrategy_value = map[string]int32{ 43 "FORCE_IP": 0, 44 "FORCE_IP4": 1, 45 "FORCE_IP6": 2, 46 "FORCE_IP46": 3, 47 "FORCE_IP64": 4, 48 } 49 ) 50 51 func (x DeviceConfig_DomainStrategy) Enum() *DeviceConfig_DomainStrategy { 52 p := new(DeviceConfig_DomainStrategy) 53 *p = x 54 return p 55 } 56 57 func (x DeviceConfig_DomainStrategy) String() string { 58 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 59 } 60 61 func (DeviceConfig_DomainStrategy) Descriptor() protoreflect.EnumDescriptor { 62 return file_proxy_wireguard_config_proto_enumTypes[0].Descriptor() 63 } 64 65 func (DeviceConfig_DomainStrategy) Type() protoreflect.EnumType { 66 return &file_proxy_wireguard_config_proto_enumTypes[0] 67 } 68 69 func (x DeviceConfig_DomainStrategy) Number() protoreflect.EnumNumber { 70 return protoreflect.EnumNumber(x) 71 } 72 73 // Deprecated: Use DeviceConfig_DomainStrategy.Descriptor instead. 74 func (DeviceConfig_DomainStrategy) EnumDescriptor() ([]byte, []int) { 75 return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{1, 0} 76 } 77 78 type PeerConfig struct { 79 state protoimpl.MessageState 80 sizeCache protoimpl.SizeCache 81 unknownFields protoimpl.UnknownFields 82 83 PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` 84 PreSharedKey string `protobuf:"bytes,2,opt,name=pre_shared_key,json=preSharedKey,proto3" json:"pre_shared_key,omitempty"` 85 Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` 86 KeepAlive uint32 `protobuf:"varint,4,opt,name=keep_alive,json=keepAlive,proto3" json:"keep_alive,omitempty"` 87 AllowedIps []string `protobuf:"bytes,5,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"` 88 } 89 90 func (x *PeerConfig) Reset() { 91 *x = PeerConfig{} 92 if protoimpl.UnsafeEnabled { 93 mi := &file_proxy_wireguard_config_proto_msgTypes[0] 94 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 95 ms.StoreMessageInfo(mi) 96 } 97 } 98 99 func (x *PeerConfig) String() string { 100 return protoimpl.X.MessageStringOf(x) 101 } 102 103 func (*PeerConfig) ProtoMessage() {} 104 105 func (x *PeerConfig) ProtoReflect() protoreflect.Message { 106 mi := &file_proxy_wireguard_config_proto_msgTypes[0] 107 if protoimpl.UnsafeEnabled && x != nil { 108 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 109 if ms.LoadMessageInfo() == nil { 110 ms.StoreMessageInfo(mi) 111 } 112 return ms 113 } 114 return mi.MessageOf(x) 115 } 116 117 // Deprecated: Use PeerConfig.ProtoReflect.Descriptor instead. 118 func (*PeerConfig) Descriptor() ([]byte, []int) { 119 return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{0} 120 } 121 122 func (x *PeerConfig) GetPublicKey() string { 123 if x != nil { 124 return x.PublicKey 125 } 126 return "" 127 } 128 129 func (x *PeerConfig) GetPreSharedKey() string { 130 if x != nil { 131 return x.PreSharedKey 132 } 133 return "" 134 } 135 136 func (x *PeerConfig) GetEndpoint() string { 137 if x != nil { 138 return x.Endpoint 139 } 140 return "" 141 } 142 143 func (x *PeerConfig) GetKeepAlive() uint32 { 144 if x != nil { 145 return x.KeepAlive 146 } 147 return 0 148 } 149 150 func (x *PeerConfig) GetAllowedIps() []string { 151 if x != nil { 152 return x.AllowedIps 153 } 154 return nil 155 } 156 157 type DeviceConfig struct { 158 state protoimpl.MessageState 159 sizeCache protoimpl.SizeCache 160 unknownFields protoimpl.UnknownFields 161 162 SecretKey string `protobuf:"bytes,1,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` 163 Endpoint []string `protobuf:"bytes,2,rep,name=endpoint,proto3" json:"endpoint,omitempty"` 164 Peers []*PeerConfig `protobuf:"bytes,3,rep,name=peers,proto3" json:"peers,omitempty"` 165 Mtu int32 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"` 166 NumWorkers int32 `protobuf:"varint,5,opt,name=num_workers,json=numWorkers,proto3" json:"num_workers,omitempty"` 167 Reserved []byte `protobuf:"bytes,6,opt,name=reserved,proto3" json:"reserved,omitempty"` 168 DomainStrategy DeviceConfig_DomainStrategy `protobuf:"varint,7,opt,name=domain_strategy,json=domainStrategy,proto3,enum=xray.proxy.wireguard.DeviceConfig_DomainStrategy" json:"domain_strategy,omitempty"` 169 IsClient bool `protobuf:"varint,8,opt,name=is_client,json=isClient,proto3" json:"is_client,omitempty"` 170 KernelMode bool `protobuf:"varint,9,opt,name=kernel_mode,json=kernelMode,proto3" json:"kernel_mode,omitempty"` 171 } 172 173 func (x *DeviceConfig) Reset() { 174 *x = DeviceConfig{} 175 if protoimpl.UnsafeEnabled { 176 mi := &file_proxy_wireguard_config_proto_msgTypes[1] 177 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 178 ms.StoreMessageInfo(mi) 179 } 180 } 181 182 func (x *DeviceConfig) String() string { 183 return protoimpl.X.MessageStringOf(x) 184 } 185 186 func (*DeviceConfig) ProtoMessage() {} 187 188 func (x *DeviceConfig) ProtoReflect() protoreflect.Message { 189 mi := &file_proxy_wireguard_config_proto_msgTypes[1] 190 if protoimpl.UnsafeEnabled && x != nil { 191 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 192 if ms.LoadMessageInfo() == nil { 193 ms.StoreMessageInfo(mi) 194 } 195 return ms 196 } 197 return mi.MessageOf(x) 198 } 199 200 // Deprecated: Use DeviceConfig.ProtoReflect.Descriptor instead. 201 func (*DeviceConfig) Descriptor() ([]byte, []int) { 202 return file_proxy_wireguard_config_proto_rawDescGZIP(), []int{1} 203 } 204 205 func (x *DeviceConfig) GetSecretKey() string { 206 if x != nil { 207 return x.SecretKey 208 } 209 return "" 210 } 211 212 func (x *DeviceConfig) GetEndpoint() []string { 213 if x != nil { 214 return x.Endpoint 215 } 216 return nil 217 } 218 219 func (x *DeviceConfig) GetPeers() []*PeerConfig { 220 if x != nil { 221 return x.Peers 222 } 223 return nil 224 } 225 226 func (x *DeviceConfig) GetMtu() int32 { 227 if x != nil { 228 return x.Mtu 229 } 230 return 0 231 } 232 233 func (x *DeviceConfig) GetNumWorkers() int32 { 234 if x != nil { 235 return x.NumWorkers 236 } 237 return 0 238 } 239 240 func (x *DeviceConfig) GetReserved() []byte { 241 if x != nil { 242 return x.Reserved 243 } 244 return nil 245 } 246 247 func (x *DeviceConfig) GetDomainStrategy() DeviceConfig_DomainStrategy { 248 if x != nil { 249 return x.DomainStrategy 250 } 251 return DeviceConfig_FORCE_IP 252 } 253 254 func (x *DeviceConfig) GetIsClient() bool { 255 if x != nil { 256 return x.IsClient 257 } 258 return false 259 } 260 261 func (x *DeviceConfig) GetKernelMode() bool { 262 if x != nil { 263 return x.KernelMode 264 } 265 return false 266 } 267 268 var File_proxy_wireguard_config_proto protoreflect.FileDescriptor 269 270 var file_proxy_wireguard_config_proto_rawDesc = []byte{ 271 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 272 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 273 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 274 0x75, 0x61, 0x72, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x6e, 275 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 276 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 277 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 278 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x53, 279 0x68, 0x61, 0x72, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 280 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 281 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x6c, 0x69, 282 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x41, 0x6c, 283 0x69, 0x76, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 284 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 285 0x64, 0x49, 0x70, 0x73, 0x22, 0xc8, 0x03, 0x0a, 0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 286 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 287 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 288 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 289 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 290 0x12, 0x36, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 291 0x20, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 0x72, 292 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 293 0x67, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 294 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 295 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 296 0x0a, 0x6e, 0x75, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 297 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 298 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x5a, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 299 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 300 0x32, 0x31, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x77, 0x69, 301 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 302 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 303 0x65, 0x67, 0x79, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 304 0x65, 0x67, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 305 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 306 0x12, 0x1f, 0x0a, 0x0b, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 307 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x4d, 0x6f, 0x64, 308 0x65, 0x22, 0x5c, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 309 0x65, 0x67, 0x79, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x10, 310 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x10, 0x01, 311 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x10, 0x02, 0x12, 312 0x0e, 0x0a, 0x0a, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x36, 0x10, 0x03, 0x12, 313 0x0e, 0x0a, 0x0a, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x34, 0x10, 0x04, 0x42, 314 0x5e, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 315 0x79, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x50, 0x01, 0x5a, 0x29, 0x67, 316 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 317 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x77, 318 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0xaa, 0x02, 0x14, 0x58, 0x72, 0x61, 0x79, 0x2e, 319 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x57, 0x69, 0x72, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x62, 320 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 321 } 322 323 var ( 324 file_proxy_wireguard_config_proto_rawDescOnce sync.Once 325 file_proxy_wireguard_config_proto_rawDescData = file_proxy_wireguard_config_proto_rawDesc 326 ) 327 328 func file_proxy_wireguard_config_proto_rawDescGZIP() []byte { 329 file_proxy_wireguard_config_proto_rawDescOnce.Do(func() { 330 file_proxy_wireguard_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_wireguard_config_proto_rawDescData) 331 }) 332 return file_proxy_wireguard_config_proto_rawDescData 333 } 334 335 var file_proxy_wireguard_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 336 var file_proxy_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 337 var file_proxy_wireguard_config_proto_goTypes = []interface{}{ 338 (DeviceConfig_DomainStrategy)(0), // 0: xray.proxy.wireguard.DeviceConfig.DomainStrategy 339 (*PeerConfig)(nil), // 1: xray.proxy.wireguard.PeerConfig 340 (*DeviceConfig)(nil), // 2: xray.proxy.wireguard.DeviceConfig 341 } 342 var file_proxy_wireguard_config_proto_depIdxs = []int32{ 343 1, // 0: xray.proxy.wireguard.DeviceConfig.peers:type_name -> xray.proxy.wireguard.PeerConfig 344 0, // 1: xray.proxy.wireguard.DeviceConfig.domain_strategy:type_name -> xray.proxy.wireguard.DeviceConfig.DomainStrategy 345 2, // [2:2] is the sub-list for method output_type 346 2, // [2:2] is the sub-list for method input_type 347 2, // [2:2] is the sub-list for extension type_name 348 2, // [2:2] is the sub-list for extension extendee 349 0, // [0:2] is the sub-list for field type_name 350 } 351 352 func init() { file_proxy_wireguard_config_proto_init() } 353 func file_proxy_wireguard_config_proto_init() { 354 if File_proxy_wireguard_config_proto != nil { 355 return 356 } 357 if !protoimpl.UnsafeEnabled { 358 file_proxy_wireguard_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 359 switch v := v.(*PeerConfig); i { 360 case 0: 361 return &v.state 362 case 1: 363 return &v.sizeCache 364 case 2: 365 return &v.unknownFields 366 default: 367 return nil 368 } 369 } 370 file_proxy_wireguard_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 371 switch v := v.(*DeviceConfig); i { 372 case 0: 373 return &v.state 374 case 1: 375 return &v.sizeCache 376 case 2: 377 return &v.unknownFields 378 default: 379 return nil 380 } 381 } 382 } 383 type x struct{} 384 out := protoimpl.TypeBuilder{ 385 File: protoimpl.DescBuilder{ 386 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 387 RawDescriptor: file_proxy_wireguard_config_proto_rawDesc, 388 NumEnums: 1, 389 NumMessages: 2, 390 NumExtensions: 0, 391 NumServices: 0, 392 }, 393 GoTypes: file_proxy_wireguard_config_proto_goTypes, 394 DependencyIndexes: file_proxy_wireguard_config_proto_depIdxs, 395 EnumInfos: file_proxy_wireguard_config_proto_enumTypes, 396 MessageInfos: file_proxy_wireguard_config_proto_msgTypes, 397 }.Build() 398 File_proxy_wireguard_config_proto = out.File 399 file_proxy_wireguard_config_proto_rawDesc = nil 400 file_proxy_wireguard_config_proto_goTypes = nil 401 file_proxy_wireguard_config_proto_depIdxs = nil 402 }