Files
netbird/shared/signal/proto/signalexchange.pb.go
2026-05-18 18:08:20 +02:00

544 lines
16 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v6.33.1
// source: signalexchange.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Message type
type Body_Type int32
const (
Body_OFFER Body_Type = 0
Body_ANSWER Body_Type = 1
Body_CANDIDATE Body_Type = 2
Body_MODE Body_Type = 4
Body_GO_IDLE Body_Type = 5
)
// Enum value maps for Body_Type.
var (
Body_Type_name = map[int32]string{
0: "OFFER",
1: "ANSWER",
2: "CANDIDATE",
4: "MODE",
5: "GO_IDLE",
}
Body_Type_value = map[string]int32{
"OFFER": 0,
"ANSWER": 1,
"CANDIDATE": 2,
"MODE": 4,
"GO_IDLE": 5,
}
)
func (x Body_Type) Enum() *Body_Type {
p := new(Body_Type)
*p = x
return p
}
func (x Body_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Body_Type) Descriptor() protoreflect.EnumDescriptor {
return file_signalexchange_proto_enumTypes[0].Descriptor()
}
func (Body_Type) Type() protoreflect.EnumType {
return &file_signalexchange_proto_enumTypes[0]
}
func (x Body_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Body_Type.Descriptor instead.
func (Body_Type) EnumDescriptor() ([]byte, []int) {
return file_signalexchange_proto_rawDescGZIP(), []int{2, 0}
}
// Used for sending through signal.
// The body of this message is the Body message encrypted with the Wireguard private key and the remote Peer key
type EncryptedMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Wireguard public key
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// Wireguard public key of the remote peer to connect to
RemoteKey string `protobuf:"bytes,3,opt,name=remoteKey,proto3" json:"remoteKey,omitempty"`
// encrypted message Body
Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *EncryptedMessage) Reset() {
*x = EncryptedMessage{}
mi := &file_signalexchange_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *EncryptedMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EncryptedMessage) ProtoMessage() {}
func (x *EncryptedMessage) ProtoReflect() protoreflect.Message {
mi := &file_signalexchange_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EncryptedMessage.ProtoReflect.Descriptor instead.
func (*EncryptedMessage) Descriptor() ([]byte, []int) {
return file_signalexchange_proto_rawDescGZIP(), []int{0}
}
func (x *EncryptedMessage) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *EncryptedMessage) GetRemoteKey() string {
if x != nil {
return x.RemoteKey
}
return ""
}
func (x *EncryptedMessage) GetBody() []byte {
if x != nil {
return x.Body
}
return nil
}
// A decrypted representation of the EncryptedMessage. Used locally before/after encryption
type Message struct {
state protoimpl.MessageState `protogen:"open.v1"`
// WireGuard public key
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// WireGuard public key of the remote peer to connect to
RemoteKey string `protobuf:"bytes,3,opt,name=remoteKey,proto3" json:"remoteKey,omitempty"`
Body *Body `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Message) Reset() {
*x = Message{}
mi := &file_signalexchange_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Message) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_signalexchange_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_signalexchange_proto_rawDescGZIP(), []int{1}
}
func (x *Message) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *Message) GetRemoteKey() string {
if x != nil {
return x.RemoteKey
}
return ""
}
func (x *Message) GetBody() *Body {
if x != nil {
return x.Body
}
return nil
}
// Actual body of the message that can contain credentials (type OFFER/ANSWER) or connection Candidate
// This part will be encrypted
type Body struct {
state protoimpl.MessageState `protogen:"open.v1"`
Type Body_Type `protobuf:"varint,1,opt,name=type,proto3,enum=signalexchange.Body_Type" json:"type,omitempty"`
Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
// wgListenPort is an actual WireGuard listen port
WgListenPort uint32 `protobuf:"varint,3,opt,name=wgListenPort,proto3" json:"wgListenPort,omitempty"`
NetBirdVersion string `protobuf:"bytes,4,opt,name=netBirdVersion,proto3" json:"netBirdVersion,omitempty"`
Mode *Mode `protobuf:"bytes,5,opt,name=mode,proto3" json:"mode,omitempty"`
// featuresSupported list of supported features by the client of this protocol
FeaturesSupported []uint32 `protobuf:"varint,6,rep,packed,name=featuresSupported,proto3" json:"featuresSupported,omitempty"`
// RosenpassConfig is a Rosenpass config of the remote peer our peer tries to connect to
RosenpassConfig *RosenpassConfig `protobuf:"bytes,7,opt,name=rosenpassConfig,proto3" json:"rosenpassConfig,omitempty"`
// relayServerAddress is url of the relay server
RelayServerAddress *string `protobuf:"bytes,8,opt,name=relayServerAddress,proto3,oneof" json:"relayServerAddress,omitempty"`
SessionId []byte `protobuf:"bytes,10,opt,name=sessionId,proto3,oneof" json:"sessionId,omitempty"`
// relayServerIP is the IP the sender is connected to on its relay server,
// encoded as 4 bytes (IPv4) or 16 bytes (IPv6). Receivers may use it as a
// fallback dial target when DNS resolution of relayServerAddress fails.
// SNI/TLS verification still uses relayServerAddress.
RelayServerIP []byte `protobuf:"bytes,11,opt,name=relayServerIP,proto3,oneof" json:"relayServerIP,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Body) Reset() {
*x = Body{}
mi := &file_signalexchange_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Body) ProtoMessage() {}
func (x *Body) ProtoReflect() protoreflect.Message {
mi := &file_signalexchange_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Body.ProtoReflect.Descriptor instead.
func (*Body) Descriptor() ([]byte, []int) {
return file_signalexchange_proto_rawDescGZIP(), []int{2}
}
func (x *Body) GetType() Body_Type {
if x != nil {
return x.Type
}
return Body_OFFER
}
func (x *Body) GetPayload() string {
if x != nil {
return x.Payload
}
return ""
}
func (x *Body) GetWgListenPort() uint32 {
if x != nil {
return x.WgListenPort
}
return 0
}
func (x *Body) GetNetBirdVersion() string {
if x != nil {
return x.NetBirdVersion
}
return ""
}
func (x *Body) GetMode() *Mode {
if x != nil {
return x.Mode
}
return nil
}
func (x *Body) GetFeaturesSupported() []uint32 {
if x != nil {
return x.FeaturesSupported
}
return nil
}
func (x *Body) GetRosenpassConfig() *RosenpassConfig {
if x != nil {
return x.RosenpassConfig
}
return nil
}
func (x *Body) GetRelayServerAddress() string {
if x != nil && x.RelayServerAddress != nil {
return *x.RelayServerAddress
}
return ""
}
func (x *Body) GetSessionId() []byte {
if x != nil {
return x.SessionId
}
return nil
}
func (x *Body) GetRelayServerIP() []byte {
if x != nil {
return x.RelayServerIP
}
return nil
}
// Mode indicates a connection mode
type Mode struct {
state protoimpl.MessageState `protogen:"open.v1"`
Direct *bool `protobuf:"varint,1,opt,name=direct,proto3,oneof" json:"direct,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Mode) Reset() {
*x = Mode{}
mi := &file_signalexchange_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Mode) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Mode) ProtoMessage() {}
func (x *Mode) ProtoReflect() protoreflect.Message {
mi := &file_signalexchange_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Mode.ProtoReflect.Descriptor instead.
func (*Mode) Descriptor() ([]byte, []int) {
return file_signalexchange_proto_rawDescGZIP(), []int{3}
}
func (x *Mode) GetDirect() bool {
if x != nil && x.Direct != nil {
return *x.Direct
}
return false
}
type RosenpassConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
RosenpassPubKey []byte `protobuf:"bytes,1,opt,name=rosenpassPubKey,proto3" json:"rosenpassPubKey,omitempty"`
// rosenpassServerAddr is an IP:port of the rosenpass service
RosenpassServerAddr string `protobuf:"bytes,2,opt,name=rosenpassServerAddr,proto3" json:"rosenpassServerAddr,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RosenpassConfig) Reset() {
*x = RosenpassConfig{}
mi := &file_signalexchange_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RosenpassConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RosenpassConfig) ProtoMessage() {}
func (x *RosenpassConfig) ProtoReflect() protoreflect.Message {
mi := &file_signalexchange_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RosenpassConfig.ProtoReflect.Descriptor instead.
func (*RosenpassConfig) Descriptor() ([]byte, []int) {
return file_signalexchange_proto_rawDescGZIP(), []int{4}
}
func (x *RosenpassConfig) GetRosenpassPubKey() []byte {
if x != nil {
return x.RosenpassPubKey
}
return nil
}
func (x *RosenpassConfig) GetRosenpassServerAddr() string {
if x != nil {
return x.RosenpassServerAddr
}
return ""
}
var File_signalexchange_proto protoreflect.FileDescriptor
const file_signalexchange_proto_rawDesc = "" +
"\n" +
"\x14signalexchange.proto\x12\x0esignalexchange\x1a google/protobuf/descriptor.proto\"V\n" +
"\x10EncryptedMessage\x12\x10\n" +
"\x03key\x18\x02 \x01(\tR\x03key\x12\x1c\n" +
"\tremoteKey\x18\x03 \x01(\tR\tremoteKey\x12\x12\n" +
"\x04body\x18\x04 \x01(\fR\x04body\"c\n" +
"\aMessage\x12\x10\n" +
"\x03key\x18\x02 \x01(\tR\x03key\x12\x1c\n" +
"\tremoteKey\x18\x03 \x01(\tR\tremoteKey\x12(\n" +
"\x04body\x18\x04 \x01(\v2\x14.signalexchange.BodyR\x04body\"\xc3\x04\n" +
"\x04Body\x12-\n" +
"\x04type\x18\x01 \x01(\x0e2\x19.signalexchange.Body.TypeR\x04type\x12\x18\n" +
"\apayload\x18\x02 \x01(\tR\apayload\x12\"\n" +
"\fwgListenPort\x18\x03 \x01(\rR\fwgListenPort\x12&\n" +
"\x0enetBirdVersion\x18\x04 \x01(\tR\x0enetBirdVersion\x12(\n" +
"\x04mode\x18\x05 \x01(\v2\x14.signalexchange.ModeR\x04mode\x12,\n" +
"\x11featuresSupported\x18\x06 \x03(\rR\x11featuresSupported\x12I\n" +
"\x0frosenpassConfig\x18\a \x01(\v2\x1f.signalexchange.RosenpassConfigR\x0frosenpassConfig\x123\n" +
"\x12relayServerAddress\x18\b \x01(\tH\x00R\x12relayServerAddress\x88\x01\x01\x12!\n" +
"\tsessionId\x18\n" +
" \x01(\fH\x01R\tsessionId\x88\x01\x01\x12)\n" +
"\rrelayServerIP\x18\v \x01(\fH\x02R\rrelayServerIP\x88\x01\x01\"C\n" +
"\x04Type\x12\t\n" +
"\x05OFFER\x10\x00\x12\n" +
"\n" +
"\x06ANSWER\x10\x01\x12\r\n" +
"\tCANDIDATE\x10\x02\x12\b\n" +
"\x04MODE\x10\x04\x12\v\n" +
"\aGO_IDLE\x10\x05B\x15\n" +
"\x13_relayServerAddressB\f\n" +
"\n" +
"_sessionIdB\x10\n" +
"\x0e_relayServerIPJ\x04\b\t\x10\n" +
"\".\n" +
"\x04Mode\x12\x1b\n" +
"\x06direct\x18\x01 \x01(\bH\x00R\x06direct\x88\x01\x01B\t\n" +
"\a_direct\"m\n" +
"\x0fRosenpassConfig\x12(\n" +
"\x0frosenpassPubKey\x18\x01 \x01(\fR\x0frosenpassPubKey\x120\n" +
"\x13rosenpassServerAddr\x18\x02 \x01(\tR\x13rosenpassServerAddr2\xb9\x01\n" +
"\x0eSignalExchange\x12L\n" +
"\x04Send\x12 .signalexchange.EncryptedMessage\x1a .signalexchange.EncryptedMessage\"\x00\x12Y\n" +
"\rConnectStream\x12 .signalexchange.EncryptedMessage\x1a .signalexchange.EncryptedMessage\"\x00(\x010\x01B\bZ\x06/protob\x06proto3"
var (
file_signalexchange_proto_rawDescOnce sync.Once
file_signalexchange_proto_rawDescData []byte
)
func file_signalexchange_proto_rawDescGZIP() []byte {
file_signalexchange_proto_rawDescOnce.Do(func() {
file_signalexchange_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalexchange_proto_rawDesc), len(file_signalexchange_proto_rawDesc)))
})
return file_signalexchange_proto_rawDescData
}
var file_signalexchange_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_signalexchange_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_signalexchange_proto_goTypes = []any{
(Body_Type)(0), // 0: signalexchange.Body.Type
(*EncryptedMessage)(nil), // 1: signalexchange.EncryptedMessage
(*Message)(nil), // 2: signalexchange.Message
(*Body)(nil), // 3: signalexchange.Body
(*Mode)(nil), // 4: signalexchange.Mode
(*RosenpassConfig)(nil), // 5: signalexchange.RosenpassConfig
}
var file_signalexchange_proto_depIdxs = []int32{
3, // 0: signalexchange.Message.body:type_name -> signalexchange.Body
0, // 1: signalexchange.Body.type:type_name -> signalexchange.Body.Type
4, // 2: signalexchange.Body.mode:type_name -> signalexchange.Mode
5, // 3: signalexchange.Body.rosenpassConfig:type_name -> signalexchange.RosenpassConfig
1, // 4: signalexchange.SignalExchange.Send:input_type -> signalexchange.EncryptedMessage
1, // 5: signalexchange.SignalExchange.ConnectStream:input_type -> signalexchange.EncryptedMessage
1, // 6: signalexchange.SignalExchange.Send:output_type -> signalexchange.EncryptedMessage
1, // 7: signalexchange.SignalExchange.ConnectStream:output_type -> signalexchange.EncryptedMessage
6, // [6:8] is the sub-list for method output_type
4, // [4:6] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_signalexchange_proto_init() }
func file_signalexchange_proto_init() {
if File_signalexchange_proto != nil {
return
}
file_signalexchange_proto_msgTypes[2].OneofWrappers = []any{}
file_signalexchange_proto_msgTypes[3].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalexchange_proto_rawDesc), len(file_signalexchange_proto_rawDesc)),
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_signalexchange_proto_goTypes,
DependencyIndexes: file_signalexchange_proto_depIdxs,
EnumInfos: file_signalexchange_proto_enumTypes,
MessageInfos: file_signalexchange_proto_msgTypes,
}.Build()
File_signalexchange_proto = out.File
file_signalexchange_proto_goTypes = nil
file_signalexchange_proto_depIdxs = nil
}