github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/proxy/freedom/config.pb.go (about) 1 package freedom 2 3 import ( 4 protocol "github.com/v2fly/v2ray-core/v5/common/protocol" 5 _ "github.com/v2fly/v2ray-core/v5/common/protoext" 6 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 7 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 8 reflect "reflect" 9 sync "sync" 10 ) 11 12 const ( 13 // Verify that this generated code is sufficiently up-to-date. 14 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 15 // Verify that runtime/protoimpl is sufficiently up-to-date. 16 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 17 ) 18 19 type Config_DomainStrategy int32 20 21 const ( 22 Config_AS_IS Config_DomainStrategy = 0 23 Config_USE_IP Config_DomainStrategy = 1 24 Config_USE_IP4 Config_DomainStrategy = 2 25 Config_USE_IP6 Config_DomainStrategy = 3 26 ) 27 28 // Enum value maps for Config_DomainStrategy. 29 var ( 30 Config_DomainStrategy_name = map[int32]string{ 31 0: "AS_IS", 32 1: "USE_IP", 33 2: "USE_IP4", 34 3: "USE_IP6", 35 } 36 Config_DomainStrategy_value = map[string]int32{ 37 "AS_IS": 0, 38 "USE_IP": 1, 39 "USE_IP4": 2, 40 "USE_IP6": 3, 41 } 42 ) 43 44 func (x Config_DomainStrategy) Enum() *Config_DomainStrategy { 45 p := new(Config_DomainStrategy) 46 *p = x 47 return p 48 } 49 50 func (x Config_DomainStrategy) String() string { 51 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 52 } 53 54 func (Config_DomainStrategy) Descriptor() protoreflect.EnumDescriptor { 55 return file_proxy_freedom_config_proto_enumTypes[0].Descriptor() 56 } 57 58 func (Config_DomainStrategy) Type() protoreflect.EnumType { 59 return &file_proxy_freedom_config_proto_enumTypes[0] 60 } 61 62 func (x Config_DomainStrategy) Number() protoreflect.EnumNumber { 63 return protoreflect.EnumNumber(x) 64 } 65 66 // Deprecated: Use Config_DomainStrategy.Descriptor instead. 67 func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int) { 68 return file_proxy_freedom_config_proto_rawDescGZIP(), []int{1, 0} 69 } 70 71 type DestinationOverride struct { 72 state protoimpl.MessageState 73 sizeCache protoimpl.SizeCache 74 unknownFields protoimpl.UnknownFields 75 76 Server *protocol.ServerEndpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` 77 } 78 79 func (x *DestinationOverride) Reset() { 80 *x = DestinationOverride{} 81 if protoimpl.UnsafeEnabled { 82 mi := &file_proxy_freedom_config_proto_msgTypes[0] 83 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 84 ms.StoreMessageInfo(mi) 85 } 86 } 87 88 func (x *DestinationOverride) String() string { 89 return protoimpl.X.MessageStringOf(x) 90 } 91 92 func (*DestinationOverride) ProtoMessage() {} 93 94 func (x *DestinationOverride) ProtoReflect() protoreflect.Message { 95 mi := &file_proxy_freedom_config_proto_msgTypes[0] 96 if protoimpl.UnsafeEnabled && x != nil { 97 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 98 if ms.LoadMessageInfo() == nil { 99 ms.StoreMessageInfo(mi) 100 } 101 return ms 102 } 103 return mi.MessageOf(x) 104 } 105 106 // Deprecated: Use DestinationOverride.ProtoReflect.Descriptor instead. 107 func (*DestinationOverride) Descriptor() ([]byte, []int) { 108 return file_proxy_freedom_config_proto_rawDescGZIP(), []int{0} 109 } 110 111 func (x *DestinationOverride) GetServer() *protocol.ServerEndpoint { 112 if x != nil { 113 return x.Server 114 } 115 return nil 116 } 117 118 type Config struct { 119 state protoimpl.MessageState 120 sizeCache protoimpl.SizeCache 121 unknownFields protoimpl.UnknownFields 122 123 DomainStrategy Config_DomainStrategy `protobuf:"varint,1,opt,name=domain_strategy,json=domainStrategy,proto3,enum=v2ray.core.proxy.freedom.Config_DomainStrategy" json:"domain_strategy,omitempty"` 124 // Deprecated: Marked as deprecated in proxy/freedom/config.proto. 125 Timeout uint32 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` 126 DestinationOverride *DestinationOverride `protobuf:"bytes,3,opt,name=destination_override,json=destinationOverride,proto3" json:"destination_override,omitempty"` 127 UserLevel uint32 `protobuf:"varint,4,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"` 128 } 129 130 func (x *Config) Reset() { 131 *x = Config{} 132 if protoimpl.UnsafeEnabled { 133 mi := &file_proxy_freedom_config_proto_msgTypes[1] 134 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 135 ms.StoreMessageInfo(mi) 136 } 137 } 138 139 func (x *Config) String() string { 140 return protoimpl.X.MessageStringOf(x) 141 } 142 143 func (*Config) ProtoMessage() {} 144 145 func (x *Config) ProtoReflect() protoreflect.Message { 146 mi := &file_proxy_freedom_config_proto_msgTypes[1] 147 if protoimpl.UnsafeEnabled && x != nil { 148 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 149 if ms.LoadMessageInfo() == nil { 150 ms.StoreMessageInfo(mi) 151 } 152 return ms 153 } 154 return mi.MessageOf(x) 155 } 156 157 // Deprecated: Use Config.ProtoReflect.Descriptor instead. 158 func (*Config) Descriptor() ([]byte, []int) { 159 return file_proxy_freedom_config_proto_rawDescGZIP(), []int{1} 160 } 161 162 func (x *Config) GetDomainStrategy() Config_DomainStrategy { 163 if x != nil { 164 return x.DomainStrategy 165 } 166 return Config_AS_IS 167 } 168 169 // Deprecated: Marked as deprecated in proxy/freedom/config.proto. 170 func (x *Config) GetTimeout() uint32 { 171 if x != nil { 172 return x.Timeout 173 } 174 return 0 175 } 176 177 func (x *Config) GetDestinationOverride() *DestinationOverride { 178 if x != nil { 179 return x.DestinationOverride 180 } 181 return nil 182 } 183 184 func (x *Config) GetUserLevel() uint32 { 185 if x != nil { 186 return x.UserLevel 187 } 188 return 0 189 } 190 191 type SimplifiedConfig struct { 192 state protoimpl.MessageState 193 sizeCache protoimpl.SizeCache 194 unknownFields protoimpl.UnknownFields 195 } 196 197 func (x *SimplifiedConfig) Reset() { 198 *x = SimplifiedConfig{} 199 if protoimpl.UnsafeEnabled { 200 mi := &file_proxy_freedom_config_proto_msgTypes[2] 201 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 202 ms.StoreMessageInfo(mi) 203 } 204 } 205 206 func (x *SimplifiedConfig) String() string { 207 return protoimpl.X.MessageStringOf(x) 208 } 209 210 func (*SimplifiedConfig) ProtoMessage() {} 211 212 func (x *SimplifiedConfig) ProtoReflect() protoreflect.Message { 213 mi := &file_proxy_freedom_config_proto_msgTypes[2] 214 if protoimpl.UnsafeEnabled && x != nil { 215 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 216 if ms.LoadMessageInfo() == nil { 217 ms.StoreMessageInfo(mi) 218 } 219 return ms 220 } 221 return mi.MessageOf(x) 222 } 223 224 // Deprecated: Use SimplifiedConfig.ProtoReflect.Descriptor instead. 225 func (*SimplifiedConfig) Descriptor() ([]byte, []int) { 226 return file_proxy_freedom_config_proto_rawDescGZIP(), []int{2} 227 } 228 229 var File_proxy_freedom_config_proto protoreflect.FileDescriptor 230 231 var file_proxy_freedom_config_proto_rawDesc = []byte{ 232 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2f, 233 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x76, 0x32, 234 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 235 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 236 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 237 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 238 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 239 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x13, 0x44, 240 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 241 0x64, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 242 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 243 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 244 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 245 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0xc4, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 246 0x67, 0x12, 0x58, 0x0a, 0x0f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 247 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x76, 0x32, 0x72, 248 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 249 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x6f, 0x6d, 250 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 251 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x1c, 0x0a, 0x07, 0x74, 252 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 253 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x60, 0x0a, 0x14, 0x64, 0x65, 0x73, 254 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 255 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 256 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 257 0x6f, 0x6d, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x76, 258 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 259 0x69, 0x6f, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 260 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 261 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x41, 0x0a, 0x0e, 0x44, 0x6f, 262 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x09, 0x0a, 0x05, 263 0x41, 0x53, 0x5f, 0x49, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x53, 0x45, 0x5f, 0x49, 264 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x10, 0x02, 265 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x10, 0x03, 0x22, 0x2b, 0x0a, 266 0x10, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 267 0x67, 0x3a, 0x17, 0x82, 0xb5, 0x18, 0x13, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 268 0x64, 0x12, 0x07, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x42, 0x69, 0x0a, 0x1c, 0x63, 0x6f, 269 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 270 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 271 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 272 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 273 0x78, 0x79, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 274 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x46, 0x72, 275 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 276 } 277 278 var ( 279 file_proxy_freedom_config_proto_rawDescOnce sync.Once 280 file_proxy_freedom_config_proto_rawDescData = file_proxy_freedom_config_proto_rawDesc 281 ) 282 283 func file_proxy_freedom_config_proto_rawDescGZIP() []byte { 284 file_proxy_freedom_config_proto_rawDescOnce.Do(func() { 285 file_proxy_freedom_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_freedom_config_proto_rawDescData) 286 }) 287 return file_proxy_freedom_config_proto_rawDescData 288 } 289 290 var file_proxy_freedom_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 291 var file_proxy_freedom_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 292 var file_proxy_freedom_config_proto_goTypes = []interface{}{ 293 (Config_DomainStrategy)(0), // 0: v2ray.core.proxy.freedom.Config.DomainStrategy 294 (*DestinationOverride)(nil), // 1: v2ray.core.proxy.freedom.DestinationOverride 295 (*Config)(nil), // 2: v2ray.core.proxy.freedom.Config 296 (*SimplifiedConfig)(nil), // 3: v2ray.core.proxy.freedom.SimplifiedConfig 297 (*protocol.ServerEndpoint)(nil), // 4: v2ray.core.common.protocol.ServerEndpoint 298 } 299 var file_proxy_freedom_config_proto_depIdxs = []int32{ 300 4, // 0: v2ray.core.proxy.freedom.DestinationOverride.server:type_name -> v2ray.core.common.protocol.ServerEndpoint 301 0, // 1: v2ray.core.proxy.freedom.Config.domain_strategy:type_name -> v2ray.core.proxy.freedom.Config.DomainStrategy 302 1, // 2: v2ray.core.proxy.freedom.Config.destination_override:type_name -> v2ray.core.proxy.freedom.DestinationOverride 303 3, // [3:3] is the sub-list for method output_type 304 3, // [3:3] is the sub-list for method input_type 305 3, // [3:3] is the sub-list for extension type_name 306 3, // [3:3] is the sub-list for extension extendee 307 0, // [0:3] is the sub-list for field type_name 308 } 309 310 func init() { file_proxy_freedom_config_proto_init() } 311 func file_proxy_freedom_config_proto_init() { 312 if File_proxy_freedom_config_proto != nil { 313 return 314 } 315 if !protoimpl.UnsafeEnabled { 316 file_proxy_freedom_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 317 switch v := v.(*DestinationOverride); i { 318 case 0: 319 return &v.state 320 case 1: 321 return &v.sizeCache 322 case 2: 323 return &v.unknownFields 324 default: 325 return nil 326 } 327 } 328 file_proxy_freedom_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 329 switch v := v.(*Config); i { 330 case 0: 331 return &v.state 332 case 1: 333 return &v.sizeCache 334 case 2: 335 return &v.unknownFields 336 default: 337 return nil 338 } 339 } 340 file_proxy_freedom_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 341 switch v := v.(*SimplifiedConfig); i { 342 case 0: 343 return &v.state 344 case 1: 345 return &v.sizeCache 346 case 2: 347 return &v.unknownFields 348 default: 349 return nil 350 } 351 } 352 } 353 type x struct{} 354 out := protoimpl.TypeBuilder{ 355 File: protoimpl.DescBuilder{ 356 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 357 RawDescriptor: file_proxy_freedom_config_proto_rawDesc, 358 NumEnums: 1, 359 NumMessages: 3, 360 NumExtensions: 0, 361 NumServices: 0, 362 }, 363 GoTypes: file_proxy_freedom_config_proto_goTypes, 364 DependencyIndexes: file_proxy_freedom_config_proto_depIdxs, 365 EnumInfos: file_proxy_freedom_config_proto_enumTypes, 366 MessageInfos: file_proxy_freedom_config_proto_msgTypes, 367 }.Build() 368 File_proxy_freedom_config_proto = out.File 369 file_proxy_freedom_config_proto_rawDesc = nil 370 file_proxy_freedom_config_proto_goTypes = nil 371 file_proxy_freedom_config_proto_depIdxs = nil 372 }