github.com/xraypb/Xray-core@v1.8.1/common/net/address.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.28.1 4 // protoc v3.21.12 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 // 32 // *IPOrDomain_Ip 33 // *IPOrDomain_Domain 34 Address isIPOrDomain_Address `protobuf_oneof:"address"` 35 } 36 37 func (x *IPOrDomain) Reset() { 38 *x = IPOrDomain{} 39 if protoimpl.UnsafeEnabled { 40 mi := &file_common_net_address_proto_msgTypes[0] 41 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 42 ms.StoreMessageInfo(mi) 43 } 44 } 45 46 func (x *IPOrDomain) String() string { 47 return protoimpl.X.MessageStringOf(x) 48 } 49 50 func (*IPOrDomain) ProtoMessage() {} 51 52 func (x *IPOrDomain) ProtoReflect() protoreflect.Message { 53 mi := &file_common_net_address_proto_msgTypes[0] 54 if protoimpl.UnsafeEnabled && x != nil { 55 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 56 if ms.LoadMessageInfo() == nil { 57 ms.StoreMessageInfo(mi) 58 } 59 return ms 60 } 61 return mi.MessageOf(x) 62 } 63 64 // Deprecated: Use IPOrDomain.ProtoReflect.Descriptor instead. 65 func (*IPOrDomain) Descriptor() ([]byte, []int) { 66 return file_common_net_address_proto_rawDescGZIP(), []int{0} 67 } 68 69 func (m *IPOrDomain) GetAddress() isIPOrDomain_Address { 70 if m != nil { 71 return m.Address 72 } 73 return nil 74 } 75 76 func (x *IPOrDomain) GetIp() []byte { 77 if x, ok := x.GetAddress().(*IPOrDomain_Ip); ok { 78 return x.Ip 79 } 80 return nil 81 } 82 83 func (x *IPOrDomain) GetDomain() string { 84 if x, ok := x.GetAddress().(*IPOrDomain_Domain); ok { 85 return x.Domain 86 } 87 return "" 88 } 89 90 type isIPOrDomain_Address interface { 91 isIPOrDomain_Address() 92 } 93 94 type IPOrDomain_Ip struct { 95 // IP address. Must by either 4 or 16 bytes. 96 Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3,oneof"` 97 } 98 99 type IPOrDomain_Domain struct { 100 // Domain address. 101 Domain string `protobuf:"bytes,2,opt,name=domain,proto3,oneof"` 102 } 103 104 func (*IPOrDomain_Ip) isIPOrDomain_Address() {} 105 106 func (*IPOrDomain_Domain) isIPOrDomain_Address() {} 107 108 var File_common_net_address_proto protoreflect.FileDescriptor 109 110 var file_common_net_address_proto_rawDesc = []byte{ 111 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 112 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x78, 0x72, 0x61, 0x79, 113 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x22, 0x43, 0x0a, 0x0a, 0x49, 114 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 115 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x06, 0x64, 116 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 117 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 118 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 119 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 120 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 121 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 122 0x02, 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 123 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: xray.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 }