github.com/v2fly/v2ray-core/v4@v4.45.2/common/net/address.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.27.1 4 // protoc v3.17.3 5 // source: common/net/address.proto 6 7 package net 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 // Address of a network host. It may be either an IP address or a domain 24 // address. 25 type IPOrDomain struct { 26 state protoimpl.MessageState 27 sizeCache protoimpl.SizeCache 28 unknownFields protoimpl.UnknownFields 29 30 // Types that are assignable to Address: 31 // *IPOrDomain_Ip 32 // *IPOrDomain_Domain 33 Address isIPOrDomain_Address `protobuf_oneof:"address"` 34 } 35 36 func (x *IPOrDomain) Reset() { 37 *x = IPOrDomain{} 38 if protoimpl.UnsafeEnabled { 39 mi := &file_common_net_address_proto_msgTypes[0] 40 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 41 ms.StoreMessageInfo(mi) 42 } 43 } 44 45 func (x *IPOrDomain) String() string { 46 return protoimpl.X.MessageStringOf(x) 47 } 48 49 func (*IPOrDomain) ProtoMessage() {} 50 51 func (x *IPOrDomain) ProtoReflect() protoreflect.Message { 52 mi := &file_common_net_address_proto_msgTypes[0] 53 if protoimpl.UnsafeEnabled && x != nil { 54 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 55 if ms.LoadMessageInfo() == nil { 56 ms.StoreMessageInfo(mi) 57 } 58 return ms 59 } 60 return mi.MessageOf(x) 61 } 62 63 // Deprecated: Use IPOrDomain.ProtoReflect.Descriptor instead. 64 func (*IPOrDomain) Descriptor() ([]byte, []int) { 65 return file_common_net_address_proto_rawDescGZIP(), []int{0} 66 } 67 68 func (m *IPOrDomain) GetAddress() isIPOrDomain_Address { 69 if m != nil { 70 return m.Address 71 } 72 return nil 73 } 74 75 func (x *IPOrDomain) GetIp() []byte { 76 if x, ok := x.GetAddress().(*IPOrDomain_Ip); ok { 77 return x.Ip 78 } 79 return nil 80 } 81 82 func (x *IPOrDomain) GetDomain() string { 83 if x, ok := x.GetAddress().(*IPOrDomain_Domain); ok { 84 return x.Domain 85 } 86 return "" 87 } 88 89 type isIPOrDomain_Address interface { 90 isIPOrDomain_Address() 91 } 92 93 type IPOrDomain_Ip struct { 94 // IP address. Must by either 4 or 16 bytes. 95 Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3,oneof"` 96 } 97 98 type IPOrDomain_Domain struct { 99 // Domain address. 100 Domain string `protobuf:"bytes,2,opt,name=domain,proto3,oneof"` 101 } 102 103 func (*IPOrDomain_Ip) isIPOrDomain_Address() {} 104 105 func (*IPOrDomain_Domain) isIPOrDomain_Address() {} 106 107 var File_common_net_address_proto protoreflect.FileDescriptor 108 109 var file_common_net_address_proto_rawDesc = []byte{ 110 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 111 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 112 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 113 0x74, 0x22, 0x43, 0x0a, 0x0a, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 114 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69, 115 0x70, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 116 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61, 117 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 118 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 119 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 120 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 121 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 122 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 123 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 124 } 125 126 var ( 127 file_common_net_address_proto_rawDescOnce sync.Once 128 file_common_net_address_proto_rawDescData = file_common_net_address_proto_rawDesc 129 ) 130 131 func file_common_net_address_proto_rawDescGZIP() []byte { 132 file_common_net_address_proto_rawDescOnce.Do(func() { 133 file_common_net_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_address_proto_rawDescData) 134 }) 135 return file_common_net_address_proto_rawDescData 136 } 137 138 var file_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 139 var file_common_net_address_proto_goTypes = []interface{}{ 140 (*IPOrDomain)(nil), // 0: v2ray.core.common.net.IPOrDomain 141 } 142 var file_common_net_address_proto_depIdxs = []int32{ 143 0, // [0:0] is the sub-list for method output_type 144 0, // [0:0] is the sub-list for method input_type 145 0, // [0:0] is the sub-list for extension type_name 146 0, // [0:0] is the sub-list for extension extendee 147 0, // [0:0] is the sub-list for field type_name 148 } 149 150 func init() { file_common_net_address_proto_init() } 151 func file_common_net_address_proto_init() { 152 if File_common_net_address_proto != nil { 153 return 154 } 155 if !protoimpl.UnsafeEnabled { 156 file_common_net_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 157 switch v := v.(*IPOrDomain); i { 158 case 0: 159 return &v.state 160 case 1: 161 return &v.sizeCache 162 case 2: 163 return &v.unknownFields 164 default: 165 return nil 166 } 167 } 168 } 169 file_common_net_address_proto_msgTypes[0].OneofWrappers = []interface{}{ 170 (*IPOrDomain_Ip)(nil), 171 (*IPOrDomain_Domain)(nil), 172 } 173 type x struct{} 174 out := protoimpl.TypeBuilder{ 175 File: protoimpl.DescBuilder{ 176 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 177 RawDescriptor: file_common_net_address_proto_rawDesc, 178 NumEnums: 0, 179 NumMessages: 1, 180 NumExtensions: 0, 181 NumServices: 0, 182 }, 183 GoTypes: file_common_net_address_proto_goTypes, 184 DependencyIndexes: file_common_net_address_proto_depIdxs, 185 MessageInfos: file_common_net_address_proto_msgTypes, 186 }.Build() 187 File_common_net_address_proto = out.File 188 file_common_net_address_proto_rawDesc = nil 189 file_common_net_address_proto_goTypes = nil 190 file_common_net_address_proto_depIdxs = nil 191 }