diff --git a/common/messages.pb.go b/common/messages.pb.go index 894e33f..f2eb73f 100644 --- a/common/messages.pb.go +++ b/common/messages.pb.go @@ -456,6 +456,7 @@ type WireGuardPeer struct { PublicUdp6Endpoint string `protobuf:"bytes,7,opt,name=public_udp6_endpoint,json=publicUdp6Endpoint,proto3" json:"public_udp6_endpoint,omitempty"` // endpoint for UDP peer-to-peer communication over IPv6 (public IPv6 + port as seen from the Internet) Type PeerType `protobuf:"varint,8,opt,name=type,proto3,enum=border0.common.v1.PeerType" json:"type,omitempty"` // client or connector Services []*Service `protobuf:"bytes,9,rep,name=services,proto3" json:"services,omitempty"` // applicable only when PeerType == PEER_TYPE_CONNECTOR + Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"` // device (client or connector) name } func (x *WireGuardPeer) Reset() { @@ -554,6 +555,13 @@ func (x *WireGuardPeer) GetServices() []*Service { return nil } +func (x *WireGuardPeer) GetName() string { + if x != nil { + return x.Name + } + return "" +} + type Service struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -734,7 +742,7 @@ var file_messages_proto_rawDesc = []byte{ 0x56, 0x34, 0x12, 0x39, 0x0a, 0x19, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x5f, 0x76, 0x36, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x69, 0x64, 0x72, 0x56, 0x36, 0x22, 0x9b, 0x03, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x69, 0x64, 0x72, 0x56, 0x36, 0x22, 0xaf, 0x03, 0x0a, 0x0d, 0x57, 0x69, 0x72, 0x65, 0x47, 0x75, 0x61, 0x72, 0x64, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x12, @@ -760,33 +768,34 @@ var file_messages_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x07, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x70, - 0x76, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, - 0x75, 0x62, 0x6e, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x11, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x26, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x2a, 0x50, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, - 0x50, 0x45, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x45, 0x45, - 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, - 0x10, 0x02, 0x2a, 0x37, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, - 0x5f, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x7a, 0x65, 0x72, 0x6f, 0x2f, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x7e, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, + 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, + 0x53, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x2a, 0x50, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x45, 0x45, 0x52, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, + 0x13, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x37, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, + 0x52, 0x56, 0x45, 0x52, 0x5f, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x42, + 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x7a, 0x65, 0x72, 0x6f, 0x2f, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, + 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/common/messages.pb.swift b/common/messages.pb.swift index ad88eeb..8758260 100644 --- a/common/messages.pb.swift +++ b/common/messages.pb.swift @@ -223,6 +223,9 @@ struct Border0_Common_V1_WireGuardPeer: Sendable { /// applicable only when PeerType == PEER_TYPE_CONNECTOR var services: [Border0_Common_V1_Service] = [] + /// device (client or connector) name + var name: String = String() + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} @@ -515,6 +518,7 @@ extension Border0_Common_V1_WireGuardPeer: SwiftProtobuf.Message, SwiftProtobuf. 7: .standard(proto: "public_udp6_endpoint"), 8: .same(proto: "type"), 9: .same(proto: "services"), + 10: .same(proto: "name"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -532,6 +536,7 @@ extension Border0_Common_V1_WireGuardPeer: SwiftProtobuf.Message, SwiftProtobuf. case 7: try { try decoder.decodeSingularStringField(value: &self.publicUdp6Endpoint) }() case 8: try { try decoder.decodeSingularEnumField(value: &self.type) }() case 9: try { try decoder.decodeRepeatedMessageField(value: &self.services) }() + case 10: try { try decoder.decodeSingularStringField(value: &self.name) }() default: break } } @@ -565,6 +570,9 @@ extension Border0_Common_V1_WireGuardPeer: SwiftProtobuf.Message, SwiftProtobuf. if !self.services.isEmpty { try visitor.visitRepeatedMessageField(value: self.services, fieldNumber: 9) } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 10) + } try unknownFields.traverse(visitor: &visitor) } @@ -578,6 +586,7 @@ extension Border0_Common_V1_WireGuardPeer: SwiftProtobuf.Message, SwiftProtobuf. if lhs.publicUdp6Endpoint != rhs.publicUdp6Endpoint {return false} if lhs.type != rhs.type {return false} if lhs.services != rhs.services {return false} + if lhs.name != rhs.name {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } diff --git a/common/messages.proto b/common/messages.proto index 1aaa62b..52430bd 100644 --- a/common/messages.proto +++ b/common/messages.proto @@ -47,6 +47,7 @@ message WireGuardPeer { string public_udp6_endpoint = 7; // endpoint for UDP peer-to-peer communication over IPv6 (public IPv6 + port as seen from the Internet) PeerType type = 8; // client or connector repeated Service services = 9; // applicable only when PeerType == PEER_TYPE_CONNECTOR + string name = 10; // device (client or connector) name } message Service {