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