// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 // protoc v3.21.12 // source: pb/relay.proto package pb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type CircuitRelay_Status int32 const ( CircuitRelay_SUCCESS CircuitRelay_Status = 100 CircuitRelay_HOP_SRC_ADDR_TOO_LONG CircuitRelay_Status = 220 CircuitRelay_HOP_DST_ADDR_TOO_LONG CircuitRelay_Status = 221 CircuitRelay_HOP_SRC_MULTIADDR_INVALID CircuitRelay_Status = 250 CircuitRelay_HOP_DST_MULTIADDR_INVALID CircuitRelay_Status = 251 CircuitRelay_HOP_NO_CONN_TO_DST CircuitRelay_Status = 260 CircuitRelay_HOP_CANT_DIAL_DST CircuitRelay_Status = 261 CircuitRelay_HOP_CANT_OPEN_DST_STREAM CircuitRelay_Status = 262 CircuitRelay_HOP_CANT_SPEAK_RELAY CircuitRelay_Status = 270 CircuitRelay_HOP_CANT_RELAY_TO_SELF CircuitRelay_Status = 280 CircuitRelay_STOP_SRC_ADDR_TOO_LONG CircuitRelay_Status = 320 CircuitRelay_STOP_DST_ADDR_TOO_LONG CircuitRelay_Status = 321 CircuitRelay_STOP_SRC_MULTIADDR_INVALID CircuitRelay_Status = 350 CircuitRelay_STOP_DST_MULTIADDR_INVALID CircuitRelay_Status = 351 CircuitRelay_STOP_RELAY_REFUSED CircuitRelay_Status = 390 CircuitRelay_MALFORMED_MESSAGE CircuitRelay_Status = 400 ) // Enum value maps for CircuitRelay_Status. var ( CircuitRelay_Status_name = map[int32]string{ 100: "SUCCESS", 220: "HOP_SRC_ADDR_TOO_LONG", 221: "HOP_DST_ADDR_TOO_LONG", 250: "HOP_SRC_MULTIADDR_INVALID", 251: "HOP_DST_MULTIADDR_INVALID", 260: "HOP_NO_CONN_TO_DST", 261: "HOP_CANT_DIAL_DST", 262: "HOP_CANT_OPEN_DST_STREAM", 270: "HOP_CANT_SPEAK_RELAY", 280: "HOP_CANT_RELAY_TO_SELF", 320: "STOP_SRC_ADDR_TOO_LONG", 321: "STOP_DST_ADDR_TOO_LONG", 350: "STOP_SRC_MULTIADDR_INVALID", 351: "STOP_DST_MULTIADDR_INVALID", 390: "STOP_RELAY_REFUSED", 400: "MALFORMED_MESSAGE", } CircuitRelay_Status_value = map[string]int32{ "SUCCESS": 100, "HOP_SRC_ADDR_TOO_LONG": 220, "HOP_DST_ADDR_TOO_LONG": 221, "HOP_SRC_MULTIADDR_INVALID": 250, "HOP_DST_MULTIADDR_INVALID": 251, "HOP_NO_CONN_TO_DST": 260, "HOP_CANT_DIAL_DST": 261, "HOP_CANT_OPEN_DST_STREAM": 262, "HOP_CANT_SPEAK_RELAY": 270, "HOP_CANT_RELAY_TO_SELF": 280, "STOP_SRC_ADDR_TOO_LONG": 320, "STOP_DST_ADDR_TOO_LONG": 321, "STOP_SRC_MULTIADDR_INVALID": 350, "STOP_DST_MULTIADDR_INVALID": 351, "STOP_RELAY_REFUSED": 390, "MALFORMED_MESSAGE": 400, } ) func (x CircuitRelay_Status) Enum() *CircuitRelay_Status { p := new(CircuitRelay_Status) *p = x return p } func (x CircuitRelay_Status) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CircuitRelay_Status) Descriptor() protoreflect.EnumDescriptor { return file_pb_relay_proto_enumTypes[0].Descriptor() } func (CircuitRelay_Status) Type() protoreflect.EnumType { return &file_pb_relay_proto_enumTypes[0] } func (x CircuitRelay_Status) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *CircuitRelay_Status) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = CircuitRelay_Status(num) return nil } // Deprecated: Use CircuitRelay_Status.Descriptor instead. func (CircuitRelay_Status) EnumDescriptor() ([]byte, []int) { return file_pb_relay_proto_rawDescGZIP(), []int{0, 0} } type CircuitRelay_Type int32 const ( CircuitRelay_HOP CircuitRelay_Type = 1 CircuitRelay_STOP CircuitRelay_Type = 2 CircuitRelay_STATUS CircuitRelay_Type = 3 CircuitRelay_CAN_HOP CircuitRelay_Type = 4 ) // Enum value maps for CircuitRelay_Type. var ( CircuitRelay_Type_name = map[int32]string{ 1: "HOP", 2: "STOP", 3: "STATUS", 4: "CAN_HOP", } CircuitRelay_Type_value = map[string]int32{ "HOP": 1, "STOP": 2, "STATUS": 3, "CAN_HOP": 4, } ) func (x CircuitRelay_Type) Enum() *CircuitRelay_Type { p := new(CircuitRelay_Type) *p = x return p } func (x CircuitRelay_Type) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (CircuitRelay_Type) Descriptor() protoreflect.EnumDescriptor { return file_pb_relay_proto_enumTypes[1].Descriptor() } func (CircuitRelay_Type) Type() protoreflect.EnumType { return &file_pb_relay_proto_enumTypes[1] } func (x CircuitRelay_Type) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Do not use. func (x *CircuitRelay_Type) UnmarshalJSON(b []byte) error { num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } *x = CircuitRelay_Type(num) return nil } // Deprecated: Use CircuitRelay_Type.Descriptor instead. func (CircuitRelay_Type) EnumDescriptor() ([]byte, []int) { return file_pb_relay_proto_rawDescGZIP(), []int{0, 1} } type CircuitRelay struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Type *CircuitRelay_Type `protobuf:"varint,1,opt,name=type,enum=relay.pb.CircuitRelay_Type" json:"type,omitempty"` // Type of the message SrcPeer *CircuitRelay_Peer `protobuf:"bytes,2,opt,name=srcPeer" json:"srcPeer,omitempty"` // srcPeer and dstPeer are used when Type is HOP or STOP DstPeer *CircuitRelay_Peer `protobuf:"bytes,3,opt,name=dstPeer" json:"dstPeer,omitempty"` Code *CircuitRelay_Status `protobuf:"varint,4,opt,name=code,enum=relay.pb.CircuitRelay_Status" json:"code,omitempty"` // Status code, used when Type is STATUS } func (x *CircuitRelay) Reset() { *x = CircuitRelay{} if protoimpl.UnsafeEnabled { mi := &file_pb_relay_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CircuitRelay) String() string { return protoimpl.X.MessageStringOf(x) } func (*CircuitRelay) ProtoMessage() {} func (x *CircuitRelay) ProtoReflect() protoreflect.Message { mi := &file_pb_relay_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CircuitRelay.ProtoReflect.Descriptor instead. func (*CircuitRelay) Descriptor() ([]byte, []int) { return file_pb_relay_proto_rawDescGZIP(), []int{0} } func (x *CircuitRelay) GetType() CircuitRelay_Type { if x != nil && x.Type != nil { return *x.Type } return CircuitRelay_HOP } func (x *CircuitRelay) GetSrcPeer() *CircuitRelay_Peer { if x != nil { return x.SrcPeer } return nil } func (x *CircuitRelay) GetDstPeer() *CircuitRelay_Peer { if x != nil { return x.DstPeer } return nil } func (x *CircuitRelay) GetCode() CircuitRelay_Status { if x != nil && x.Code != nil { return *x.Code } return CircuitRelay_SUCCESS } type CircuitRelay_Peer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id []byte `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` // peer id Addrs [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"` // peer's known addresses } func (x *CircuitRelay_Peer) Reset() { *x = CircuitRelay_Peer{} if protoimpl.UnsafeEnabled { mi := &file_pb_relay_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CircuitRelay_Peer) String() string { return protoimpl.X.MessageStringOf(x) } func (*CircuitRelay_Peer) ProtoMessage() {} func (x *CircuitRelay_Peer) ProtoReflect() protoreflect.Message { mi := &file_pb_relay_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CircuitRelay_Peer.ProtoReflect.Descriptor instead. func (*CircuitRelay_Peer) Descriptor() ([]byte, []int) { return file_pb_relay_proto_rawDescGZIP(), []int{0, 0} } func (x *CircuitRelay_Peer) GetId() []byte { if x != nil { return x.Id } return nil } func (x *CircuitRelay_Peer) GetAddrs() [][]byte { if x != nil { return x.Addrs } return nil } var File_pb_relay_proto protoreflect.FileDescriptor var file_pb_relay_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x70, 0x62, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x62, 0x22, 0x87, 0x06, 0x0a, 0x0c, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x73, 0x72, 0x63, 0x50, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, 0x65, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x1a, 0x2c, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x22, 0xc2, 0x03, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x64, 0x12, 0x1a, 0x0a, 0x15, 0x48, 0x4f, 0x50, 0x5f, 0x53, 0x52, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0xdc, 0x01, 0x12, 0x1a, 0x0a, 0x15, 0x48, 0x4f, 0x50, 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0xdd, 0x01, 0x12, 0x1e, 0x0a, 0x19, 0x48, 0x4f, 0x50, 0x5f, 0x53, 0x52, 0x43, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0xfa, 0x01, 0x12, 0x1e, 0x0a, 0x19, 0x48, 0x4f, 0x50, 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0xfb, 0x01, 0x12, 0x17, 0x0a, 0x12, 0x48, 0x4f, 0x50, 0x5f, 0x4e, 0x4f, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x5f, 0x54, 0x4f, 0x5f, 0x44, 0x53, 0x54, 0x10, 0x84, 0x02, 0x12, 0x16, 0x0a, 0x11, 0x48, 0x4f, 0x50, 0x5f, 0x43, 0x41, 0x4e, 0x54, 0x5f, 0x44, 0x49, 0x41, 0x4c, 0x5f, 0x44, 0x53, 0x54, 0x10, 0x85, 0x02, 0x12, 0x1d, 0x0a, 0x18, 0x48, 0x4f, 0x50, 0x5f, 0x43, 0x41, 0x4e, 0x54, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x86, 0x02, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x4f, 0x50, 0x5f, 0x43, 0x41, 0x4e, 0x54, 0x5f, 0x53, 0x50, 0x45, 0x41, 0x4b, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x8e, 0x02, 0x12, 0x1b, 0x0a, 0x16, 0x48, 0x4f, 0x50, 0x5f, 0x43, 0x41, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x10, 0x98, 0x02, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x53, 0x52, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0xc0, 0x02, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0xc1, 0x02, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x53, 0x52, 0x43, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0xde, 0x02, 0x12, 0x1f, 0x0a, 0x1a, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x41, 0x44, 0x44, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0xdf, 0x02, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x52, 0x45, 0x46, 0x55, 0x53, 0x45, 0x44, 0x10, 0x86, 0x03, 0x12, 0x16, 0x0a, 0x11, 0x4d, 0x41, 0x4c, 0x46, 0x4f, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x90, 0x03, 0x22, 0x32, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x48, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x54, 0x4f, 0x50, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x41, 0x4e, 0x5f, 0x48, 0x4f, 0x50, 0x10, 0x04, } var ( file_pb_relay_proto_rawDescOnce sync.Once file_pb_relay_proto_rawDescData = file_pb_relay_proto_rawDesc ) func file_pb_relay_proto_rawDescGZIP() []byte { file_pb_relay_proto_rawDescOnce.Do(func() { file_pb_relay_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_relay_proto_rawDescData) }) return file_pb_relay_proto_rawDescData } var file_pb_relay_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_pb_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_pb_relay_proto_goTypes = []interface{}{ (CircuitRelay_Status)(0), // 0: relay.pb.CircuitRelay.Status (CircuitRelay_Type)(0), // 1: relay.pb.CircuitRelay.Type (*CircuitRelay)(nil), // 2: relay.pb.CircuitRelay (*CircuitRelay_Peer)(nil), // 3: relay.pb.CircuitRelay.Peer } var file_pb_relay_proto_depIdxs = []int32{ 1, // 0: relay.pb.CircuitRelay.type:type_name -> relay.pb.CircuitRelay.Type 3, // 1: relay.pb.CircuitRelay.srcPeer:type_name -> relay.pb.CircuitRelay.Peer 3, // 2: relay.pb.CircuitRelay.dstPeer:type_name -> relay.pb.CircuitRelay.Peer 0, // 3: relay.pb.CircuitRelay.code:type_name -> relay.pb.CircuitRelay.Status 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_pb_relay_proto_init() } func file_pb_relay_proto_init() { if File_pb_relay_proto != nil { return } if !protoimpl.UnsafeEnabled { file_pb_relay_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CircuitRelay); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_pb_relay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CircuitRelay_Peer); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pb_relay_proto_rawDesc, NumEnums: 2, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_pb_relay_proto_goTypes, DependencyIndexes: file_pb_relay_proto_depIdxs, EnumInfos: file_pb_relay_proto_enumTypes, MessageInfos: file_pb_relay_proto_msgTypes, }.Build() File_pb_relay_proto = out.File file_pb_relay_proto_rawDesc = nil file_pb_relay_proto_goTypes = nil file_pb_relay_proto_depIdxs = nil }