github.com/moqsien/xraycore@v1.8.5/proxy/shadowsocks/config.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.30.0 4 // protoc v4.23.1 5 // source: proxy/shadowsocks/config.proto 6 7 package shadowsocks 8 9 import ( 10 net "github.com/moqsien/xraycore/common/net" 11 protocol "github.com/moqsien/xraycore/common/protocol" 12 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 13 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 14 reflect "reflect" 15 sync "sync" 16 ) 17 18 const ( 19 // Verify that this generated code is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 21 // Verify that runtime/protoimpl is sufficiently up-to-date. 22 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 23 ) 24 25 type CipherType int32 26 27 const ( 28 CipherType_UNKNOWN CipherType = 0 29 CipherType_AES_128_GCM CipherType = 5 30 CipherType_AES_256_GCM CipherType = 6 31 CipherType_CHACHA20_POLY1305 CipherType = 7 32 CipherType_XCHACHA20_POLY1305 CipherType = 8 33 CipherType_NONE CipherType = 9 34 ) 35 36 // Enum value maps for CipherType. 37 var ( 38 CipherType_name = map[int32]string{ 39 0: "UNKNOWN", 40 5: "AES_128_GCM", 41 6: "AES_256_GCM", 42 7: "CHACHA20_POLY1305", 43 8: "XCHACHA20_POLY1305", 44 9: "NONE", 45 } 46 CipherType_value = map[string]int32{ 47 "UNKNOWN": 0, 48 "AES_128_GCM": 5, 49 "AES_256_GCM": 6, 50 "CHACHA20_POLY1305": 7, 51 "XCHACHA20_POLY1305": 8, 52 "NONE": 9, 53 } 54 ) 55 56 func (x CipherType) Enum() *CipherType { 57 p := new(CipherType) 58 *p = x 59 return p 60 } 61 62 func (x CipherType) String() string { 63 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 64 } 65 66 func (CipherType) Descriptor() protoreflect.EnumDescriptor { 67 return file_proxy_shadowsocks_config_proto_enumTypes[0].Descriptor() 68 } 69 70 func (CipherType) Type() protoreflect.EnumType { 71 return &file_proxy_shadowsocks_config_proto_enumTypes[0] 72 } 73 74 func (x CipherType) Number() protoreflect.EnumNumber { 75 return protoreflect.EnumNumber(x) 76 } 77 78 // Deprecated: Use CipherType.Descriptor instead. 79 func (CipherType) EnumDescriptor() ([]byte, []int) { 80 return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0} 81 } 82 83 type Account struct { 84 state protoimpl.MessageState 85 sizeCache protoimpl.SizeCache 86 unknownFields protoimpl.UnknownFields 87 88 Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` 89 CipherType CipherType `protobuf:"varint,2,opt,name=cipher_type,json=cipherType,proto3,enum=xray.proxy.shadowsocks.CipherType" json:"cipher_type,omitempty"` 90 IvCheck bool `protobuf:"varint,3,opt,name=iv_check,json=ivCheck,proto3" json:"iv_check,omitempty"` 91 } 92 93 func (x *Account) Reset() { 94 *x = Account{} 95 if protoimpl.UnsafeEnabled { 96 mi := &file_proxy_shadowsocks_config_proto_msgTypes[0] 97 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 98 ms.StoreMessageInfo(mi) 99 } 100 } 101 102 func (x *Account) String() string { 103 return protoimpl.X.MessageStringOf(x) 104 } 105 106 func (*Account) ProtoMessage() {} 107 108 func (x *Account) ProtoReflect() protoreflect.Message { 109 mi := &file_proxy_shadowsocks_config_proto_msgTypes[0] 110 if protoimpl.UnsafeEnabled && x != nil { 111 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 112 if ms.LoadMessageInfo() == nil { 113 ms.StoreMessageInfo(mi) 114 } 115 return ms 116 } 117 return mi.MessageOf(x) 118 } 119 120 // Deprecated: Use Account.ProtoReflect.Descriptor instead. 121 func (*Account) Descriptor() ([]byte, []int) { 122 return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{0} 123 } 124 125 func (x *Account) GetPassword() string { 126 if x != nil { 127 return x.Password 128 } 129 return "" 130 } 131 132 func (x *Account) GetCipherType() CipherType { 133 if x != nil { 134 return x.CipherType 135 } 136 return CipherType_UNKNOWN 137 } 138 139 func (x *Account) GetIvCheck() bool { 140 if x != nil { 141 return x.IvCheck 142 } 143 return false 144 } 145 146 type ServerConfig struct { 147 state protoimpl.MessageState 148 sizeCache protoimpl.SizeCache 149 unknownFields protoimpl.UnknownFields 150 151 Users []*protocol.User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` 152 Network []net.Network `protobuf:"varint,2,rep,packed,name=network,proto3,enum=xray.common.net.Network" json:"network,omitempty"` 153 } 154 155 func (x *ServerConfig) Reset() { 156 *x = ServerConfig{} 157 if protoimpl.UnsafeEnabled { 158 mi := &file_proxy_shadowsocks_config_proto_msgTypes[1] 159 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 160 ms.StoreMessageInfo(mi) 161 } 162 } 163 164 func (x *ServerConfig) String() string { 165 return protoimpl.X.MessageStringOf(x) 166 } 167 168 func (*ServerConfig) ProtoMessage() {} 169 170 func (x *ServerConfig) ProtoReflect() protoreflect.Message { 171 mi := &file_proxy_shadowsocks_config_proto_msgTypes[1] 172 if protoimpl.UnsafeEnabled && x != nil { 173 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 174 if ms.LoadMessageInfo() == nil { 175 ms.StoreMessageInfo(mi) 176 } 177 return ms 178 } 179 return mi.MessageOf(x) 180 } 181 182 // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead. 183 func (*ServerConfig) Descriptor() ([]byte, []int) { 184 return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{1} 185 } 186 187 func (x *ServerConfig) GetUsers() []*protocol.User { 188 if x != nil { 189 return x.Users 190 } 191 return nil 192 } 193 194 func (x *ServerConfig) GetNetwork() []net.Network { 195 if x != nil { 196 return x.Network 197 } 198 return nil 199 } 200 201 type ClientConfig struct { 202 state protoimpl.MessageState 203 sizeCache protoimpl.SizeCache 204 unknownFields protoimpl.UnknownFields 205 206 Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"` 207 } 208 209 func (x *ClientConfig) Reset() { 210 *x = ClientConfig{} 211 if protoimpl.UnsafeEnabled { 212 mi := &file_proxy_shadowsocks_config_proto_msgTypes[2] 213 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 214 ms.StoreMessageInfo(mi) 215 } 216 } 217 218 func (x *ClientConfig) String() string { 219 return protoimpl.X.MessageStringOf(x) 220 } 221 222 func (*ClientConfig) ProtoMessage() {} 223 224 func (x *ClientConfig) ProtoReflect() protoreflect.Message { 225 mi := &file_proxy_shadowsocks_config_proto_msgTypes[2] 226 if protoimpl.UnsafeEnabled && x != nil { 227 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 228 if ms.LoadMessageInfo() == nil { 229 ms.StoreMessageInfo(mi) 230 } 231 return ms 232 } 233 return mi.MessageOf(x) 234 } 235 236 // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. 237 func (*ClientConfig) Descriptor() ([]byte, []int) { 238 return file_proxy_shadowsocks_config_proto_rawDescGZIP(), []int{2} 239 } 240 241 func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint { 242 if x != nil { 243 return x.Server 244 } 245 return nil 246 } 247 248 var File_proxy_shadowsocks_config_proto protoreflect.FileDescriptor 249 250 var file_proxy_shadowsocks_config_proto_rawDesc = []byte{ 251 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 252 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 253 0x12, 0x16, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 254 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 255 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 256 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 257 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 258 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 259 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 260 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 261 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 262 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x63, 0x69, 0x70, 263 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 264 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 265 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 266 0x70, 0x65, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 267 0x0a, 0x08, 0x69, 0x76, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 268 0x52, 0x07, 0x69, 0x76, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x74, 0x0a, 0x0c, 0x53, 0x65, 0x72, 269 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x05, 0x75, 0x73, 0x65, 270 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 271 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 272 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6e, 273 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x78, 274 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x4e, 275 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 276 0x4c, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 277 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 278 0x24, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 279 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 280 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0x74, 0x0a, 281 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 282 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 283 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 284 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 285 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, 286 0x07, 0x12, 0x16, 0x0a, 0x12, 0x58, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 287 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 288 0x45, 0x10, 0x09, 0x42, 0x64, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 289 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 290 0x73, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 291 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 292 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 293 0xaa, 0x02, 0x16, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x68, 294 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 295 0x33, 296 } 297 298 var ( 299 file_proxy_shadowsocks_config_proto_rawDescOnce sync.Once 300 file_proxy_shadowsocks_config_proto_rawDescData = file_proxy_shadowsocks_config_proto_rawDesc 301 ) 302 303 func file_proxy_shadowsocks_config_proto_rawDescGZIP() []byte { 304 file_proxy_shadowsocks_config_proto_rawDescOnce.Do(func() { 305 file_proxy_shadowsocks_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_shadowsocks_config_proto_rawDescData) 306 }) 307 return file_proxy_shadowsocks_config_proto_rawDescData 308 } 309 310 var file_proxy_shadowsocks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 311 var file_proxy_shadowsocks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 312 var file_proxy_shadowsocks_config_proto_goTypes = []interface{}{ 313 (CipherType)(0), // 0: xray.proxy.shadowsocks.CipherType 314 (*Account)(nil), // 1: xray.proxy.shadowsocks.Account 315 (*ServerConfig)(nil), // 2: xray.proxy.shadowsocks.ServerConfig 316 (*ClientConfig)(nil), // 3: xray.proxy.shadowsocks.ClientConfig 317 (*protocol.User)(nil), // 4: xray.common.protocol.User 318 (net.Network)(0), // 5: xray.common.net.Network 319 (*protocol.ServerEndpoint)(nil), // 6: xray.common.protocol.ServerEndpoint 320 } 321 var file_proxy_shadowsocks_config_proto_depIdxs = []int32{ 322 0, // 0: xray.proxy.shadowsocks.Account.cipher_type:type_name -> xray.proxy.shadowsocks.CipherType 323 4, // 1: xray.proxy.shadowsocks.ServerConfig.users:type_name -> xray.common.protocol.User 324 5, // 2: xray.proxy.shadowsocks.ServerConfig.network:type_name -> xray.common.net.Network 325 6, // 3: xray.proxy.shadowsocks.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint 326 4, // [4:4] is the sub-list for method output_type 327 4, // [4:4] is the sub-list for method input_type 328 4, // [4:4] is the sub-list for extension type_name 329 4, // [4:4] is the sub-list for extension extendee 330 0, // [0:4] is the sub-list for field type_name 331 } 332 333 func init() { file_proxy_shadowsocks_config_proto_init() } 334 func file_proxy_shadowsocks_config_proto_init() { 335 if File_proxy_shadowsocks_config_proto != nil { 336 return 337 } 338 if !protoimpl.UnsafeEnabled { 339 file_proxy_shadowsocks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 340 switch v := v.(*Account); i { 341 case 0: 342 return &v.state 343 case 1: 344 return &v.sizeCache 345 case 2: 346 return &v.unknownFields 347 default: 348 return nil 349 } 350 } 351 file_proxy_shadowsocks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 352 switch v := v.(*ServerConfig); i { 353 case 0: 354 return &v.state 355 case 1: 356 return &v.sizeCache 357 case 2: 358 return &v.unknownFields 359 default: 360 return nil 361 } 362 } 363 file_proxy_shadowsocks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 364 switch v := v.(*ClientConfig); i { 365 case 0: 366 return &v.state 367 case 1: 368 return &v.sizeCache 369 case 2: 370 return &v.unknownFields 371 default: 372 return nil 373 } 374 } 375 } 376 type x struct{} 377 out := protoimpl.TypeBuilder{ 378 File: protoimpl.DescBuilder{ 379 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 380 RawDescriptor: file_proxy_shadowsocks_config_proto_rawDesc, 381 NumEnums: 1, 382 NumMessages: 3, 383 NumExtensions: 0, 384 NumServices: 0, 385 }, 386 GoTypes: file_proxy_shadowsocks_config_proto_goTypes, 387 DependencyIndexes: file_proxy_shadowsocks_config_proto_depIdxs, 388 EnumInfos: file_proxy_shadowsocks_config_proto_enumTypes, 389 MessageInfos: file_proxy_shadowsocks_config_proto_msgTypes, 390 }.Build() 391 File_proxy_shadowsocks_config_proto = out.File 392 file_proxy_shadowsocks_config_proto_rawDesc = nil 393 file_proxy_shadowsocks_config_proto_goTypes = nil 394 file_proxy_shadowsocks_config_proto_depIdxs = nil 395 }