Fix proto import paths (#2920)

* Add failing proto test

* Add a new proto compilation script

A proto file's *import path* is relative to one of the `--proto-path`s.

Previously, the proto files were compiled separately. Some invocations
used different values for the `--proto_path`, which led to inconsistent
import paths in proto file descriptors.

Typically, this wouldn't be a problem. However, if a downstream project
uses `protoregistry.GlobalFiles` to inspect proto dependencies, it will fail
to find a dependency's file descriptor when the dependency was compiled
with a different `--proto_path`.

By using a single script to generate all protobuf files, we can ensure
the `--proto_path` is always set to the same sane value (the root of the
project, as suggested in the [official documentation]).

[official documentation]: https://protobuf.dev/programming-guides/proto2/#importing

* Add go_package options so scripts/gen-proto.sh succeeds

* Remove undesirable `go:generate protoc` directives

* Run `go generate ./...`

* Script uses arrays, I think we need bash

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
This commit is contained in:
Josh Klopfenstein
2024-08-19 12:32:20 -05:00
committed by GitHub
parent a0349afb88
commit 0fb7daca4a
40 changed files with 953 additions and 843 deletions

View File

@@ -15,8 +15,6 @@ import (
"google.golang.org/protobuf/proto"
)
//go:generate protoc --go_out=. --go_opt=Mpb/crypto.proto=./pb pb/crypto.proto
const (
// RSA is an enum for the supported RSA key type
RSA = iota

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/crypto.proto
// protoc v5.27.3
// source: core/crypto/pb/crypto.proto
package pb
@@ -56,11 +56,11 @@ func (x KeyType) String() string {
}
func (KeyType) Descriptor() protoreflect.EnumDescriptor {
return file_pb_crypto_proto_enumTypes[0].Descriptor()
return file_core_crypto_pb_crypto_proto_enumTypes[0].Descriptor()
}
func (KeyType) Type() protoreflect.EnumType {
return &file_pb_crypto_proto_enumTypes[0]
return &file_core_crypto_pb_crypto_proto_enumTypes[0]
}
func (x KeyType) Number() protoreflect.EnumNumber {
@@ -79,7 +79,7 @@ func (x *KeyType) UnmarshalJSON(b []byte) error {
// Deprecated: Use KeyType.Descriptor instead.
func (KeyType) EnumDescriptor() ([]byte, []int) {
return file_pb_crypto_proto_rawDescGZIP(), []int{0}
return file_core_crypto_pb_crypto_proto_rawDescGZIP(), []int{0}
}
type PublicKey struct {
@@ -94,7 +94,7 @@ type PublicKey struct {
func (x *PublicKey) Reset() {
*x = PublicKey{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_crypto_proto_msgTypes[0]
mi := &file_core_crypto_pb_crypto_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -107,7 +107,7 @@ func (x *PublicKey) String() string {
func (*PublicKey) ProtoMessage() {}
func (x *PublicKey) ProtoReflect() protoreflect.Message {
mi := &file_pb_crypto_proto_msgTypes[0]
mi := &file_core_crypto_pb_crypto_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -120,7 +120,7 @@ func (x *PublicKey) ProtoReflect() protoreflect.Message {
// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.
func (*PublicKey) Descriptor() ([]byte, []int) {
return file_pb_crypto_proto_rawDescGZIP(), []int{0}
return file_core_crypto_pb_crypto_proto_rawDescGZIP(), []int{0}
}
func (x *PublicKey) GetType() KeyType {
@@ -149,7 +149,7 @@ type PrivateKey struct {
func (x *PrivateKey) Reset() {
*x = PrivateKey{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_crypto_proto_msgTypes[1]
mi := &file_core_crypto_pb_crypto_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -162,7 +162,7 @@ func (x *PrivateKey) String() string {
func (*PrivateKey) ProtoMessage() {}
func (x *PrivateKey) ProtoReflect() protoreflect.Message {
mi := &file_pb_crypto_proto_msgTypes[1]
mi := &file_core_crypto_pb_crypto_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -175,7 +175,7 @@ func (x *PrivateKey) ProtoReflect() protoreflect.Message {
// Deprecated: Use PrivateKey.ProtoReflect.Descriptor instead.
func (*PrivateKey) Descriptor() ([]byte, []int) {
return file_pb_crypto_proto_rawDescGZIP(), []int{1}
return file_core_crypto_pb_crypto_proto_rawDescGZIP(), []int{1}
}
func (x *PrivateKey) GetType() KeyType {
@@ -192,49 +192,50 @@ func (x *PrivateKey) GetData() []byte {
return nil
}
var File_pb_crypto_proto protoreflect.FileDescriptor
var File_core_crypto_pb_crypto_proto protoreflect.FileDescriptor
var file_pb_crypto_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x62, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x09, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x22, 0x47, 0x0a, 0x09,
0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x04, 0x54, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f,
0x2e, 0x70, 0x62, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52,
0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28,
0x0e, 0x32, 0x12, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x2e, 0x4b, 0x65,
0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44,
0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x2a,
0x39, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x53,
0x41, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x01,
0x12, 0x0d, 0x0a, 0x09, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x10, 0x02, 0x12,
0x09, 0x0a, 0x05, 0x45, 0x43, 0x44, 0x53, 0x41, 0x10, 0x03, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f,
0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63,
0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x70, 0x62,
var file_core_crypto_pb_crypto_proto_rawDesc = []byte{
0x0a, 0x1b, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x70, 0x62,
0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63,
0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x22, 0x47, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c,
0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x02, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x2e,
0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74,
0x61, 0x22, 0x48, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12,
0x26, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x12, 0x2e,
0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70,
0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18,
0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x2a, 0x39, 0x0a, 0x07, 0x4b,
0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x53, 0x41, 0x10, 0x00, 0x12,
0x0b, 0x0a, 0x07, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09,
0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x43, 0x44, 0x53, 0x41, 0x10, 0x03, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c,
0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74,
0x6f, 0x2f, 0x70, 0x62,
}
var (
file_pb_crypto_proto_rawDescOnce sync.Once
file_pb_crypto_proto_rawDescData = file_pb_crypto_proto_rawDesc
file_core_crypto_pb_crypto_proto_rawDescOnce sync.Once
file_core_crypto_pb_crypto_proto_rawDescData = file_core_crypto_pb_crypto_proto_rawDesc
)
func file_pb_crypto_proto_rawDescGZIP() []byte {
file_pb_crypto_proto_rawDescOnce.Do(func() {
file_pb_crypto_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_crypto_proto_rawDescData)
func file_core_crypto_pb_crypto_proto_rawDescGZIP() []byte {
file_core_crypto_pb_crypto_proto_rawDescOnce.Do(func() {
file_core_crypto_pb_crypto_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_crypto_pb_crypto_proto_rawDescData)
})
return file_pb_crypto_proto_rawDescData
return file_core_crypto_pb_crypto_proto_rawDescData
}
var file_pb_crypto_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pb_crypto_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_pb_crypto_proto_goTypes = []any{
var file_core_crypto_pb_crypto_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_core_crypto_pb_crypto_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_core_crypto_pb_crypto_proto_goTypes = []any{
(KeyType)(0), // 0: crypto.pb.KeyType
(*PublicKey)(nil), // 1: crypto.pb.PublicKey
(*PrivateKey)(nil), // 2: crypto.pb.PrivateKey
}
var file_pb_crypto_proto_depIdxs = []int32{
var file_core_crypto_pb_crypto_proto_depIdxs = []int32{
0, // 0: crypto.pb.PublicKey.Type:type_name -> crypto.pb.KeyType
0, // 1: crypto.pb.PrivateKey.Type:type_name -> crypto.pb.KeyType
2, // [2:2] is the sub-list for method output_type
@@ -244,13 +245,13 @@ var file_pb_crypto_proto_depIdxs = []int32{
0, // [0:2] is the sub-list for field type_name
}
func init() { file_pb_crypto_proto_init() }
func file_pb_crypto_proto_init() {
if File_pb_crypto_proto != nil {
func init() { file_core_crypto_pb_crypto_proto_init() }
func file_core_crypto_pb_crypto_proto_init() {
if File_core_crypto_pb_crypto_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_crypto_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_core_crypto_pb_crypto_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*PublicKey); i {
case 0:
return &v.state
@@ -262,7 +263,7 @@ func file_pb_crypto_proto_init() {
return nil
}
}
file_pb_crypto_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_core_crypto_pb_crypto_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*PrivateKey); i {
case 0:
return &v.state
@@ -279,19 +280,19 @@ func file_pb_crypto_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_crypto_proto_rawDesc,
RawDescriptor: file_core_crypto_pb_crypto_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_crypto_proto_goTypes,
DependencyIndexes: file_pb_crypto_proto_depIdxs,
EnumInfos: file_pb_crypto_proto_enumTypes,
MessageInfos: file_pb_crypto_proto_msgTypes,
GoTypes: file_core_crypto_pb_crypto_proto_goTypes,
DependencyIndexes: file_core_crypto_pb_crypto_proto_depIdxs,
EnumInfos: file_core_crypto_pb_crypto_proto_enumTypes,
MessageInfos: file_core_crypto_pb_crypto_proto_msgTypes,
}.Build()
File_pb_crypto_proto = out.File
file_pb_crypto_proto_rawDesc = nil
file_pb_crypto_proto_goTypes = nil
file_pb_crypto_proto_depIdxs = nil
File_core_crypto_pb_crypto_proto = out.File
file_core_crypto_pb_crypto_proto_rawDesc = nil
file_core_crypto_pb_crypto_proto_goTypes = nil
file_core_crypto_pb_crypto_proto_depIdxs = nil
}

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/peer_record.proto
// protoc v5.27.3
// source: core/peer/pb/peer_record.proto
package pb
@@ -44,7 +44,7 @@ type PeerRecord struct {
func (x *PeerRecord) Reset() {
*x = PeerRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_peer_record_proto_msgTypes[0]
mi := &file_core_peer_pb_peer_record_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -57,7 +57,7 @@ func (x *PeerRecord) String() string {
func (*PeerRecord) ProtoMessage() {}
func (x *PeerRecord) ProtoReflect() protoreflect.Message {
mi := &file_pb_peer_record_proto_msgTypes[0]
mi := &file_core_peer_pb_peer_record_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -70,7 +70,7 @@ func (x *PeerRecord) ProtoReflect() protoreflect.Message {
// Deprecated: Use PeerRecord.ProtoReflect.Descriptor instead.
func (*PeerRecord) Descriptor() ([]byte, []int) {
return file_pb_peer_record_proto_rawDescGZIP(), []int{0}
return file_core_peer_pb_peer_record_proto_rawDescGZIP(), []int{0}
}
func (x *PeerRecord) GetPeerId() []byte {
@@ -107,7 +107,7 @@ type PeerRecord_AddressInfo struct {
func (x *PeerRecord_AddressInfo) Reset() {
*x = PeerRecord_AddressInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_peer_record_proto_msgTypes[1]
mi := &file_core_peer_pb_peer_record_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -120,7 +120,7 @@ func (x *PeerRecord_AddressInfo) String() string {
func (*PeerRecord_AddressInfo) ProtoMessage() {}
func (x *PeerRecord_AddressInfo) ProtoReflect() protoreflect.Message {
mi := &file_pb_peer_record_proto_msgTypes[1]
mi := &file_core_peer_pb_peer_record_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -133,7 +133,7 @@ func (x *PeerRecord_AddressInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use PeerRecord_AddressInfo.ProtoReflect.Descriptor instead.
func (*PeerRecord_AddressInfo) Descriptor() ([]byte, []int) {
return file_pb_peer_record_proto_rawDescGZIP(), []int{0, 0}
return file_core_peer_pb_peer_record_proto_rawDescGZIP(), []int{0, 0}
}
func (x *PeerRecord_AddressInfo) GetMultiaddr() []byte {
@@ -143,42 +143,46 @@ func (x *PeerRecord_AddressInfo) GetMultiaddr() []byte {
return nil
}
var File_pb_peer_record_proto protoreflect.FileDescriptor
var File_core_peer_pb_peer_record_proto protoreflect.FileDescriptor
var file_pb_peer_record_proto_rawDesc = []byte{
0x0a, 0x14, 0x70, 0x62, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x70, 0x65, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x22,
0xa3, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x17,
0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02,
0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x3d, 0x0a, 0x09, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70,
0x65, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x2b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69,
0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74,
0x69, 0x61, 0x64, 0x64, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_core_peer_pb_peer_record_proto_rawDesc = []byte{
0x0a, 0x1e, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x70,
0x65, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x07, 0x70, 0x65, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x22, 0xa3, 0x01, 0x0a, 0x0a, 0x50, 0x65,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72,
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03,
0x73, 0x65, 0x71, 0x12, 0x3d, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x65, 0x65, 0x72, 0x2e, 0x70, 0x62,
0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x65, 0x73, 0x1a, 0x2b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x64, 0x64, 0x72, 0x42,
0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69,
0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x63,
0x6f, 0x72, 0x65, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_pb_peer_record_proto_rawDescOnce sync.Once
file_pb_peer_record_proto_rawDescData = file_pb_peer_record_proto_rawDesc
file_core_peer_pb_peer_record_proto_rawDescOnce sync.Once
file_core_peer_pb_peer_record_proto_rawDescData = file_core_peer_pb_peer_record_proto_rawDesc
)
func file_pb_peer_record_proto_rawDescGZIP() []byte {
file_pb_peer_record_proto_rawDescOnce.Do(func() {
file_pb_peer_record_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_peer_record_proto_rawDescData)
func file_core_peer_pb_peer_record_proto_rawDescGZIP() []byte {
file_core_peer_pb_peer_record_proto_rawDescOnce.Do(func() {
file_core_peer_pb_peer_record_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_peer_pb_peer_record_proto_rawDescData)
})
return file_pb_peer_record_proto_rawDescData
return file_core_peer_pb_peer_record_proto_rawDescData
}
var file_pb_peer_record_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_pb_peer_record_proto_goTypes = []any{
var file_core_peer_pb_peer_record_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_core_peer_pb_peer_record_proto_goTypes = []any{
(*PeerRecord)(nil), // 0: peer.pb.PeerRecord
(*PeerRecord_AddressInfo)(nil), // 1: peer.pb.PeerRecord.AddressInfo
}
var file_pb_peer_record_proto_depIdxs = []int32{
var file_core_peer_pb_peer_record_proto_depIdxs = []int32{
1, // 0: peer.pb.PeerRecord.addresses:type_name -> peer.pb.PeerRecord.AddressInfo
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
@@ -187,13 +191,13 @@ var file_pb_peer_record_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pb_peer_record_proto_init() }
func file_pb_peer_record_proto_init() {
if File_pb_peer_record_proto != nil {
func init() { file_core_peer_pb_peer_record_proto_init() }
func file_core_peer_pb_peer_record_proto_init() {
if File_core_peer_pb_peer_record_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_peer_record_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_core_peer_pb_peer_record_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*PeerRecord); i {
case 0:
return &v.state
@@ -205,7 +209,7 @@ func file_pb_peer_record_proto_init() {
return nil
}
}
file_pb_peer_record_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_core_peer_pb_peer_record_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*PeerRecord_AddressInfo); i {
case 0:
return &v.state
@@ -222,18 +226,18 @@ func file_pb_peer_record_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_peer_record_proto_rawDesc,
RawDescriptor: file_core_peer_pb_peer_record_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_peer_record_proto_goTypes,
DependencyIndexes: file_pb_peer_record_proto_depIdxs,
MessageInfos: file_pb_peer_record_proto_msgTypes,
GoTypes: file_core_peer_pb_peer_record_proto_goTypes,
DependencyIndexes: file_core_peer_pb_peer_record_proto_depIdxs,
MessageInfos: file_core_peer_pb_peer_record_proto_msgTypes,
}.Build()
File_pb_peer_record_proto = out.File
file_pb_peer_record_proto_rawDesc = nil
file_pb_peer_record_proto_goTypes = nil
file_pb_peer_record_proto_depIdxs = nil
File_core_peer_pb_peer_record_proto = out.File
file_core_peer_pb_peer_record_proto_rawDesc = nil
file_core_peer_pb_peer_record_proto_goTypes = nil
file_core_peer_pb_peer_record_proto_depIdxs = nil
}

View File

@@ -2,6 +2,8 @@ syntax = "proto3";
package peer.pb;
option go_package = "github.com/libp2p/go-libp2p/core/peer/pb";
// PeerRecord messages contain information that is useful to share with other peers.
// Currently, a PeerRecord contains the public listen addresses for a peer, but this
// is expected to expand to include other information in the future.

View File

@@ -14,8 +14,6 @@ import (
"google.golang.org/protobuf/proto"
)
//go:generate protoc --proto_path=$PWD:$PWD/../.. --go_out=. --go_opt=Mpb/peer_record.proto=./pb pb/peer_record.proto
var _ record.Record = (*PeerRecord)(nil)
func init() {

View File

@@ -16,8 +16,6 @@ import (
"google.golang.org/protobuf/proto"
)
//go:generate protoc --proto_path=$PWD:$PWD/../.. --go_out=. --go_opt=Mpb/envelope.proto=./pb pb/envelope.proto
// Envelope contains an arbitrary []byte payload, signed by a libp2p peer.
//
// Envelopes are signed in the context of a particular "domain", which is a

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/envelope.proto
// protoc v5.27.3
// source: core/record/pb/envelope.proto
package pb
@@ -50,7 +50,7 @@ type Envelope struct {
func (x *Envelope) Reset() {
*x = Envelope{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_envelope_proto_msgTypes[0]
mi := &file_core_record_pb_envelope_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -63,7 +63,7 @@ func (x *Envelope) String() string {
func (*Envelope) ProtoMessage() {}
func (x *Envelope) ProtoReflect() protoreflect.Message {
mi := &file_pb_envelope_proto_msgTypes[0]
mi := &file_core_record_pb_envelope_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -76,7 +76,7 @@ func (x *Envelope) ProtoReflect() protoreflect.Message {
// Deprecated: Use Envelope.ProtoReflect.Descriptor instead.
func (*Envelope) Descriptor() ([]byte, []int) {
return file_pb_envelope_proto_rawDescGZIP(), []int{0}
return file_core_record_pb_envelope_proto_rawDescGZIP(), []int{0}
}
func (x *Envelope) GetPublicKey() *pb.PublicKey {
@@ -107,43 +107,47 @@ func (x *Envelope) GetSignature() []byte {
return nil
}
var File_pb_envelope_proto protoreflect.FileDescriptor
var File_core_record_pb_envelope_proto protoreflect.FileDescriptor
var file_pb_envelope_proto_rawDesc = []byte{
0x0a, 0x11, 0x70, 0x62, 0x2f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x09, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x62, 0x1a, 0x1b,
0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x63,
0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x08,
0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c,
0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63,
0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b,
0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a,
0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_core_record_pb_envelope_proto_rawDesc = []byte{
0x0a, 0x1d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x70, 0x62,
0x2f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x09, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x62, 0x1a, 0x1b, 0x63, 0x6f, 0x72, 0x65,
0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74,
0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x65,
0x6c, 0x6f, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74,
0x6f, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x09,
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79,
0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
0x74, 0x75, 0x72, 0x65, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62,
0x70, 0x32, 0x70, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pb_envelope_proto_rawDescOnce sync.Once
file_pb_envelope_proto_rawDescData = file_pb_envelope_proto_rawDesc
file_core_record_pb_envelope_proto_rawDescOnce sync.Once
file_core_record_pb_envelope_proto_rawDescData = file_core_record_pb_envelope_proto_rawDesc
)
func file_pb_envelope_proto_rawDescGZIP() []byte {
file_pb_envelope_proto_rawDescOnce.Do(func() {
file_pb_envelope_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_envelope_proto_rawDescData)
func file_core_record_pb_envelope_proto_rawDescGZIP() []byte {
file_core_record_pb_envelope_proto_rawDescOnce.Do(func() {
file_core_record_pb_envelope_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_record_pb_envelope_proto_rawDescData)
})
return file_pb_envelope_proto_rawDescData
return file_core_record_pb_envelope_proto_rawDescData
}
var file_pb_envelope_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_pb_envelope_proto_goTypes = []any{
var file_core_record_pb_envelope_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_core_record_pb_envelope_proto_goTypes = []any{
(*Envelope)(nil), // 0: record.pb.Envelope
(*pb.PublicKey)(nil), // 1: crypto.pb.PublicKey
}
var file_pb_envelope_proto_depIdxs = []int32{
var file_core_record_pb_envelope_proto_depIdxs = []int32{
1, // 0: record.pb.Envelope.public_key:type_name -> crypto.pb.PublicKey
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
@@ -152,13 +156,13 @@ var file_pb_envelope_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pb_envelope_proto_init() }
func file_pb_envelope_proto_init() {
if File_pb_envelope_proto != nil {
func init() { file_core_record_pb_envelope_proto_init() }
func file_core_record_pb_envelope_proto_init() {
if File_core_record_pb_envelope_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_envelope_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_core_record_pb_envelope_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Envelope); i {
case 0:
return &v.state
@@ -175,18 +179,18 @@ func file_pb_envelope_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_envelope_proto_rawDesc,
RawDescriptor: file_core_record_pb_envelope_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_envelope_proto_goTypes,
DependencyIndexes: file_pb_envelope_proto_depIdxs,
MessageInfos: file_pb_envelope_proto_msgTypes,
GoTypes: file_core_record_pb_envelope_proto_goTypes,
DependencyIndexes: file_core_record_pb_envelope_proto_depIdxs,
MessageInfos: file_core_record_pb_envelope_proto_msgTypes,
}.Build()
File_pb_envelope_proto = out.File
file_pb_envelope_proto_rawDesc = nil
file_pb_envelope_proto_goTypes = nil
file_pb_envelope_proto_depIdxs = nil
File_core_record_pb_envelope_proto = out.File
file_core_record_pb_envelope_proto_rawDesc = nil
file_core_record_pb_envelope_proto_goTypes = nil
file_core_record_pb_envelope_proto_depIdxs = nil
}

View File

@@ -4,6 +4,8 @@ package record.pb;
import "core/crypto/pb/crypto.proto";
option go_package = "github.com/libp2p/go-libp2p/core/record/pb";
// Envelope encloses a signed payload produced by a peer, along with the public
// key of the keypair it was signed with so that it can be statelessly validated
// by the receiver.

View File

@@ -21,8 +21,6 @@ import (
"google.golang.org/protobuf/proto"
)
//go:generate protoc --proto_path=$PWD:$PWD/../../.. --go_out=. --go_opt=Mpb/plaintext.proto=./pb pb/plaintext.proto
// ID is the multistream-select protocol ID that should be used when identifying
// this security transport.
const ID = "/plaintext/2.0.0"

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/plaintext.proto
// protoc v5.27.3
// source: core/sec/insecure/pb/plaintext.proto
package pb
@@ -33,7 +33,7 @@ type Exchange struct {
func (x *Exchange) Reset() {
*x = Exchange{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_plaintext_proto_msgTypes[0]
mi := &file_core_sec_insecure_pb_plaintext_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -46,7 +46,7 @@ func (x *Exchange) String() string {
func (*Exchange) ProtoMessage() {}
func (x *Exchange) ProtoReflect() protoreflect.Message {
mi := &file_pb_plaintext_proto_msgTypes[0]
mi := &file_core_sec_insecure_pb_plaintext_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -59,7 +59,7 @@ func (x *Exchange) ProtoReflect() protoreflect.Message {
// Deprecated: Use Exchange.ProtoReflect.Descriptor instead.
func (*Exchange) Descriptor() ([]byte, []int) {
return file_pb_plaintext_proto_rawDescGZIP(), []int{0}
return file_core_sec_insecure_pb_plaintext_proto_rawDescGZIP(), []int{0}
}
func (x *Exchange) GetId() []byte {
@@ -76,38 +76,42 @@ func (x *Exchange) GetPubkey() *pb.PublicKey {
return nil
}
var File_pb_plaintext_proto protoreflect.FileDescriptor
var File_core_sec_insecure_pb_plaintext_proto protoreflect.FileDescriptor
var file_pb_plaintext_proto_rawDesc = []byte{
0x0a, 0x12, 0x70, 0x62, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e,
0x70, 0x62, 0x1a, 0x1b, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f,
0x70, 0x62, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x48, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x70,
0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x72,
0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79,
var file_core_sec_insecure_pb_plaintext_proto_rawDesc = []byte{
0x0a, 0x24, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x63, 0x2f, 0x69, 0x6e, 0x73, 0x65, 0x63,
0x75, 0x72, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78,
0x74, 0x2e, 0x70, 0x62, 0x1a, 0x1b, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74,
0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x48, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a,
0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x42, 0x32, 0x5a, 0x30, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70,
0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
0x73, 0x65, 0x63, 0x2f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x2f, 0x70, 0x62,
}
var (
file_pb_plaintext_proto_rawDescOnce sync.Once
file_pb_plaintext_proto_rawDescData = file_pb_plaintext_proto_rawDesc
file_core_sec_insecure_pb_plaintext_proto_rawDescOnce sync.Once
file_core_sec_insecure_pb_plaintext_proto_rawDescData = file_core_sec_insecure_pb_plaintext_proto_rawDesc
)
func file_pb_plaintext_proto_rawDescGZIP() []byte {
file_pb_plaintext_proto_rawDescOnce.Do(func() {
file_pb_plaintext_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_plaintext_proto_rawDescData)
func file_core_sec_insecure_pb_plaintext_proto_rawDescGZIP() []byte {
file_core_sec_insecure_pb_plaintext_proto_rawDescOnce.Do(func() {
file_core_sec_insecure_pb_plaintext_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_sec_insecure_pb_plaintext_proto_rawDescData)
})
return file_pb_plaintext_proto_rawDescData
return file_core_sec_insecure_pb_plaintext_proto_rawDescData
}
var file_pb_plaintext_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_pb_plaintext_proto_goTypes = []any{
var file_core_sec_insecure_pb_plaintext_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_core_sec_insecure_pb_plaintext_proto_goTypes = []any{
(*Exchange)(nil), // 0: plaintext.pb.Exchange
(*pb.PublicKey)(nil), // 1: crypto.pb.PublicKey
}
var file_pb_plaintext_proto_depIdxs = []int32{
var file_core_sec_insecure_pb_plaintext_proto_depIdxs = []int32{
1, // 0: plaintext.pb.Exchange.pubkey:type_name -> crypto.pb.PublicKey
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
@@ -116,13 +120,13 @@ var file_pb_plaintext_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pb_plaintext_proto_init() }
func file_pb_plaintext_proto_init() {
if File_pb_plaintext_proto != nil {
func init() { file_core_sec_insecure_pb_plaintext_proto_init() }
func file_core_sec_insecure_pb_plaintext_proto_init() {
if File_core_sec_insecure_pb_plaintext_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_plaintext_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_core_sec_insecure_pb_plaintext_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Exchange); i {
case 0:
return &v.state
@@ -139,18 +143,18 @@ func file_pb_plaintext_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_plaintext_proto_rawDesc,
RawDescriptor: file_core_sec_insecure_pb_plaintext_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_plaintext_proto_goTypes,
DependencyIndexes: file_pb_plaintext_proto_depIdxs,
MessageInfos: file_pb_plaintext_proto_msgTypes,
GoTypes: file_core_sec_insecure_pb_plaintext_proto_goTypes,
DependencyIndexes: file_core_sec_insecure_pb_plaintext_proto_depIdxs,
MessageInfos: file_core_sec_insecure_pb_plaintext_proto_msgTypes,
}.Build()
File_pb_plaintext_proto = out.File
file_pb_plaintext_proto_rawDesc = nil
file_pb_plaintext_proto_goTypes = nil
file_pb_plaintext_proto_depIdxs = nil
File_core_sec_insecure_pb_plaintext_proto = out.File
file_core_sec_insecure_pb_plaintext_proto_rawDesc = nil
file_core_sec_insecure_pb_plaintext_proto_goTypes = nil
file_core_sec_insecure_pb_plaintext_proto_depIdxs = nil
}

View File

@@ -4,6 +4,8 @@ package plaintext.pb;
import "core/crypto/pb/crypto.proto";
option go_package = "github.com/libp2p/go-libp2p/core/sec/insecure/pb";
message Exchange {
optional bytes id = 1;
optional crypto.pb.PublicKey pubkey = 2;

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/autonat.proto
// protoc v5.27.3
// source: p2p/host/autonat/pb/autonat.proto
package pb
@@ -50,11 +50,11 @@ func (x Message_MessageType) String() string {
}
func (Message_MessageType) Descriptor() protoreflect.EnumDescriptor {
return file_pb_autonat_proto_enumTypes[0].Descriptor()
return file_p2p_host_autonat_pb_autonat_proto_enumTypes[0].Descriptor()
}
func (Message_MessageType) Type() protoreflect.EnumType {
return &file_pb_autonat_proto_enumTypes[0]
return &file_p2p_host_autonat_pb_autonat_proto_enumTypes[0]
}
func (x Message_MessageType) Number() protoreflect.EnumNumber {
@@ -73,7 +73,7 @@ func (x *Message_MessageType) UnmarshalJSON(b []byte) error {
// Deprecated: Use Message_MessageType.Descriptor instead.
func (Message_MessageType) EnumDescriptor() ([]byte, []int) {
return file_pb_autonat_proto_rawDescGZIP(), []int{0, 0}
return file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP(), []int{0, 0}
}
type Message_ResponseStatus int32
@@ -115,11 +115,11 @@ func (x Message_ResponseStatus) String() string {
}
func (Message_ResponseStatus) Descriptor() protoreflect.EnumDescriptor {
return file_pb_autonat_proto_enumTypes[1].Descriptor()
return file_p2p_host_autonat_pb_autonat_proto_enumTypes[1].Descriptor()
}
func (Message_ResponseStatus) Type() protoreflect.EnumType {
return &file_pb_autonat_proto_enumTypes[1]
return &file_p2p_host_autonat_pb_autonat_proto_enumTypes[1]
}
func (x Message_ResponseStatus) Number() protoreflect.EnumNumber {
@@ -138,7 +138,7 @@ func (x *Message_ResponseStatus) UnmarshalJSON(b []byte) error {
// Deprecated: Use Message_ResponseStatus.Descriptor instead.
func (Message_ResponseStatus) EnumDescriptor() ([]byte, []int) {
return file_pb_autonat_proto_rawDescGZIP(), []int{0, 1}
return file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP(), []int{0, 1}
}
type Message struct {
@@ -154,7 +154,7 @@ type Message struct {
func (x *Message) Reset() {
*x = Message{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonat_proto_msgTypes[0]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -167,7 +167,7 @@ func (x *Message) String() string {
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonat_proto_msgTypes[0]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -180,7 +180,7 @@ func (x *Message) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_pb_autonat_proto_rawDescGZIP(), []int{0}
return file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP(), []int{0}
}
func (x *Message) GetType() Message_MessageType {
@@ -216,7 +216,7 @@ type Message_PeerInfo struct {
func (x *Message_PeerInfo) Reset() {
*x = Message_PeerInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonat_proto_msgTypes[1]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -229,7 +229,7 @@ func (x *Message_PeerInfo) String() string {
func (*Message_PeerInfo) ProtoMessage() {}
func (x *Message_PeerInfo) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonat_proto_msgTypes[1]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -242,7 +242,7 @@ func (x *Message_PeerInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message_PeerInfo.ProtoReflect.Descriptor instead.
func (*Message_PeerInfo) Descriptor() ([]byte, []int) {
return file_pb_autonat_proto_rawDescGZIP(), []int{0, 0}
return file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP(), []int{0, 0}
}
func (x *Message_PeerInfo) GetId() []byte {
@@ -270,7 +270,7 @@ type Message_Dial struct {
func (x *Message_Dial) Reset() {
*x = Message_Dial{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonat_proto_msgTypes[2]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -283,7 +283,7 @@ func (x *Message_Dial) String() string {
func (*Message_Dial) ProtoMessage() {}
func (x *Message_Dial) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonat_proto_msgTypes[2]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -296,7 +296,7 @@ func (x *Message_Dial) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message_Dial.ProtoReflect.Descriptor instead.
func (*Message_Dial) Descriptor() ([]byte, []int) {
return file_pb_autonat_proto_rawDescGZIP(), []int{0, 1}
return file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP(), []int{0, 1}
}
func (x *Message_Dial) GetPeer() *Message_PeerInfo {
@@ -319,7 +319,7 @@ type Message_DialResponse struct {
func (x *Message_DialResponse) Reset() {
*x = Message_DialResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonat_proto_msgTypes[3]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -332,7 +332,7 @@ func (x *Message_DialResponse) String() string {
func (*Message_DialResponse) ProtoMessage() {}
func (x *Message_DialResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonat_proto_msgTypes[3]
mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -345,7 +345,7 @@ func (x *Message_DialResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message_DialResponse.ProtoReflect.Descriptor instead.
func (*Message_DialResponse) Descriptor() ([]byte, []int) {
return file_pb_autonat_proto_rawDescGZIP(), []int{0, 2}
return file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP(), []int{0, 2}
}
func (x *Message_DialResponse) GetStatus() Message_ResponseStatus {
@@ -369,64 +369,68 @@ func (x *Message_DialResponse) GetAddr() []byte {
return nil
}
var File_pb_autonat_proto protoreflect.FileDescriptor
var File_p2p_host_autonat_pb_autonat_proto protoreflect.FileDescriptor
var file_pb_autonat_proto_rawDesc = []byte{
0x0a, 0x10, 0x70, 0x62, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x22, 0xb5,
0x04, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e,
0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x2c, 0x0a, 0x04, 0x64, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x04, 0x64, 0x69, 0x61, 0x6c, 0x12, 0x44, 0x0a,
0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62,
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x1a, 0x30, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 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, 0x1a, 0x38, 0x0a, 0x04, 0x44, 0x69, 0x61, 0x6c, 0x12, 0x30, 0x0a,
0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x75,
0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x1a,
0x7e, 0x0a, 0x0c, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x22, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61,
0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x22,
0x2a, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08,
0x0a, 0x04, 0x44, 0x49, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x49, 0x41, 0x4c,
0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x01, 0x22, 0x69, 0x0a, 0x0e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a,
0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x5f, 0x44, 0x49, 0x41, 0x4c, 0x5f,
0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x5f, 0x44, 0x49, 0x41,
0x4c, 0x5f, 0x52, 0x45, 0x46, 0x55, 0x53, 0x45, 0x44, 0x10, 0x65, 0x12, 0x12, 0x0a, 0x0d, 0x45,
0x5f, 0x42, 0x41, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0xc8, 0x01, 0x12,
0x15, 0x0a, 0x10, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52,
0x52, 0x4f, 0x52, 0x10, 0xac, 0x02,
var file_p2p_host_autonat_pb_autonat_proto_rawDesc = []byte{
0x0a, 0x21, 0x70, 0x32, 0x70, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6e,
0x61, 0x74, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x22,
0xb5, 0x04, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x6f,
0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x2c, 0x0a, 0x04, 0x64, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x04, 0x64, 0x69, 0x61, 0x6c, 0x12, 0x44,
0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70,
0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x30, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 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, 0x1a, 0x38, 0x0a, 0x04, 0x44, 0x69, 0x61, 0x6c, 0x12, 0x30,
0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61,
0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72,
0x1a, 0x7e, 0x0a, 0x0c, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72,
0x22, 0x2a, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
0x08, 0x0a, 0x04, 0x44, 0x49, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x49, 0x41,
0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x01, 0x22, 0x69, 0x0a, 0x0e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06,
0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x5f, 0x44, 0x49, 0x41, 0x4c,
0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x5f, 0x44, 0x49,
0x41, 0x4c, 0x5f, 0x52, 0x45, 0x46, 0x55, 0x53, 0x45, 0x44, 0x10, 0x65, 0x12, 0x12, 0x0a, 0x0d,
0x45, 0x5f, 0x42, 0x41, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0xc8, 0x01,
0x12, 0x15, 0x0a, 0x10, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45,
0x52, 0x52, 0x4f, 0x52, 0x10, 0xac, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d,
0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f,
0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x2f, 0x70, 0x62,
}
var (
file_pb_autonat_proto_rawDescOnce sync.Once
file_pb_autonat_proto_rawDescData = file_pb_autonat_proto_rawDesc
file_p2p_host_autonat_pb_autonat_proto_rawDescOnce sync.Once
file_p2p_host_autonat_pb_autonat_proto_rawDescData = file_p2p_host_autonat_pb_autonat_proto_rawDesc
)
func file_pb_autonat_proto_rawDescGZIP() []byte {
file_pb_autonat_proto_rawDescOnce.Do(func() {
file_pb_autonat_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_autonat_proto_rawDescData)
func file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP() []byte {
file_p2p_host_autonat_pb_autonat_proto_rawDescOnce.Do(func() {
file_p2p_host_autonat_pb_autonat_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_host_autonat_pb_autonat_proto_rawDescData)
})
return file_pb_autonat_proto_rawDescData
return file_p2p_host_autonat_pb_autonat_proto_rawDescData
}
var file_pb_autonat_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_pb_autonat_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_pb_autonat_proto_goTypes = []any{
var file_p2p_host_autonat_pb_autonat_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_p2p_host_autonat_pb_autonat_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_p2p_host_autonat_pb_autonat_proto_goTypes = []any{
(Message_MessageType)(0), // 0: autonat.pb.Message.MessageType
(Message_ResponseStatus)(0), // 1: autonat.pb.Message.ResponseStatus
(*Message)(nil), // 2: autonat.pb.Message
@@ -434,7 +438,7 @@ var file_pb_autonat_proto_goTypes = []any{
(*Message_Dial)(nil), // 4: autonat.pb.Message.Dial
(*Message_DialResponse)(nil), // 5: autonat.pb.Message.DialResponse
}
var file_pb_autonat_proto_depIdxs = []int32{
var file_p2p_host_autonat_pb_autonat_proto_depIdxs = []int32{
0, // 0: autonat.pb.Message.type:type_name -> autonat.pb.Message.MessageType
4, // 1: autonat.pb.Message.dial:type_name -> autonat.pb.Message.Dial
5, // 2: autonat.pb.Message.dialResponse:type_name -> autonat.pb.Message.DialResponse
@@ -447,13 +451,13 @@ var file_pb_autonat_proto_depIdxs = []int32{
0, // [0:5] is the sub-list for field type_name
}
func init() { file_pb_autonat_proto_init() }
func file_pb_autonat_proto_init() {
if File_pb_autonat_proto != nil {
func init() { file_p2p_host_autonat_pb_autonat_proto_init() }
func file_p2p_host_autonat_pb_autonat_proto_init() {
if File_p2p_host_autonat_pb_autonat_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_autonat_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_host_autonat_pb_autonat_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Message); i {
case 0:
return &v.state
@@ -465,7 +469,7 @@ func file_pb_autonat_proto_init() {
return nil
}
}
file_pb_autonat_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_p2p_host_autonat_pb_autonat_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*Message_PeerInfo); i {
case 0:
return &v.state
@@ -477,7 +481,7 @@ func file_pb_autonat_proto_init() {
return nil
}
}
file_pb_autonat_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_p2p_host_autonat_pb_autonat_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*Message_Dial); i {
case 0:
return &v.state
@@ -489,7 +493,7 @@ func file_pb_autonat_proto_init() {
return nil
}
}
file_pb_autonat_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_p2p_host_autonat_pb_autonat_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*Message_DialResponse); i {
case 0:
return &v.state
@@ -506,19 +510,19 @@ func file_pb_autonat_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_autonat_proto_rawDesc,
RawDescriptor: file_p2p_host_autonat_pb_autonat_proto_rawDesc,
NumEnums: 2,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_autonat_proto_goTypes,
DependencyIndexes: file_pb_autonat_proto_depIdxs,
EnumInfos: file_pb_autonat_proto_enumTypes,
MessageInfos: file_pb_autonat_proto_msgTypes,
GoTypes: file_p2p_host_autonat_pb_autonat_proto_goTypes,
DependencyIndexes: file_p2p_host_autonat_pb_autonat_proto_depIdxs,
EnumInfos: file_p2p_host_autonat_pb_autonat_proto_enumTypes,
MessageInfos: file_p2p_host_autonat_pb_autonat_proto_msgTypes,
}.Build()
File_pb_autonat_proto = out.File
file_pb_autonat_proto_rawDesc = nil
file_pb_autonat_proto_goTypes = nil
file_pb_autonat_proto_depIdxs = nil
File_p2p_host_autonat_pb_autonat_proto = out.File
file_p2p_host_autonat_pb_autonat_proto_rawDesc = nil
file_p2p_host_autonat_pb_autonat_proto_goTypes = nil
file_p2p_host_autonat_pb_autonat_proto_depIdxs = nil
}

View File

@@ -2,6 +2,8 @@ syntax = "proto2";
package autonat.pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/host/autonat/pb";
message Message {
enum MessageType {
DIAL = 0;

View File

@@ -7,8 +7,6 @@ import (
ma "github.com/multiformats/go-multiaddr"
)
//go:generate protoc --proto_path=$PWD:$PWD/../../.. --go_out=. --go_opt=Mpb/autonat.proto=./pb pb/autonat.proto
// AutoNATProto identifies the autonat service protocol
const AutoNATProto = "/libp2p/autonat/1.0.0"

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/pstore.proto
// protoc v5.27.3
// source: p2p/host/peerstore/pstoreds/pb/pstore.proto
package pb
@@ -37,7 +37,7 @@ type AddrBookRecord struct {
func (x *AddrBookRecord) Reset() {
*x = AddrBookRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_pstore_proto_msgTypes[0]
mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -50,7 +50,7 @@ func (x *AddrBookRecord) String() string {
func (*AddrBookRecord) ProtoMessage() {}
func (x *AddrBookRecord) ProtoReflect() protoreflect.Message {
mi := &file_pb_pstore_proto_msgTypes[0]
mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -63,7 +63,7 @@ func (x *AddrBookRecord) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddrBookRecord.ProtoReflect.Descriptor instead.
func (*AddrBookRecord) Descriptor() ([]byte, []int) {
return file_pb_pstore_proto_rawDescGZIP(), []int{0}
return file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescGZIP(), []int{0}
}
func (x *AddrBookRecord) GetId() []byte {
@@ -103,7 +103,7 @@ type AddrBookRecord_AddrEntry struct {
func (x *AddrBookRecord_AddrEntry) Reset() {
*x = AddrBookRecord_AddrEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_pstore_proto_msgTypes[1]
mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -116,7 +116,7 @@ func (x *AddrBookRecord_AddrEntry) String() string {
func (*AddrBookRecord_AddrEntry) ProtoMessage() {}
func (x *AddrBookRecord_AddrEntry) ProtoReflect() protoreflect.Message {
mi := &file_pb_pstore_proto_msgTypes[1]
mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -129,7 +129,7 @@ func (x *AddrBookRecord_AddrEntry) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddrBookRecord_AddrEntry.ProtoReflect.Descriptor instead.
func (*AddrBookRecord_AddrEntry) Descriptor() ([]byte, []int) {
return file_pb_pstore_proto_rawDescGZIP(), []int{0, 0}
return file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescGZIP(), []int{0, 0}
}
func (x *AddrBookRecord_AddrEntry) GetAddr() []byte {
@@ -169,7 +169,7 @@ type AddrBookRecord_CertifiedRecord struct {
func (x *AddrBookRecord_CertifiedRecord) Reset() {
*x = AddrBookRecord_CertifiedRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_pstore_proto_msgTypes[2]
mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -182,7 +182,7 @@ func (x *AddrBookRecord_CertifiedRecord) String() string {
func (*AddrBookRecord_CertifiedRecord) ProtoMessage() {}
func (x *AddrBookRecord_CertifiedRecord) ProtoReflect() protoreflect.Message {
mi := &file_pb_pstore_proto_msgTypes[2]
mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -195,7 +195,7 @@ func (x *AddrBookRecord_CertifiedRecord) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddrBookRecord_CertifiedRecord.ProtoReflect.Descriptor instead.
func (*AddrBookRecord_CertifiedRecord) Descriptor() ([]byte, []int) {
return file_pb_pstore_proto_rawDescGZIP(), []int{0, 1}
return file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescGZIP(), []int{0, 1}
}
func (x *AddrBookRecord_CertifiedRecord) GetSeq() uint64 {
@@ -212,52 +212,58 @@ func (x *AddrBookRecord_CertifiedRecord) GetRaw() []byte {
return nil
}
var File_pb_pstore_proto protoreflect.FileDescriptor
var File_p2p_host_peerstore_pstoreds_pb_pstore_proto protoreflect.FileDescriptor
var file_pb_pstore_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x62, 0x2f, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x09, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x62, 0x22, 0xb3, 0x02, 0x0a,
0x0e, 0x41, 0x64, 0x64, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12,
0x39, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23,
0x2e, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x42,
0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x10, 0x63, 0x65,
0x72, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x62,
0x2e, 0x41, 0x64, 0x64, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e,
0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x1a, 0x49, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a,
0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x64, 0x64,
0x72, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x1a, 0x35, 0x0a, 0x0f, 0x43,
0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71,
0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x72,
0x61, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDesc = []byte{
0x0a, 0x2b, 0x70, 0x32, 0x70, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x73, 0x2f, 0x70, 0x62,
0x2f, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x70,
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x62, 0x22, 0xb3, 0x02, 0x0a, 0x0e, 0x41, 0x64, 0x64,
0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x61,
0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x73, 0x74,
0x6f, 0x72, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x52,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
0x69, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x29, 0x2e, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64,
0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x43, 0x65, 0x72, 0x74,
0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0f, 0x63, 0x65, 0x72,
0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x1a, 0x49, 0x0a, 0x09,
0x41, 0x64, 0x64, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a,
0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65,
0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x1a, 0x35, 0x0a, 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69,
0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65,
0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
0x72, 0x61, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x42, 0x3c,
0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62,
0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x32,
0x70, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x65,
0x2f, 0x70, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x73, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pb_pstore_proto_rawDescOnce sync.Once
file_pb_pstore_proto_rawDescData = file_pb_pstore_proto_rawDesc
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescOnce sync.Once
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescData = file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDesc
)
func file_pb_pstore_proto_rawDescGZIP() []byte {
file_pb_pstore_proto_rawDescOnce.Do(func() {
file_pb_pstore_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_pstore_proto_rawDescData)
func file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescGZIP() []byte {
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescOnce.Do(func() {
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescData)
})
return file_pb_pstore_proto_rawDescData
return file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescData
}
var file_pb_pstore_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_pb_pstore_proto_goTypes = []any{
var file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_p2p_host_peerstore_pstoreds_pb_pstore_proto_goTypes = []any{
(*AddrBookRecord)(nil), // 0: pstore.pb.AddrBookRecord
(*AddrBookRecord_AddrEntry)(nil), // 1: pstore.pb.AddrBookRecord.AddrEntry
(*AddrBookRecord_CertifiedRecord)(nil), // 2: pstore.pb.AddrBookRecord.CertifiedRecord
}
var file_pb_pstore_proto_depIdxs = []int32{
var file_p2p_host_peerstore_pstoreds_pb_pstore_proto_depIdxs = []int32{
1, // 0: pstore.pb.AddrBookRecord.addrs:type_name -> pstore.pb.AddrBookRecord.AddrEntry
2, // 1: pstore.pb.AddrBookRecord.certified_record:type_name -> pstore.pb.AddrBookRecord.CertifiedRecord
2, // [2:2] is the sub-list for method output_type
@@ -267,13 +273,13 @@ var file_pb_pstore_proto_depIdxs = []int32{
0, // [0:2] is the sub-list for field type_name
}
func init() { file_pb_pstore_proto_init() }
func file_pb_pstore_proto_init() {
if File_pb_pstore_proto != nil {
func init() { file_p2p_host_peerstore_pstoreds_pb_pstore_proto_init() }
func file_p2p_host_peerstore_pstoreds_pb_pstore_proto_init() {
if File_p2p_host_peerstore_pstoreds_pb_pstore_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_pstore_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*AddrBookRecord); i {
case 0:
return &v.state
@@ -285,7 +291,7 @@ func file_pb_pstore_proto_init() {
return nil
}
}
file_pb_pstore_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*AddrBookRecord_AddrEntry); i {
case 0:
return &v.state
@@ -297,7 +303,7 @@ func file_pb_pstore_proto_init() {
return nil
}
}
file_pb_pstore_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*AddrBookRecord_CertifiedRecord); i {
case 0:
return &v.state
@@ -314,18 +320,18 @@ func file_pb_pstore_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_pstore_proto_rawDesc,
RawDescriptor: file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_pstore_proto_goTypes,
DependencyIndexes: file_pb_pstore_proto_depIdxs,
MessageInfos: file_pb_pstore_proto_msgTypes,
GoTypes: file_p2p_host_peerstore_pstoreds_pb_pstore_proto_goTypes,
DependencyIndexes: file_p2p_host_peerstore_pstoreds_pb_pstore_proto_depIdxs,
MessageInfos: file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes,
}.Build()
File_pb_pstore_proto = out.File
file_pb_pstore_proto_rawDesc = nil
file_pb_pstore_proto_goTypes = nil
file_pb_pstore_proto_depIdxs = nil
File_p2p_host_peerstore_pstoreds_pb_pstore_proto = out.File
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDesc = nil
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_goTypes = nil
file_p2p_host_peerstore_pstoreds_pb_pstore_proto_depIdxs = nil
}

View File

@@ -1,6 +1,8 @@
syntax = "proto3";
package pstore.pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds/pb";
// AddrBookRecord represents a record for a peer in the address book.
message AddrBookRecord {
// The peer ID.

View File

@@ -15,8 +15,6 @@ import (
"github.com/multiformats/go-base32"
)
//go:generate protoc --proto_path=$PWD:$PWD/../../../.. --go_out=. --go_opt=Mpb/pstore.proto=./pb pb/pstore.proto
// Configuration object for the peerstore.
type Options struct {
// The size of the in-memory cache. A value of 0 or lower disables the cache.

View File

@@ -19,8 +19,6 @@ import (
"golang.org/x/exp/slices"
)
//go:generate protoc --go_out=. --go_opt=Mpb/autonatv2.proto=./pb pb/autonatv2.proto
const (
ServiceName = "libp2p.autonatv2"
DialBackProtocol = "/libp2p/autonat/2/dial-back"

View File

@@ -15,8 +15,6 @@ import (
"golang.org/x/exp/rand"
)
//go:generate protoc --go_out=. --go_opt=Mpb/autonatv2.proto=./pb pb/autonatv2.proto
// client implements the client for making dial requests for AutoNAT v2. It verifies successful
// dials and provides an option to send data for dial requests.
type client struct {

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/autonatv2.proto
// protoc v5.27.3
// source: p2p/protocol/autonatv2/pb/autonatv2.proto
package pb
@@ -56,11 +56,11 @@ func (x DialStatus) String() string {
}
func (DialStatus) Descriptor() protoreflect.EnumDescriptor {
return file_pb_autonatv2_proto_enumTypes[0].Descriptor()
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes[0].Descriptor()
}
func (DialStatus) Type() protoreflect.EnumType {
return &file_pb_autonatv2_proto_enumTypes[0]
return &file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes[0]
}
func (x DialStatus) Number() protoreflect.EnumNumber {
@@ -69,7 +69,7 @@ func (x DialStatus) Number() protoreflect.EnumNumber {
// Deprecated: Use DialStatus.Descriptor instead.
func (DialStatus) EnumDescriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{0}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{0}
}
type DialResponse_ResponseStatus int32
@@ -108,11 +108,11 @@ func (x DialResponse_ResponseStatus) String() string {
}
func (DialResponse_ResponseStatus) Descriptor() protoreflect.EnumDescriptor {
return file_pb_autonatv2_proto_enumTypes[1].Descriptor()
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes[1].Descriptor()
}
func (DialResponse_ResponseStatus) Type() protoreflect.EnumType {
return &file_pb_autonatv2_proto_enumTypes[1]
return &file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes[1]
}
func (x DialResponse_ResponseStatus) Number() protoreflect.EnumNumber {
@@ -121,7 +121,7 @@ func (x DialResponse_ResponseStatus) Number() protoreflect.EnumNumber {
// Deprecated: Use DialResponse_ResponseStatus.Descriptor instead.
func (DialResponse_ResponseStatus) EnumDescriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{3, 0}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{3, 0}
}
type DialBackResponse_DialBackStatus int32
@@ -151,11 +151,11 @@ func (x DialBackResponse_DialBackStatus) String() string {
}
func (DialBackResponse_DialBackStatus) Descriptor() protoreflect.EnumDescriptor {
return file_pb_autonatv2_proto_enumTypes[2].Descriptor()
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes[2].Descriptor()
}
func (DialBackResponse_DialBackStatus) Type() protoreflect.EnumType {
return &file_pb_autonatv2_proto_enumTypes[2]
return &file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes[2]
}
func (x DialBackResponse_DialBackStatus) Number() protoreflect.EnumNumber {
@@ -164,7 +164,7 @@ func (x DialBackResponse_DialBackStatus) Number() protoreflect.EnumNumber {
// Deprecated: Use DialBackResponse_DialBackStatus.Descriptor instead.
func (DialBackResponse_DialBackStatus) EnumDescriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{6, 0}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{6, 0}
}
type Message struct {
@@ -184,7 +184,7 @@ type Message struct {
func (x *Message) Reset() {
*x = Message{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonatv2_proto_msgTypes[0]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -197,7 +197,7 @@ func (x *Message) String() string {
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonatv2_proto_msgTypes[0]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -210,7 +210,7 @@ func (x *Message) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{0}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{0}
}
func (m *Message) GetMsg() isMessage_Msg {
@@ -288,7 +288,7 @@ type DialRequest struct {
func (x *DialRequest) Reset() {
*x = DialRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonatv2_proto_msgTypes[1]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -301,7 +301,7 @@ func (x *DialRequest) String() string {
func (*DialRequest) ProtoMessage() {}
func (x *DialRequest) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonatv2_proto_msgTypes[1]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -314,7 +314,7 @@ func (x *DialRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DialRequest.ProtoReflect.Descriptor instead.
func (*DialRequest) Descriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{1}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{1}
}
func (x *DialRequest) GetAddrs() [][]byte {
@@ -343,7 +343,7 @@ type DialDataRequest struct {
func (x *DialDataRequest) Reset() {
*x = DialDataRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonatv2_proto_msgTypes[2]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -356,7 +356,7 @@ func (x *DialDataRequest) String() string {
func (*DialDataRequest) ProtoMessage() {}
func (x *DialDataRequest) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonatv2_proto_msgTypes[2]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -369,7 +369,7 @@ func (x *DialDataRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DialDataRequest.ProtoReflect.Descriptor instead.
func (*DialDataRequest) Descriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{2}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{2}
}
func (x *DialDataRequest) GetAddrIdx() uint32 {
@@ -399,7 +399,7 @@ type DialResponse struct {
func (x *DialResponse) Reset() {
*x = DialResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonatv2_proto_msgTypes[3]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -412,7 +412,7 @@ func (x *DialResponse) String() string {
func (*DialResponse) ProtoMessage() {}
func (x *DialResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonatv2_proto_msgTypes[3]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -425,7 +425,7 @@ func (x *DialResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DialResponse.ProtoReflect.Descriptor instead.
func (*DialResponse) Descriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{3}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{3}
}
func (x *DialResponse) GetStatus() DialResponse_ResponseStatus {
@@ -460,7 +460,7 @@ type DialDataResponse struct {
func (x *DialDataResponse) Reset() {
*x = DialDataResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonatv2_proto_msgTypes[4]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -473,7 +473,7 @@ func (x *DialDataResponse) String() string {
func (*DialDataResponse) ProtoMessage() {}
func (x *DialDataResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonatv2_proto_msgTypes[4]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -486,7 +486,7 @@ func (x *DialDataResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DialDataResponse.ProtoReflect.Descriptor instead.
func (*DialDataResponse) Descriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{4}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{4}
}
func (x *DialDataResponse) GetData() []byte {
@@ -507,7 +507,7 @@ type DialBack struct {
func (x *DialBack) Reset() {
*x = DialBack{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonatv2_proto_msgTypes[5]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -520,7 +520,7 @@ func (x *DialBack) String() string {
func (*DialBack) ProtoMessage() {}
func (x *DialBack) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonatv2_proto_msgTypes[5]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -533,7 +533,7 @@ func (x *DialBack) ProtoReflect() protoreflect.Message {
// Deprecated: Use DialBack.ProtoReflect.Descriptor instead.
func (*DialBack) Descriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{5}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{5}
}
func (x *DialBack) GetNonce() uint64 {
@@ -554,7 +554,7 @@ type DialBackResponse struct {
func (x *DialBackResponse) Reset() {
*x = DialBackResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_autonatv2_proto_msgTypes[6]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -567,7 +567,7 @@ func (x *DialBackResponse) String() string {
func (*DialBackResponse) ProtoMessage() {}
func (x *DialBackResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_autonatv2_proto_msgTypes[6]
mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -580,7 +580,7 @@ func (x *DialBackResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DialBackResponse.ProtoReflect.Descriptor instead.
func (*DialBackResponse) Descriptor() ([]byte, []int) {
return file_pb_autonatv2_proto_rawDescGZIP(), []int{6}
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP(), []int{6}
}
func (x *DialBackResponse) GetStatus() DialBackResponse_DialBackStatus {
@@ -590,89 +590,94 @@ func (x *DialBackResponse) GetStatus() DialBackResponse_DialBackStatus {
return DialBackResponse_OK
}
var File_pb_autonatv2_proto protoreflect.FileDescriptor
var File_p2p_protocol_autonatv2_pb_autonatv2_proto protoreflect.FileDescriptor
var file_pb_autonatv2_proto_rawDesc = []byte{
0x0a, 0x12, 0x70, 0x62, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e,
0x70, 0x62, 0x22, 0xaa, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3d,
0x0a, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e,
0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a,
0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e,
0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48,
0x00, 0x52, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x49, 0x0a, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e,
0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x44,
0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x10, 0x64, 0x69,
0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32,
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x10, 0x64, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x22,
0x39, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14,
0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x61,
0x64, 0x64, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x06, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x47, 0x0a, 0x0f, 0x44, 0x69,
0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a,
0x07, 0x61, 0x64, 0x64, 0x72, 0x49, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07,
0x61, 0x64, 0x64, 0x72, 0x49, 0x64, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x42, 0x79,
0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x42, 0x79,
0x74, 0x65, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0c, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32,
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x49,
0x64, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x49, 0x64,
0x78, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76,
0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
0x0a, 0x64, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5b, 0x0a, 0x0e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a,
0x10, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f,
0x52, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54,
0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x45,
0x5f, 0x44, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x46, 0x55, 0x53, 0x45, 0x44, 0x10, 0x65, 0x12,
0x07, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0xc8, 0x01, 0x22, 0x26, 0x0a, 0x10, 0x44, 0x69, 0x61, 0x6c,
0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x22, 0x20, 0x0a, 0x08, 0x44, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05,
0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x6e, 0x6f, 0x6e,
0x63, 0x65, 0x22, 0x73, 0x0a, 0x10, 0x44, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74,
0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x18, 0x0a,
0x0e, 0x44, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x2a, 0x4a, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x6c, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x55, 0x53, 0x45, 0x44, 0x10,
0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x5f, 0x44, 0x49, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f,
0x52, 0x10, 0x64, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x5f, 0x44, 0x49, 0x41, 0x4c, 0x5f, 0x42, 0x41,
0x43, 0x4b, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x65, 0x12, 0x07, 0x0a, 0x02, 0x4f, 0x4b,
0x10, 0xc8, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDesc = []byte{
0x0a, 0x29, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61,
0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x75, 0x74, 0x6f,
0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x61, 0x75, 0x74,
0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x22, 0xaa, 0x02, 0x0a, 0x07, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x74,
0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x74,
0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x44, 0x61,
0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1d, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44,
0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
0x52, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x4c, 0x0a, 0x10, 0x64, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75,
0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x44,
0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x10, 0x64,
0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x05, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x39, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6c, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e,
0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63,
0x65, 0x22, 0x47, 0x0a, 0x0f, 0x44, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x49, 0x64, 0x78, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x49, 0x64, 0x78, 0x12, 0x1a,
0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
0x52, 0x08, 0x6e, 0x75, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0c, 0x44,
0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x61, 0x75,
0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18,
0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x49, 0x64, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x07, 0x61, 0x64, 0x64, 0x72, 0x49, 0x64, 0x78, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x69, 0x61, 0x6c,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x61,
0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x6c,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, 0x64, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74,
0x75, 0x73, 0x22, 0x5b, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e,
0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x5f,
0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44,
0x10, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x5f, 0x44, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x46,
0x55, 0x53, 0x45, 0x44, 0x10, 0x65, 0x12, 0x07, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0xc8, 0x01, 0x22,
0x26, 0x0a, 0x10, 0x44, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x0a, 0x08, 0x44, 0x69, 0x61, 0x6c, 0x42,
0x61, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x06, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x73, 0x0a, 0x10, 0x44, 0x69, 0x61,
0x6c, 0x42, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e,
0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x61,
0x6c, 0x42, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x69,
0x61, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74,
0x61, 0x74, 0x75, 0x73, 0x22, 0x18, 0x0a, 0x0e, 0x44, 0x69, 0x61, 0x6c, 0x42, 0x61, 0x63, 0x6b,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x2a, 0x4a,
0x0a, 0x0a, 0x44, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06,
0x55, 0x4e, 0x55, 0x53, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x5f, 0x44, 0x49,
0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x64, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x5f,
0x44, 0x49, 0x41, 0x4c, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10,
0x65, 0x12, 0x07, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0xc8, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f,
0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6e, 0x61, 0x74, 0x76, 0x32,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pb_autonatv2_proto_rawDescOnce sync.Once
file_pb_autonatv2_proto_rawDescData = file_pb_autonatv2_proto_rawDesc
file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescOnce sync.Once
file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescData = file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDesc
)
func file_pb_autonatv2_proto_rawDescGZIP() []byte {
file_pb_autonatv2_proto_rawDescOnce.Do(func() {
file_pb_autonatv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_autonatv2_proto_rawDescData)
func file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP() []byte {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescOnce.Do(func() {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescData)
})
return file_pb_autonatv2_proto_rawDescData
return file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescData
}
var file_pb_autonatv2_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_pb_autonatv2_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_pb_autonatv2_proto_goTypes = []any{
var file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_p2p_protocol_autonatv2_pb_autonatv2_proto_goTypes = []any{
(DialStatus)(0), // 0: autonatv2.pb.DialStatus
(DialResponse_ResponseStatus)(0), // 1: autonatv2.pb.DialResponse.ResponseStatus
(DialBackResponse_DialBackStatus)(0), // 2: autonatv2.pb.DialBackResponse.DialBackStatus
@@ -684,7 +689,7 @@ var file_pb_autonatv2_proto_goTypes = []any{
(*DialBack)(nil), // 8: autonatv2.pb.DialBack
(*DialBackResponse)(nil), // 9: autonatv2.pb.DialBackResponse
}
var file_pb_autonatv2_proto_depIdxs = []int32{
var file_p2p_protocol_autonatv2_pb_autonatv2_proto_depIdxs = []int32{
4, // 0: autonatv2.pb.Message.dialRequest:type_name -> autonatv2.pb.DialRequest
6, // 1: autonatv2.pb.Message.dialResponse:type_name -> autonatv2.pb.DialResponse
5, // 2: autonatv2.pb.Message.dialDataRequest:type_name -> autonatv2.pb.DialDataRequest
@@ -699,13 +704,13 @@ var file_pb_autonatv2_proto_depIdxs = []int32{
0, // [0:7] is the sub-list for field type_name
}
func init() { file_pb_autonatv2_proto_init() }
func file_pb_autonatv2_proto_init() {
if File_pb_autonatv2_proto != nil {
func init() { file_p2p_protocol_autonatv2_pb_autonatv2_proto_init() }
func file_p2p_protocol_autonatv2_pb_autonatv2_proto_init() {
if File_p2p_protocol_autonatv2_pb_autonatv2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_autonatv2_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Message); i {
case 0:
return &v.state
@@ -717,7 +722,7 @@ func file_pb_autonatv2_proto_init() {
return nil
}
}
file_pb_autonatv2_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*DialRequest); i {
case 0:
return &v.state
@@ -729,7 +734,7 @@ func file_pb_autonatv2_proto_init() {
return nil
}
}
file_pb_autonatv2_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*DialDataRequest); i {
case 0:
return &v.state
@@ -741,7 +746,7 @@ func file_pb_autonatv2_proto_init() {
return nil
}
}
file_pb_autonatv2_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*DialResponse); i {
case 0:
return &v.state
@@ -753,7 +758,7 @@ func file_pb_autonatv2_proto_init() {
return nil
}
}
file_pb_autonatv2_proto_msgTypes[4].Exporter = func(v any, i int) any {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*DialDataResponse); i {
case 0:
return &v.state
@@ -765,7 +770,7 @@ func file_pb_autonatv2_proto_init() {
return nil
}
}
file_pb_autonatv2_proto_msgTypes[5].Exporter = func(v any, i int) any {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*DialBack); i {
case 0:
return &v.state
@@ -777,7 +782,7 @@ func file_pb_autonatv2_proto_init() {
return nil
}
}
file_pb_autonatv2_proto_msgTypes[6].Exporter = func(v any, i int) any {
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*DialBackResponse); i {
case 0:
return &v.state
@@ -790,7 +795,7 @@ func file_pb_autonatv2_proto_init() {
}
}
}
file_pb_autonatv2_proto_msgTypes[0].OneofWrappers = []any{
file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0].OneofWrappers = []any{
(*Message_DialRequest)(nil),
(*Message_DialResponse)(nil),
(*Message_DialDataRequest)(nil),
@@ -800,19 +805,19 @@ func file_pb_autonatv2_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_autonatv2_proto_rawDesc,
RawDescriptor: file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDesc,
NumEnums: 3,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_autonatv2_proto_goTypes,
DependencyIndexes: file_pb_autonatv2_proto_depIdxs,
EnumInfos: file_pb_autonatv2_proto_enumTypes,
MessageInfos: file_pb_autonatv2_proto_msgTypes,
GoTypes: file_p2p_protocol_autonatv2_pb_autonatv2_proto_goTypes,
DependencyIndexes: file_p2p_protocol_autonatv2_pb_autonatv2_proto_depIdxs,
EnumInfos: file_p2p_protocol_autonatv2_pb_autonatv2_proto_enumTypes,
MessageInfos: file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes,
}.Build()
File_pb_autonatv2_proto = out.File
file_pb_autonatv2_proto_rawDesc = nil
file_pb_autonatv2_proto_goTypes = nil
file_pb_autonatv2_proto_depIdxs = nil
File_p2p_protocol_autonatv2_pb_autonatv2_proto = out.File
file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDesc = nil
file_p2p_protocol_autonatv2_pb_autonatv2_proto_goTypes = nil
file_p2p_protocol_autonatv2_pb_autonatv2_proto_depIdxs = nil
}

View File

@@ -2,6 +2,8 @@ syntax = "proto3";
package autonatv2.pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/protocol/autonatv2/pb";
message Message {
oneof msg {
DialRequest dialRequest = 1;

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/circuit.proto
// protoc v5.27.3
// source: p2p/protocol/circuitv2/pb/circuit.proto
package pb
@@ -72,11 +72,11 @@ func (x Status) String() string {
}
func (Status) Descriptor() protoreflect.EnumDescriptor {
return file_pb_circuit_proto_enumTypes[0].Descriptor()
return file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes[0].Descriptor()
}
func (Status) Type() protoreflect.EnumType {
return &file_pb_circuit_proto_enumTypes[0]
return &file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes[0]
}
func (x Status) Number() protoreflect.EnumNumber {
@@ -85,7 +85,7 @@ func (x Status) Number() protoreflect.EnumNumber {
// Deprecated: Use Status.Descriptor instead.
func (Status) EnumDescriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{0}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{0}
}
type HopMessage_Type int32
@@ -121,11 +121,11 @@ func (x HopMessage_Type) String() string {
}
func (HopMessage_Type) Descriptor() protoreflect.EnumDescriptor {
return file_pb_circuit_proto_enumTypes[1].Descriptor()
return file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes[1].Descriptor()
}
func (HopMessage_Type) Type() protoreflect.EnumType {
return &file_pb_circuit_proto_enumTypes[1]
return &file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes[1]
}
func (x HopMessage_Type) Number() protoreflect.EnumNumber {
@@ -134,7 +134,7 @@ func (x HopMessage_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use HopMessage_Type.Descriptor instead.
func (HopMessage_Type) EnumDescriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{0, 0}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{0, 0}
}
type StopMessage_Type int32
@@ -167,11 +167,11 @@ func (x StopMessage_Type) String() string {
}
func (StopMessage_Type) Descriptor() protoreflect.EnumDescriptor {
return file_pb_circuit_proto_enumTypes[2].Descriptor()
return file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes[2].Descriptor()
}
func (StopMessage_Type) Type() protoreflect.EnumType {
return &file_pb_circuit_proto_enumTypes[2]
return &file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes[2]
}
func (x StopMessage_Type) Number() protoreflect.EnumNumber {
@@ -180,7 +180,7 @@ func (x StopMessage_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use StopMessage_Type.Descriptor instead.
func (StopMessage_Type) EnumDescriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{1, 0}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{1, 0}
}
type HopMessage struct {
@@ -200,7 +200,7 @@ type HopMessage struct {
func (x *HopMessage) Reset() {
*x = HopMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_circuit_proto_msgTypes[0]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -213,7 +213,7 @@ func (x *HopMessage) String() string {
func (*HopMessage) ProtoMessage() {}
func (x *HopMessage) ProtoReflect() protoreflect.Message {
mi := &file_pb_circuit_proto_msgTypes[0]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -226,7 +226,7 @@ func (x *HopMessage) ProtoReflect() protoreflect.Message {
// Deprecated: Use HopMessage.ProtoReflect.Descriptor instead.
func (*HopMessage) Descriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{0}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{0}
}
func (x *HopMessage) GetType() HopMessage_Type {
@@ -280,7 +280,7 @@ type StopMessage struct {
func (x *StopMessage) Reset() {
*x = StopMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_circuit_proto_msgTypes[1]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -293,7 +293,7 @@ func (x *StopMessage) String() string {
func (*StopMessage) ProtoMessage() {}
func (x *StopMessage) ProtoReflect() protoreflect.Message {
mi := &file_pb_circuit_proto_msgTypes[1]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -306,7 +306,7 @@ func (x *StopMessage) ProtoReflect() protoreflect.Message {
// Deprecated: Use StopMessage.ProtoReflect.Descriptor instead.
func (*StopMessage) Descriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{1}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{1}
}
func (x *StopMessage) GetType() StopMessage_Type {
@@ -351,7 +351,7 @@ type Peer struct {
func (x *Peer) Reset() {
*x = Peer{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_circuit_proto_msgTypes[2]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -364,7 +364,7 @@ func (x *Peer) String() string {
func (*Peer) ProtoMessage() {}
func (x *Peer) ProtoReflect() protoreflect.Message {
mi := &file_pb_circuit_proto_msgTypes[2]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -377,7 +377,7 @@ func (x *Peer) ProtoReflect() protoreflect.Message {
// Deprecated: Use Peer.ProtoReflect.Descriptor instead.
func (*Peer) Descriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{2}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{2}
}
func (x *Peer) GetId() []byte {
@@ -409,7 +409,7 @@ type Reservation struct {
func (x *Reservation) Reset() {
*x = Reservation{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_circuit_proto_msgTypes[3]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -422,7 +422,7 @@ func (x *Reservation) String() string {
func (*Reservation) ProtoMessage() {}
func (x *Reservation) ProtoReflect() protoreflect.Message {
mi := &file_pb_circuit_proto_msgTypes[3]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -435,7 +435,7 @@ func (x *Reservation) ProtoReflect() protoreflect.Message {
// Deprecated: Use Reservation.ProtoReflect.Descriptor instead.
func (*Reservation) Descriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{3}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{3}
}
func (x *Reservation) GetExpire() uint64 {
@@ -471,7 +471,7 @@ type Limit struct {
func (x *Limit) Reset() {
*x = Limit{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_circuit_proto_msgTypes[4]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -484,7 +484,7 @@ func (x *Limit) String() string {
func (*Limit) ProtoMessage() {}
func (x *Limit) ProtoReflect() protoreflect.Message {
mi := &file_pb_circuit_proto_msgTypes[4]
mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -497,7 +497,7 @@ func (x *Limit) ProtoReflect() protoreflect.Message {
// Deprecated: Use Limit.ProtoReflect.Descriptor instead.
func (*Limit) Descriptor() ([]byte, []int) {
return file_pb_circuit_proto_rawDescGZIP(), []int{4}
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP(), []int{4}
}
func (x *Limit) GetDuration() uint32 {
@@ -514,99 +514,104 @@ func (x *Limit) GetData() uint64 {
return 0
}
var File_pb_circuit_proto protoreflect.FileDescriptor
var File_p2p_protocol_circuitv2_pb_circuit_proto protoreflect.FileDescriptor
var file_pb_circuit_proto_rawDesc = []byte{
0x0a, 0x10, 0x70, 0x62, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0a, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x22, 0xf1,
0x02, 0x0a, 0x0a, 0x48, 0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x69,
0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x10, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x50,
0x65, 0x65, 0x72, 0x48, 0x01, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3e,
0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0b,
0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c,
0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x48, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63,
0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x48, 0x04, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x22, 0x2c, 0x0a,
0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45,
0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12,
0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x42, 0x0e, 0x0a,
0x0c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a,
var file_p2p_protocol_circuitv2_pb_circuit_proto_rawDesc = []byte{
0x0a, 0x27, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63,
0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x76, 0x32, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x69, 0x72, 0x63,
0x75, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x63, 0x69, 0x72, 0x63, 0x75,
0x69, 0x74, 0x2e, 0x70, 0x62, 0x22, 0xf1, 0x02, 0x0a, 0x0a, 0x48, 0x6f, 0x70, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e,
0x48, 0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48,
0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x65,
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75,
0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, 0x01, 0x52, 0x04, 0x70, 0x65,
0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x69, 0x72,
0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x48, 0x02, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70,
0x62, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74,
0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62,
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x04, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x88, 0x01, 0x01, 0x22, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e,
0x4e, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f,
0x70, 0x65, 0x65, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x96, 0x02, 0x0a, 0x0b, 0x53, 0x74,
0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69,
0x74, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01,
0x12, 0x29, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72,
0x48, 0x01, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x05, 0x6c,
0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x69, 0x72,
0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x02, 0x52,
0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x69, 0x72, 0x63,
0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x03, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x22, 0x1f, 0x0a, 0x04, 0x54, 0x79,
0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12,
0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x42, 0x08, 0x0a,
0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x22, 0x96, 0x02, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x1c, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74,
0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x65, 0x65,
0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69,
0x74, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, 0x01, 0x52, 0x04, 0x70, 0x65, 0x65,
0x72, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x02, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88,
0x01, 0x01, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x88, 0x01, 0x01, 0x22, 0x1f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43,
0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54,
0x55, 0x53, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74,
0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x38, 0x0a, 0x04, 0x50,
0x65, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48,
0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x42, 0x05,
0x0a, 0x03, 0x5f, 0x69, 0x64, 0x22, 0x76, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x88, 0x01,
0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c,
0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x76, 0x6f, 0x75, 0x63, 0x68,
0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x01, 0x52, 0x07, 0x76, 0x6f, 0x75, 0x63,
0x68, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72,
0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x76, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x22, 0x57, 0x0a,
0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01,
0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2a, 0xca, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x55, 0x53, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a,
0x02, 0x4f, 0x4b, 0x10, 0x64, 0x12, 0x18, 0x0a, 0x13, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x41,
0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x46, 0x55, 0x53, 0x45, 0x44, 0x10, 0xc8, 0x01, 0x12,
0x1c, 0x0a, 0x17, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49,
0x54, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0xc9, 0x01, 0x12, 0x16, 0x0a,
0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49,
0x45, 0x44, 0x10, 0xca, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54,
0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0xcb, 0x01, 0x12, 0x13, 0x0a,
0x0e, 0x4e, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10,
0xcc, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x4d, 0x41, 0x4c, 0x46, 0x4f, 0x52, 0x4d, 0x45, 0x44, 0x5f,
0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x90, 0x03, 0x12, 0x17, 0x0a, 0x12, 0x55, 0x4e,
0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45,
0x10, 0x91, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x75, 0x73, 0x22, 0x38, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12,
0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05,
0x61, 0x64, 0x64, 0x72, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x22, 0x76, 0x0a, 0x0b,
0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x65,
0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x65,
0x78, 0x70, 0x69, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x72,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x61, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1d,
0x0a, 0x07, 0x76, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48,
0x01, 0x52, 0x07, 0x76, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a,
0x07, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x76, 0x6f, 0x75,
0x63, 0x68, 0x65, 0x72, 0x22, 0x57, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a,
0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48,
0x00, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x17,
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x64, 0x75, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2a, 0xca, 0x01,
0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x55, 0x53,
0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x64, 0x12, 0x18, 0x0a, 0x13,
0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x46, 0x55,
0x53, 0x45, 0x44, 0x10, 0xc8, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52,
0x43, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45,
0x44, 0x10, 0xc9, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49,
0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0xca, 0x01, 0x12, 0x16, 0x0a, 0x11,
0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45,
0x44, 0x10, 0xcb, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x4e, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52,
0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0xcc, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x4d, 0x41, 0x4c,
0x46, 0x4f, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x90,
0x03, 0x12, 0x17, 0x0a, 0x12, 0x55, 0x4e, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x5f,
0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x91, 0x03, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f,
0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x76, 0x32,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pb_circuit_proto_rawDescOnce sync.Once
file_pb_circuit_proto_rawDescData = file_pb_circuit_proto_rawDesc
file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescOnce sync.Once
file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescData = file_p2p_protocol_circuitv2_pb_circuit_proto_rawDesc
)
func file_pb_circuit_proto_rawDescGZIP() []byte {
file_pb_circuit_proto_rawDescOnce.Do(func() {
file_pb_circuit_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_circuit_proto_rawDescData)
func file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP() []byte {
file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescOnce.Do(func() {
file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescData)
})
return file_pb_circuit_proto_rawDescData
return file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescData
}
var file_pb_circuit_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_pb_circuit_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_pb_circuit_proto_goTypes = []any{
var file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_p2p_protocol_circuitv2_pb_circuit_proto_goTypes = []any{
(Status)(0), // 0: circuit.pb.Status
(HopMessage_Type)(0), // 1: circuit.pb.HopMessage.Type
(StopMessage_Type)(0), // 2: circuit.pb.StopMessage.Type
@@ -616,7 +621,7 @@ var file_pb_circuit_proto_goTypes = []any{
(*Reservation)(nil), // 6: circuit.pb.Reservation
(*Limit)(nil), // 7: circuit.pb.Limit
}
var file_pb_circuit_proto_depIdxs = []int32{
var file_p2p_protocol_circuitv2_pb_circuit_proto_depIdxs = []int32{
1, // 0: circuit.pb.HopMessage.type:type_name -> circuit.pb.HopMessage.Type
5, // 1: circuit.pb.HopMessage.peer:type_name -> circuit.pb.Peer
6, // 2: circuit.pb.HopMessage.reservation:type_name -> circuit.pb.Reservation
@@ -633,13 +638,13 @@ var file_pb_circuit_proto_depIdxs = []int32{
0, // [0:9] is the sub-list for field type_name
}
func init() { file_pb_circuit_proto_init() }
func file_pb_circuit_proto_init() {
if File_pb_circuit_proto != nil {
func init() { file_p2p_protocol_circuitv2_pb_circuit_proto_init() }
func file_p2p_protocol_circuitv2_pb_circuit_proto_init() {
if File_p2p_protocol_circuitv2_pb_circuit_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_circuit_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*HopMessage); i {
case 0:
return &v.state
@@ -651,7 +656,7 @@ func file_pb_circuit_proto_init() {
return nil
}
}
file_pb_circuit_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*StopMessage); i {
case 0:
return &v.state
@@ -663,7 +668,7 @@ func file_pb_circuit_proto_init() {
return nil
}
}
file_pb_circuit_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*Peer); i {
case 0:
return &v.state
@@ -675,7 +680,7 @@ func file_pb_circuit_proto_init() {
return nil
}
}
file_pb_circuit_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*Reservation); i {
case 0:
return &v.state
@@ -687,7 +692,7 @@ func file_pb_circuit_proto_init() {
return nil
}
}
file_pb_circuit_proto_msgTypes[4].Exporter = func(v any, i int) any {
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*Limit); i {
case 0:
return &v.state
@@ -700,28 +705,28 @@ func file_pb_circuit_proto_init() {
}
}
}
file_pb_circuit_proto_msgTypes[0].OneofWrappers = []any{}
file_pb_circuit_proto_msgTypes[1].OneofWrappers = []any{}
file_pb_circuit_proto_msgTypes[2].OneofWrappers = []any{}
file_pb_circuit_proto_msgTypes[3].OneofWrappers = []any{}
file_pb_circuit_proto_msgTypes[4].OneofWrappers = []any{}
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0].OneofWrappers = []any{}
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1].OneofWrappers = []any{}
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2].OneofWrappers = []any{}
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3].OneofWrappers = []any{}
file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_circuit_proto_rawDesc,
RawDescriptor: file_p2p_protocol_circuitv2_pb_circuit_proto_rawDesc,
NumEnums: 3,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_circuit_proto_goTypes,
DependencyIndexes: file_pb_circuit_proto_depIdxs,
EnumInfos: file_pb_circuit_proto_enumTypes,
MessageInfos: file_pb_circuit_proto_msgTypes,
GoTypes: file_p2p_protocol_circuitv2_pb_circuit_proto_goTypes,
DependencyIndexes: file_p2p_protocol_circuitv2_pb_circuit_proto_depIdxs,
EnumInfos: file_p2p_protocol_circuitv2_pb_circuit_proto_enumTypes,
MessageInfos: file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes,
}.Build()
File_pb_circuit_proto = out.File
file_pb_circuit_proto_rawDesc = nil
file_pb_circuit_proto_goTypes = nil
file_pb_circuit_proto_depIdxs = nil
File_p2p_protocol_circuitv2_pb_circuit_proto = out.File
file_p2p_protocol_circuitv2_pb_circuit_proto_rawDesc = nil
file_p2p_protocol_circuitv2_pb_circuit_proto_goTypes = nil
file_p2p_protocol_circuitv2_pb_circuit_proto_depIdxs = nil
}

View File

@@ -2,6 +2,8 @@ syntax = "proto3";
package circuit.pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/pb";
message HopMessage {
enum Type {
RESERVE = 0;

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/voucher.proto
// protoc v5.27.3
// source: p2p/protocol/circuitv2/pb/voucher.proto
package pb
@@ -35,7 +35,7 @@ type ReservationVoucher struct {
func (x *ReservationVoucher) Reset() {
*x = ReservationVoucher{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_voucher_proto_msgTypes[0]
mi := &file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -48,7 +48,7 @@ func (x *ReservationVoucher) String() string {
func (*ReservationVoucher) ProtoMessage() {}
func (x *ReservationVoucher) ProtoReflect() protoreflect.Message {
mi := &file_pb_voucher_proto_msgTypes[0]
mi := &file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -61,7 +61,7 @@ func (x *ReservationVoucher) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReservationVoucher.ProtoReflect.Descriptor instead.
func (*ReservationVoucher) Descriptor() ([]byte, []int) {
return file_pb_voucher_proto_rawDescGZIP(), []int{0}
return file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescGZIP(), []int{0}
}
func (x *ReservationVoucher) GetRelay() []byte {
@@ -85,40 +85,45 @@ func (x *ReservationVoucher) GetExpiration() uint64 {
return 0
}
var File_pb_voucher_proto protoreflect.FileDescriptor
var File_p2p_protocol_circuitv2_pb_voucher_proto protoreflect.FileDescriptor
var file_pb_voucher_proto_rawDesc = []byte{
0x0a, 0x10, 0x70, 0x62, 0x2f, 0x76, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0a, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x70, 0x62, 0x22, 0x8f,
0x01, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x6f,
0x75, 0x63, 0x68, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x88, 0x01, 0x01,
0x12, 0x17, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x01,
0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x65, 0x78, 0x70,
0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52,
0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x70, 0x65, 0x65,
0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
var file_p2p_protocol_circuitv2_pb_voucher_proto_rawDesc = []byte{
0x0a, 0x27, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63,
0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x76, 0x32, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x6f, 0x75, 0x63,
0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x63, 0x69, 0x72, 0x63, 0x75,
0x69, 0x74, 0x2e, 0x70, 0x62, 0x22, 0x8f, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x05,
0x72, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x72,
0x65, 0x6c, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x01, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x88, 0x01, 0x01,
0x12, 0x23, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x42,
0x07, 0x0a, 0x05, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70,
0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d,
0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x76, 0x32, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pb_voucher_proto_rawDescOnce sync.Once
file_pb_voucher_proto_rawDescData = file_pb_voucher_proto_rawDesc
file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescOnce sync.Once
file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescData = file_p2p_protocol_circuitv2_pb_voucher_proto_rawDesc
)
func file_pb_voucher_proto_rawDescGZIP() []byte {
file_pb_voucher_proto_rawDescOnce.Do(func() {
file_pb_voucher_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_voucher_proto_rawDescData)
func file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescGZIP() []byte {
file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescOnce.Do(func() {
file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescData)
})
return file_pb_voucher_proto_rawDescData
return file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescData
}
var file_pb_voucher_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_pb_voucher_proto_goTypes = []any{
var file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_p2p_protocol_circuitv2_pb_voucher_proto_goTypes = []any{
(*ReservationVoucher)(nil), // 0: circuit.pb.ReservationVoucher
}
var file_pb_voucher_proto_depIdxs = []int32{
var file_p2p_protocol_circuitv2_pb_voucher_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
@@ -126,13 +131,13 @@ var file_pb_voucher_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_pb_voucher_proto_init() }
func file_pb_voucher_proto_init() {
if File_pb_voucher_proto != nil {
func init() { file_p2p_protocol_circuitv2_pb_voucher_proto_init() }
func file_p2p_protocol_circuitv2_pb_voucher_proto_init() {
if File_p2p_protocol_circuitv2_pb_voucher_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_voucher_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*ReservationVoucher); i {
case 0:
return &v.state
@@ -145,23 +150,23 @@ func file_pb_voucher_proto_init() {
}
}
}
file_pb_voucher_proto_msgTypes[0].OneofWrappers = []any{}
file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_voucher_proto_rawDesc,
RawDescriptor: file_p2p_protocol_circuitv2_pb_voucher_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_voucher_proto_goTypes,
DependencyIndexes: file_pb_voucher_proto_depIdxs,
MessageInfos: file_pb_voucher_proto_msgTypes,
GoTypes: file_p2p_protocol_circuitv2_pb_voucher_proto_goTypes,
DependencyIndexes: file_p2p_protocol_circuitv2_pb_voucher_proto_depIdxs,
MessageInfos: file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes,
}.Build()
File_pb_voucher_proto = out.File
file_pb_voucher_proto_rawDesc = nil
file_pb_voucher_proto_goTypes = nil
file_pb_voucher_proto_depIdxs = nil
File_p2p_protocol_circuitv2_pb_voucher_proto = out.File
file_p2p_protocol_circuitv2_pb_voucher_proto_rawDesc = nil
file_p2p_protocol_circuitv2_pb_voucher_proto_goTypes = nil
file_p2p_protocol_circuitv2_pb_voucher_proto_depIdxs = nil
}

View File

@@ -2,6 +2,8 @@ syntax = "proto3";
package circuit.pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/pb";
message ReservationVoucher {
// These fields are marked optional for backwards compatibility with proto2.
// Users should make sure to always set these.

View File

@@ -1,4 +0,0 @@
package circuitv2
//go:generate protoc --proto_path=$PWD:$PWD/../../.. --go_out=. --go_opt=Mpb/circuit.proto=./pb pb/circuit.proto
//go:generate protoc --proto_path=$PWD:$PWD/../../.. --go_out=. --go_opt=Mpb/voucher.proto=./pb pb/voucher.proto

View File

@@ -17,8 +17,6 @@ import (
manet "github.com/multiformats/go-multiaddr/net"
)
//go:generate protoc --proto_path=$PWD:$PWD/../../.. --go_out=. --go_opt=Mpb/holepunch.proto=./pb pb/holepunch.proto
// ErrHolePunchActive is returned from DirectConnect when another hole punching attempt is currently running
var ErrHolePunchActive = errors.New("another hole punching attempt to this peer is active")

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/holepunch.proto
// protoc v5.27.3
// source: p2p/protocol/holepunch/pb/holepunch.proto
package pb
@@ -50,11 +50,11 @@ func (x HolePunch_Type) String() string {
}
func (HolePunch_Type) Descriptor() protoreflect.EnumDescriptor {
return file_pb_holepunch_proto_enumTypes[0].Descriptor()
return file_p2p_protocol_holepunch_pb_holepunch_proto_enumTypes[0].Descriptor()
}
func (HolePunch_Type) Type() protoreflect.EnumType {
return &file_pb_holepunch_proto_enumTypes[0]
return &file_p2p_protocol_holepunch_pb_holepunch_proto_enumTypes[0]
}
func (x HolePunch_Type) Number() protoreflect.EnumNumber {
@@ -73,7 +73,7 @@ func (x *HolePunch_Type) UnmarshalJSON(b []byte) error {
// Deprecated: Use HolePunch_Type.Descriptor instead.
func (HolePunch_Type) EnumDescriptor() ([]byte, []int) {
return file_pb_holepunch_proto_rawDescGZIP(), []int{0, 0}
return file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescGZIP(), []int{0, 0}
}
// spec: https://github.com/libp2p/specs/blob/master/relay/DCUtR.md
@@ -89,7 +89,7 @@ type HolePunch struct {
func (x *HolePunch) Reset() {
*x = HolePunch{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_holepunch_proto_msgTypes[0]
mi := &file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -102,7 +102,7 @@ func (x *HolePunch) String() string {
func (*HolePunch) ProtoMessage() {}
func (x *HolePunch) ProtoReflect() protoreflect.Message {
mi := &file_pb_holepunch_proto_msgTypes[0]
mi := &file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -115,7 +115,7 @@ func (x *HolePunch) ProtoReflect() protoreflect.Message {
// Deprecated: Use HolePunch.ProtoReflect.Descriptor instead.
func (*HolePunch) Descriptor() ([]byte, []int) {
return file_pb_holepunch_proto_rawDescGZIP(), []int{0}
return file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescGZIP(), []int{0}
}
func (x *HolePunch) GetType() HolePunch_Type {
@@ -132,40 +132,45 @@ func (x *HolePunch) GetObsAddrs() [][]byte {
return nil
}
var File_pb_holepunch_proto protoreflect.FileDescriptor
var File_p2p_protocol_holepunch_pb_holepunch_proto protoreflect.FileDescriptor
var file_pb_holepunch_proto_rawDesc = []byte{
0x0a, 0x12, 0x70, 0x62, 0x2f, 0x68, 0x6f, 0x6c, 0x65, 0x70, 0x75, 0x6e, 0x63, 0x68, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x68, 0x6f, 0x6c, 0x65, 0x70, 0x75, 0x6e, 0x63, 0x68, 0x2e,
0x70, 0x62, 0x22, 0x79, 0x0a, 0x09, 0x48, 0x6f, 0x6c, 0x65, 0x50, 0x75, 0x6e, 0x63, 0x68, 0x12,
0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x1c, 0x2e,
0x68, 0x6f, 0x6c, 0x65, 0x70, 0x75, 0x6e, 0x63, 0x68, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x6f, 0x6c,
0x65, 0x50, 0x75, 0x6e, 0x63, 0x68, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x62, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0c, 0x52, 0x08, 0x4f, 0x62, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x22, 0x1e, 0x0a,
0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54,
0x10, 0x64, 0x12, 0x09, 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10, 0xac, 0x02,
var file_p2p_protocol_holepunch_pb_holepunch_proto_rawDesc = []byte{
0x0a, 0x29, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68,
0x6f, 0x6c, 0x65, 0x70, 0x75, 0x6e, 0x63, 0x68, 0x2f, 0x70, 0x62, 0x2f, 0x68, 0x6f, 0x6c, 0x65,
0x70, 0x75, 0x6e, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x68, 0x6f, 0x6c,
0x65, 0x70, 0x75, 0x6e, 0x63, 0x68, 0x2e, 0x70, 0x62, 0x22, 0x79, 0x0a, 0x09, 0x48, 0x6f, 0x6c,
0x65, 0x50, 0x75, 0x6e, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x02, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x68, 0x6f, 0x6c, 0x65, 0x70, 0x75, 0x6e, 0x63, 0x68,
0x2e, 0x70, 0x62, 0x2e, 0x48, 0x6f, 0x6c, 0x65, 0x50, 0x75, 0x6e, 0x63, 0x68, 0x2e, 0x54, 0x79,
0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x62, 0x73, 0x41,
0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x4f, 0x62, 0x73, 0x41,
0x64, 0x64, 0x72, 0x73, 0x22, 0x1e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x64, 0x12, 0x09, 0x0a, 0x04, 0x53, 0x59, 0x4e,
0x43, 0x10, 0xac, 0x02, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62,
0x70, 0x32, 0x70, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x2f, 0x68, 0x6f, 0x6c, 0x65, 0x70, 0x75, 0x6e, 0x63, 0x68, 0x2f, 0x70, 0x62,
}
var (
file_pb_holepunch_proto_rawDescOnce sync.Once
file_pb_holepunch_proto_rawDescData = file_pb_holepunch_proto_rawDesc
file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescOnce sync.Once
file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescData = file_p2p_protocol_holepunch_pb_holepunch_proto_rawDesc
)
func file_pb_holepunch_proto_rawDescGZIP() []byte {
file_pb_holepunch_proto_rawDescOnce.Do(func() {
file_pb_holepunch_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_holepunch_proto_rawDescData)
func file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescGZIP() []byte {
file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescOnce.Do(func() {
file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescData)
})
return file_pb_holepunch_proto_rawDescData
return file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescData
}
var file_pb_holepunch_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pb_holepunch_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_pb_holepunch_proto_goTypes = []any{
var file_p2p_protocol_holepunch_pb_holepunch_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_p2p_protocol_holepunch_pb_holepunch_proto_goTypes = []any{
(HolePunch_Type)(0), // 0: holepunch.pb.HolePunch.Type
(*HolePunch)(nil), // 1: holepunch.pb.HolePunch
}
var file_pb_holepunch_proto_depIdxs = []int32{
var file_p2p_protocol_holepunch_pb_holepunch_proto_depIdxs = []int32{
0, // 0: holepunch.pb.HolePunch.type:type_name -> holepunch.pb.HolePunch.Type
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
@@ -174,13 +179,13 @@ var file_pb_holepunch_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pb_holepunch_proto_init() }
func file_pb_holepunch_proto_init() {
if File_pb_holepunch_proto != nil {
func init() { file_p2p_protocol_holepunch_pb_holepunch_proto_init() }
func file_p2p_protocol_holepunch_pb_holepunch_proto_init() {
if File_p2p_protocol_holepunch_pb_holepunch_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_holepunch_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*HolePunch); i {
case 0:
return &v.state
@@ -197,19 +202,19 @@ func file_pb_holepunch_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_holepunch_proto_rawDesc,
RawDescriptor: file_p2p_protocol_holepunch_pb_holepunch_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_holepunch_proto_goTypes,
DependencyIndexes: file_pb_holepunch_proto_depIdxs,
EnumInfos: file_pb_holepunch_proto_enumTypes,
MessageInfos: file_pb_holepunch_proto_msgTypes,
GoTypes: file_p2p_protocol_holepunch_pb_holepunch_proto_goTypes,
DependencyIndexes: file_p2p_protocol_holepunch_pb_holepunch_proto_depIdxs,
EnumInfos: file_p2p_protocol_holepunch_pb_holepunch_proto_enumTypes,
MessageInfos: file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes,
}.Build()
File_pb_holepunch_proto = out.File
file_pb_holepunch_proto_rawDesc = nil
file_pb_holepunch_proto_goTypes = nil
file_pb_holepunch_proto_depIdxs = nil
File_p2p_protocol_holepunch_pb_holepunch_proto = out.File
file_p2p_protocol_holepunch_pb_holepunch_proto_rawDesc = nil
file_p2p_protocol_holepunch_pb_holepunch_proto_goTypes = nil
file_p2p_protocol_holepunch_pb_holepunch_proto_depIdxs = nil
}

View File

@@ -2,6 +2,8 @@ syntax = "proto2";
package holepunch.pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/protocol/holepunch/pb";
// spec: https://github.com/libp2p/specs/blob/master/relay/DCUtR.md
message HolePunch {
enum Type {

View File

@@ -30,8 +30,6 @@ import (
"google.golang.org/protobuf/proto"
)
//go:generate protoc --proto_path=$PWD:$PWD/../../.. --go_out=. --go_opt=Mpb/identify.proto=./pb pb/identify.proto
var log = logging.Logger("net/identify")
var Timeout = 30 * time.Second // timeout on all incoming Identify interactions

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/identify.proto
// protoc v5.27.3
// source: p2p/protocol/identify/pb/identify.proto
package pb
@@ -53,7 +53,7 @@ type Identify struct {
func (x *Identify) Reset() {
*x = Identify{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_identify_proto_msgTypes[0]
mi := &file_p2p_protocol_identify_pb_identify_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -66,7 +66,7 @@ func (x *Identify) String() string {
func (*Identify) ProtoMessage() {}
func (x *Identify) ProtoReflect() protoreflect.Message {
mi := &file_pb_identify_proto_msgTypes[0]
mi := &file_p2p_protocol_identify_pb_identify_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -79,7 +79,7 @@ func (x *Identify) ProtoReflect() protoreflect.Message {
// Deprecated: Use Identify.ProtoReflect.Descriptor instead.
func (*Identify) Descriptor() ([]byte, []int) {
return file_pb_identify_proto_rawDescGZIP(), []int{0}
return file_p2p_protocol_identify_pb_identify_proto_rawDescGZIP(), []int{0}
}
func (x *Identify) GetProtocolVersion() string {
@@ -131,47 +131,52 @@ func (x *Identify) GetSignedPeerRecord() []byte {
return nil
}
var File_pb_identify_proto protoreflect.FileDescriptor
var File_p2p_protocol_identify_pb_identify_proto protoreflect.FileDescriptor
var file_pb_identify_proto_rawDesc = []byte{
0x0a, 0x11, 0x70, 0x62, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x62,
0x22, 0x86, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x12, 0x28, 0x0a,
0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61,
0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70,
0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09,
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x69, 0x73,
0x74, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b,
0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6f,
0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0c, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12,
0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x2a, 0x0a,
0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50,
0x65, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
var file_p2p_protocol_identify_pb_identify_proto_rawDesc = []byte{
0x0a, 0x27, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x69,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x62, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x66, 0x79, 0x2e, 0x70, 0x62, 0x22, 0x86, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x66, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a,
0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12,
0x20, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72,
0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x41, 0x64, 0x64,
0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65,
0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x65,
0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x73,
0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42,
0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69,
0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70,
0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x62,
}
var (
file_pb_identify_proto_rawDescOnce sync.Once
file_pb_identify_proto_rawDescData = file_pb_identify_proto_rawDesc
file_p2p_protocol_identify_pb_identify_proto_rawDescOnce sync.Once
file_p2p_protocol_identify_pb_identify_proto_rawDescData = file_p2p_protocol_identify_pb_identify_proto_rawDesc
)
func file_pb_identify_proto_rawDescGZIP() []byte {
file_pb_identify_proto_rawDescOnce.Do(func() {
file_pb_identify_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_identify_proto_rawDescData)
func file_p2p_protocol_identify_pb_identify_proto_rawDescGZIP() []byte {
file_p2p_protocol_identify_pb_identify_proto_rawDescOnce.Do(func() {
file_p2p_protocol_identify_pb_identify_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_protocol_identify_pb_identify_proto_rawDescData)
})
return file_pb_identify_proto_rawDescData
return file_p2p_protocol_identify_pb_identify_proto_rawDescData
}
var file_pb_identify_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_pb_identify_proto_goTypes = []any{
var file_p2p_protocol_identify_pb_identify_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_p2p_protocol_identify_pb_identify_proto_goTypes = []any{
(*Identify)(nil), // 0: identify.pb.Identify
}
var file_pb_identify_proto_depIdxs = []int32{
var file_p2p_protocol_identify_pb_identify_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
@@ -179,13 +184,13 @@ var file_pb_identify_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_pb_identify_proto_init() }
func file_pb_identify_proto_init() {
if File_pb_identify_proto != nil {
func init() { file_p2p_protocol_identify_pb_identify_proto_init() }
func file_p2p_protocol_identify_pb_identify_proto_init() {
if File_p2p_protocol_identify_pb_identify_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_identify_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_protocol_identify_pb_identify_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Identify); i {
case 0:
return &v.state
@@ -202,18 +207,18 @@ func file_pb_identify_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_identify_proto_rawDesc,
RawDescriptor: file_p2p_protocol_identify_pb_identify_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_identify_proto_goTypes,
DependencyIndexes: file_pb_identify_proto_depIdxs,
MessageInfos: file_pb_identify_proto_msgTypes,
GoTypes: file_p2p_protocol_identify_pb_identify_proto_goTypes,
DependencyIndexes: file_p2p_protocol_identify_pb_identify_proto_depIdxs,
MessageInfos: file_p2p_protocol_identify_pb_identify_proto_msgTypes,
}.Build()
File_pb_identify_proto = out.File
file_pb_identify_proto_rawDesc = nil
file_pb_identify_proto_goTypes = nil
file_pb_identify_proto_depIdxs = nil
File_p2p_protocol_identify_pb_identify_proto = out.File
file_p2p_protocol_identify_pb_identify_proto_rawDesc = nil
file_p2p_protocol_identify_pb_identify_proto_goTypes = nil
file_p2p_protocol_identify_pb_identify_proto_depIdxs = nil
}

View File

@@ -2,6 +2,8 @@ syntax = "proto2";
package identify.pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/protocol/identify/pb";
message Identify {
// protocolVersion determines compatibility between peers

View File

@@ -19,8 +19,6 @@ import (
"google.golang.org/protobuf/proto"
)
//go:generate protoc --go_out=. --go_opt=Mpb/payload.proto=./pb pb/payload.proto
// payloadSigPrefix is prepended to our Noise static key before signing with
// our libp2p identity key.
const payloadSigPrefix = "noise-libp2p-static-key:"

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: pb/payload.proto
// protoc v5.27.3
// source: p2p/security/noise/pb/payload.proto
package pb
@@ -32,7 +32,7 @@ type NoiseExtensions struct {
func (x *NoiseExtensions) Reset() {
*x = NoiseExtensions{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_payload_proto_msgTypes[0]
mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -45,7 +45,7 @@ func (x *NoiseExtensions) String() string {
func (*NoiseExtensions) ProtoMessage() {}
func (x *NoiseExtensions) ProtoReflect() protoreflect.Message {
mi := &file_pb_payload_proto_msgTypes[0]
mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -58,7 +58,7 @@ func (x *NoiseExtensions) ProtoReflect() protoreflect.Message {
// Deprecated: Use NoiseExtensions.ProtoReflect.Descriptor instead.
func (*NoiseExtensions) Descriptor() ([]byte, []int) {
return file_pb_payload_proto_rawDescGZIP(), []int{0}
return file_p2p_security_noise_pb_payload_proto_rawDescGZIP(), []int{0}
}
func (x *NoiseExtensions) GetWebtransportCerthashes() [][]byte {
@@ -88,7 +88,7 @@ type NoiseHandshakePayload struct {
func (x *NoiseHandshakePayload) Reset() {
*x = NoiseHandshakePayload{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_payload_proto_msgTypes[1]
mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -101,7 +101,7 @@ func (x *NoiseHandshakePayload) String() string {
func (*NoiseHandshakePayload) ProtoMessage() {}
func (x *NoiseHandshakePayload) ProtoReflect() protoreflect.Message {
mi := &file_pb_payload_proto_msgTypes[1]
mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -114,7 +114,7 @@ func (x *NoiseHandshakePayload) ProtoReflect() protoreflect.Message {
// Deprecated: Use NoiseHandshakePayload.ProtoReflect.Descriptor instead.
func (*NoiseHandshakePayload) Descriptor() ([]byte, []int) {
return file_pb_payload_proto_rawDescGZIP(), []int{1}
return file_p2p_security_noise_pb_payload_proto_rawDescGZIP(), []int{1}
}
func (x *NoiseHandshakePayload) GetIdentityKey() []byte {
@@ -138,47 +138,52 @@ func (x *NoiseHandshakePayload) GetExtensions() *NoiseExtensions {
return nil
}
var File_pb_payload_proto protoreflect.FileDescriptor
var File_p2p_security_noise_pb_payload_proto protoreflect.FileDescriptor
var file_pb_payload_proto_rawDesc = []byte{
0x0a, 0x10, 0x70, 0x62, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x6f, 0x0a, 0x0f, 0x4e, 0x6f, 0x69, 0x73, 0x65, 0x45,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x17, 0x77, 0x65, 0x62,
0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x68, 0x61,
0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x16, 0x77, 0x65, 0x62, 0x74,
0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x65, 0x72, 0x74, 0x68, 0x61, 0x73, 0x68,
0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x75, 0x78,
0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x4d, 0x75, 0x78, 0x65, 0x72, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x4e, 0x6f, 0x69, 0x73,
0x65, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x79, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x5f, 0x73, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62,
0x2e, 0x4e, 0x6f, 0x69, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
var file_p2p_security_noise_pb_payload_proto_rawDesc = []byte{
0x0a, 0x23, 0x70, 0x32, 0x70, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x6e,
0x6f, 0x69, 0x73, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x6f, 0x0a, 0x0f, 0x4e, 0x6f, 0x69,
0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x17,
0x77, 0x65, 0x62, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x65, 0x72,
0x74, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x16, 0x77,
0x65, 0x62, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x65, 0x72, 0x74, 0x68,
0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,
0x6d, 0x75, 0x78, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x4d, 0x75, 0x78, 0x65, 0x72, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x4e,
0x6f, 0x69, 0x73, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x79,
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x74, 0x79, 0x5f, 0x73, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x0a, 0x65, 0x78,
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x69, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42,
0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69,
0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70,
0x32, 0x70, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x6e, 0x6f, 0x69, 0x73,
0x65, 0x2f, 0x70, 0x62,
}
var (
file_pb_payload_proto_rawDescOnce sync.Once
file_pb_payload_proto_rawDescData = file_pb_payload_proto_rawDesc
file_p2p_security_noise_pb_payload_proto_rawDescOnce sync.Once
file_p2p_security_noise_pb_payload_proto_rawDescData = file_p2p_security_noise_pb_payload_proto_rawDesc
)
func file_pb_payload_proto_rawDescGZIP() []byte {
file_pb_payload_proto_rawDescOnce.Do(func() {
file_pb_payload_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_payload_proto_rawDescData)
func file_p2p_security_noise_pb_payload_proto_rawDescGZIP() []byte {
file_p2p_security_noise_pb_payload_proto_rawDescOnce.Do(func() {
file_p2p_security_noise_pb_payload_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_security_noise_pb_payload_proto_rawDescData)
})
return file_pb_payload_proto_rawDescData
return file_p2p_security_noise_pb_payload_proto_rawDescData
}
var file_pb_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_pb_payload_proto_goTypes = []any{
var file_p2p_security_noise_pb_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_p2p_security_noise_pb_payload_proto_goTypes = []any{
(*NoiseExtensions)(nil), // 0: pb.NoiseExtensions
(*NoiseHandshakePayload)(nil), // 1: pb.NoiseHandshakePayload
}
var file_pb_payload_proto_depIdxs = []int32{
var file_p2p_security_noise_pb_payload_proto_depIdxs = []int32{
0, // 0: pb.NoiseHandshakePayload.extensions:type_name -> pb.NoiseExtensions
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
@@ -187,13 +192,13 @@ var file_pb_payload_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pb_payload_proto_init() }
func file_pb_payload_proto_init() {
if File_pb_payload_proto != nil {
func init() { file_p2p_security_noise_pb_payload_proto_init() }
func file_p2p_security_noise_pb_payload_proto_init() {
if File_p2p_security_noise_pb_payload_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_payload_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_security_noise_pb_payload_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*NoiseExtensions); i {
case 0:
return &v.state
@@ -205,7 +210,7 @@ func file_pb_payload_proto_init() {
return nil
}
}
file_pb_payload_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_p2p_security_noise_pb_payload_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*NoiseHandshakePayload); i {
case 0:
return &v.state
@@ -222,18 +227,18 @@ func file_pb_payload_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_payload_proto_rawDesc,
RawDescriptor: file_p2p_security_noise_pb_payload_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_payload_proto_goTypes,
DependencyIndexes: file_pb_payload_proto_depIdxs,
MessageInfos: file_pb_payload_proto_msgTypes,
GoTypes: file_p2p_security_noise_pb_payload_proto_goTypes,
DependencyIndexes: file_p2p_security_noise_pb_payload_proto_depIdxs,
MessageInfos: file_p2p_security_noise_pb_payload_proto_msgTypes,
}.Build()
File_pb_payload_proto = out.File
file_pb_payload_proto_rawDesc = nil
file_pb_payload_proto_goTypes = nil
file_pb_payload_proto_depIdxs = nil
File_p2p_security_noise_pb_payload_proto = out.File
file_p2p_security_noise_pb_payload_proto_rawDesc = nil
file_p2p_security_noise_pb_payload_proto_goTypes = nil
file_p2p_security_noise_pb_payload_proto_depIdxs = nil
}

View File

@@ -1,6 +1,8 @@
syntax = "proto2";
package pb;
option go_package = "github.com/libp2p/go-libp2p/p2p/security/noise/pb";
message NoiseExtensions {
repeated bytes webtransport_certhashes = 1;
repeated string stream_muxers = 2;

View File

@@ -1,3 +0,0 @@
package libp2pwebrtc
//go:generate protoc --go_out=. --go_opt=Mpb/message.proto=./pb pb/message.proto

View File

@@ -1,3 +0,0 @@
package pb
//go:generate protoc --go_out=. --go_opt=paths=source_relative -I . message.proto

View File

@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: message.proto
// protoc v5.27.3
// source: p2p/transport/webrtc/pb/message.proto
package pb
@@ -64,11 +64,11 @@ func (x Message_Flag) String() string {
}
func (Message_Flag) Descriptor() protoreflect.EnumDescriptor {
return file_message_proto_enumTypes[0].Descriptor()
return file_p2p_transport_webrtc_pb_message_proto_enumTypes[0].Descriptor()
}
func (Message_Flag) Type() protoreflect.EnumType {
return &file_message_proto_enumTypes[0]
return &file_p2p_transport_webrtc_pb_message_proto_enumTypes[0]
}
func (x Message_Flag) Number() protoreflect.EnumNumber {
@@ -87,7 +87,7 @@ func (x *Message_Flag) UnmarshalJSON(b []byte) error {
// Deprecated: Use Message_Flag.Descriptor instead.
func (Message_Flag) EnumDescriptor() ([]byte, []int) {
return file_message_proto_rawDescGZIP(), []int{0, 0}
return file_p2p_transport_webrtc_pb_message_proto_rawDescGZIP(), []int{0, 0}
}
type Message struct {
@@ -102,7 +102,7 @@ type Message struct {
func (x *Message) Reset() {
*x = Message{}
if protoimpl.UnsafeEnabled {
mi := &file_message_proto_msgTypes[0]
mi := &file_p2p_transport_webrtc_pb_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -115,7 +115,7 @@ func (x *Message) String() string {
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_message_proto_msgTypes[0]
mi := &file_p2p_transport_webrtc_pb_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -128,7 +128,7 @@ func (x *Message) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_message_proto_rawDescGZIP(), []int{0}
return file_p2p_transport_webrtc_pb_message_proto_rawDescGZIP(), []int{0}
}
func (x *Message) GetFlag() Message_Flag {
@@ -145,43 +145,45 @@ func (x *Message) GetMessage() []byte {
return nil
}
var File_message_proto protoreflect.FileDescriptor
var File_p2p_transport_webrtc_pb_message_proto protoreflect.FileDescriptor
var file_message_proto_rawDesc = []byte{
0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x81, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x66,
0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x18,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x39, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67,
0x12, 0x07, 0x0a, 0x03, 0x46, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x4f,
0x50, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52,
0x45, 0x53, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x49, 0x4e, 0x5f, 0x41, 0x43,
0x4b, 0x10, 0x03, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70,
0x32, 0x70, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74,
0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, 0x70, 0x62,
var file_p2p_transport_webrtc_pb_message_proto_rawDesc = []byte{
0x0a, 0x25, 0x70, 0x32, 0x70, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f,
0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x0d, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x6c, 0x61, 0x67,
0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x22, 0x39, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x49, 0x4e, 0x10,
0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x49, 0x4e,
0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0b,
0x0a, 0x07, 0x46, 0x49, 0x4e, 0x5f, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x42, 0x35, 0x5a, 0x33, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70,
0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x69, 0x62, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x74,
0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x2f,
0x70, 0x62,
}
var (
file_message_proto_rawDescOnce sync.Once
file_message_proto_rawDescData = file_message_proto_rawDesc
file_p2p_transport_webrtc_pb_message_proto_rawDescOnce sync.Once
file_p2p_transport_webrtc_pb_message_proto_rawDescData = file_p2p_transport_webrtc_pb_message_proto_rawDesc
)
func file_message_proto_rawDescGZIP() []byte {
file_message_proto_rawDescOnce.Do(func() {
file_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_proto_rawDescData)
func file_p2p_transport_webrtc_pb_message_proto_rawDescGZIP() []byte {
file_p2p_transport_webrtc_pb_message_proto_rawDescOnce.Do(func() {
file_p2p_transport_webrtc_pb_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_transport_webrtc_pb_message_proto_rawDescData)
})
return file_message_proto_rawDescData
return file_p2p_transport_webrtc_pb_message_proto_rawDescData
}
var file_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_message_proto_goTypes = []any{
var file_p2p_transport_webrtc_pb_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_p2p_transport_webrtc_pb_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_p2p_transport_webrtc_pb_message_proto_goTypes = []any{
(Message_Flag)(0), // 0: Message.Flag
(*Message)(nil), // 1: Message
}
var file_message_proto_depIdxs = []int32{
var file_p2p_transport_webrtc_pb_message_proto_depIdxs = []int32{
0, // 0: Message.flag:type_name -> Message.Flag
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
@@ -190,13 +192,13 @@ var file_message_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_message_proto_init() }
func file_message_proto_init() {
if File_message_proto != nil {
func init() { file_p2p_transport_webrtc_pb_message_proto_init() }
func file_p2p_transport_webrtc_pb_message_proto_init() {
if File_p2p_transport_webrtc_pb_message_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_message_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_p2p_transport_webrtc_pb_message_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Message); i {
case 0:
return &v.state
@@ -213,19 +215,19 @@ func file_message_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_message_proto_rawDesc,
RawDescriptor: file_p2p_transport_webrtc_pb_message_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_message_proto_goTypes,
DependencyIndexes: file_message_proto_depIdxs,
EnumInfos: file_message_proto_enumTypes,
MessageInfos: file_message_proto_msgTypes,
GoTypes: file_p2p_transport_webrtc_pb_message_proto_goTypes,
DependencyIndexes: file_p2p_transport_webrtc_pb_message_proto_depIdxs,
EnumInfos: file_p2p_transport_webrtc_pb_message_proto_enumTypes,
MessageInfos: file_p2p_transport_webrtc_pb_message_proto_msgTypes,
}.Build()
File_message_proto = out.File
file_message_proto_rawDesc = nil
file_message_proto_goTypes = nil
file_message_proto_depIdxs = nil
File_p2p_transport_webrtc_pb_message_proto = out.File
file_p2p_transport_webrtc_pb_message_proto_rawDesc = nil
file_p2p_transport_webrtc_pb_message_proto_goTypes = nil
file_p2p_transport_webrtc_pb_message_proto_depIdxs = nil
}

38
proto_test.go Normal file
View File

@@ -0,0 +1,38 @@
package libp2p_test
import (
"testing"
// Import all protobuf packages to ensure their `init` functions run.
// This may not be strictly necessary if they are imported in the `libp2p` package, but
// we do it here in case the imports in non-test files change.
_ "github.com/libp2p/go-libp2p/core/crypto/pb"
_ "github.com/libp2p/go-libp2p/core/peer/pb"
_ "github.com/libp2p/go-libp2p/core/record/pb"
_ "github.com/libp2p/go-libp2p/core/sec/insecure/pb"
_ "github.com/libp2p/go-libp2p/p2p/host/autonat/pb"
_ "github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds/pb"
_ "github.com/libp2p/go-libp2p/p2p/protocol/autonatv2/pb"
_ "github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/pb"
_ "github.com/libp2p/go-libp2p/p2p/protocol/holepunch/pb"
_ "github.com/libp2p/go-libp2p/p2p/protocol/identify/pb"
_ "github.com/libp2p/go-libp2p/p2p/security/noise/pb"
_ "github.com/libp2p/go-libp2p/p2p/transport/webrtc/pb"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/reflect/protoregistry"
)
//go:generate scripts/gen-proto.sh .
func TestProtoImportsAndPathsAreConsistent(t *testing.T) {
protoregistry.GlobalFiles.RangeFiles(func(fd protoreflect.FileDescriptor) bool {
imports := fd.Imports()
for i := 0; i < imports.Len(); i++ {
path := imports.Get(i).Path()
if _, err := protoregistry.GlobalFiles.FindFileByPath(path); err != nil {
t.Fatalf("find dependency %s: %v", path, err)
}
}
return true
})
}

27
scripts/gen-proto.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -eou pipefail
root=$1
proto_array=(
core/crypto/pb/crypto.proto
core/record/pb/envelope.proto
core/peer/pb/peer_record.proto
core/sec/insecure/pb/plaintext.proto
p2p/host/autonat/pb/autonat.proto
p2p/security/noise/pb/payload.proto
p2p/transport/webrtc/pb/message.proto
p2p/protocol/identify/pb/identify.proto
p2p/protocol/circuitv2/pb/circuit.proto
p2p/protocol/circuitv2/pb/voucher.proto
p2p/protocol/autonatv2/pb/autonatv2.proto
p2p/protocol/holepunch/pb/holepunch.proto
p2p/host/peerstore/pstoreds/pb/pstore.proto
)
proto_paths=""
for path in "${proto_array[@]}"; do
proto_paths+="$path "
done
protoc --proto_path=$root --go_out=$root --go_opt=paths=source_relative $proto_paths