Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSignalExchangeServer(s grpc.ServiceRegistrar, srv SignalExchangeServer)
- type Body
- func (*Body) Descriptor() ([]byte, []int)deprecated
- func (x *Body) GetFeaturesSupported() []uint32
- func (x *Body) GetMode() *Mode
- func (x *Body) GetNetBirdVersion() string
- func (x *Body) GetPayload() string
- func (x *Body) GetRosenpassConfig() *RosenpassConfig
- func (x *Body) GetType() Body_Type
- func (x *Body) GetWgListenPort() uint32
- func (*Body) ProtoMessage()
- func (x *Body) ProtoReflect() protoreflect.Message
- func (x *Body) Reset()
- func (x *Body) String() string
- type Body_Type
- type EncryptedMessage
- func (*EncryptedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptedMessage) GetBody() []byte
- func (x *EncryptedMessage) GetKey() string
- func (x *EncryptedMessage) GetRemoteKey() string
- func (*EncryptedMessage) ProtoMessage()
- func (x *EncryptedMessage) ProtoReflect() protoreflect.Message
- func (x *EncryptedMessage) Reset()
- func (x *EncryptedMessage) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetBody() *Body
- func (x *Message) GetKey() string
- func (x *Message) GetRemoteKey() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Mode
- type RosenpassConfig
- func (*RosenpassConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RosenpassConfig) GetRosenpassPubKey() []byte
- func (x *RosenpassConfig) GetRosenpassServerAddr() string
- func (*RosenpassConfig) ProtoMessage()
- func (x *RosenpassConfig) ProtoReflect() protoreflect.Message
- func (x *RosenpassConfig) Reset()
- func (x *RosenpassConfig) String() string
- type SignalExchangeClient
- type SignalExchangeServer
- type SignalExchange_ConnectStreamClient
- type SignalExchange_ConnectStreamServer
- type UnimplementedSignalExchangeServer
- type UnsafeSignalExchangeServer
Constants ¶
const HeaderId = "x-wiretrustee-peer-id"
protocol constants, field names that can be used by both client and server
const HeaderRegistered = "x-wiretrustee-peer-registered"
Variables ¶
var ( Body_Type_name = map[int32]string{ 0: "OFFER", 1: "ANSWER", 2: "CANDIDATE", 4: "MODE", } Body_Type_value = map[string]int32{ "OFFER": 0, "ANSWER": 1, "CANDIDATE": 2, "MODE": 4, } )
Enum value maps for Body_Type.
var File_signalexchange_proto protoreflect.FileDescriptor
var SignalExchange_ServiceDesc = grpc.ServiceDesc{ ServiceName: "signalexchange.SignalExchange", HandlerType: (*SignalExchangeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Send", Handler: _SignalExchange_Send_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ConnectStream", Handler: _SignalExchange_ConnectStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "signalexchange.proto", }
SignalExchange_ServiceDesc is the grpc.ServiceDesc for SignalExchange service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSignalExchangeServer ¶
func RegisterSignalExchangeServer(s grpc.ServiceRegistrar, srv SignalExchangeServer)
Types ¶
type Body ¶
type Body struct { 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"` // contains filtered or unexported fields }
Actual body of the message that can contain credentials (type OFFER/ANSWER) or connection Candidate This part will be encrypted
func (*Body) Descriptor
deprecated
func (*Body) GetFeaturesSupported ¶
func (*Body) GetNetBirdVersion ¶
func (*Body) GetPayload ¶
func (*Body) GetRosenpassConfig ¶
func (x *Body) GetRosenpassConfig() *RosenpassConfig
func (*Body) GetWgListenPort ¶
func (*Body) ProtoMessage ¶
func (*Body) ProtoMessage()
func (*Body) ProtoReflect ¶
func (x *Body) ProtoReflect() protoreflect.Message
type Body_Type ¶
type Body_Type int32
Message type
func (Body_Type) Descriptor ¶
func (Body_Type) Descriptor() protoreflect.EnumDescriptor
func (Body_Type) EnumDescriptor
deprecated
func (Body_Type) Number ¶
func (x Body_Type) Number() protoreflect.EnumNumber
func (Body_Type) Type ¶
func (Body_Type) Type() protoreflect.EnumType
type EncryptedMessage ¶
type EncryptedMessage struct { // 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"` // contains filtered or unexported fields }
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
func (*EncryptedMessage) Descriptor
deprecated
func (*EncryptedMessage) Descriptor() ([]byte, []int)
Deprecated: Use EncryptedMessage.ProtoReflect.Descriptor instead.
func (*EncryptedMessage) GetBody ¶
func (x *EncryptedMessage) GetBody() []byte
func (*EncryptedMessage) GetKey ¶
func (x *EncryptedMessage) GetKey() string
func (*EncryptedMessage) GetRemoteKey ¶
func (x *EncryptedMessage) GetRemoteKey() string
func (*EncryptedMessage) ProtoMessage ¶
func (*EncryptedMessage) ProtoMessage()
func (*EncryptedMessage) ProtoReflect ¶
func (x *EncryptedMessage) ProtoReflect() protoreflect.Message
func (*EncryptedMessage) Reset ¶
func (x *EncryptedMessage) Reset()
func (*EncryptedMessage) String ¶
func (x *EncryptedMessage) String() string
type Message ¶
type Message struct { // 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"` // contains filtered or unexported fields }
A decrypted representation of the EncryptedMessage. Used locally before/after encryption
func (*Message) Descriptor
deprecated
func (*Message) GetRemoteKey ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Mode ¶
type Mode struct { Direct *bool `protobuf:"varint,1,opt,name=direct,proto3,oneof" json:"direct,omitempty"` // contains filtered or unexported fields }
Mode indicates a connection mode
func (*Mode) Descriptor
deprecated
func (*Mode) ProtoMessage ¶
func (*Mode) ProtoMessage()
func (*Mode) ProtoReflect ¶
func (x *Mode) ProtoReflect() protoreflect.Message
type RosenpassConfig ¶
type RosenpassConfig struct { 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"` // contains filtered or unexported fields }
func (*RosenpassConfig) Descriptor
deprecated
func (*RosenpassConfig) Descriptor() ([]byte, []int)
Deprecated: Use RosenpassConfig.ProtoReflect.Descriptor instead.
func (*RosenpassConfig) GetRosenpassPubKey ¶
func (x *RosenpassConfig) GetRosenpassPubKey() []byte
func (*RosenpassConfig) GetRosenpassServerAddr ¶
func (x *RosenpassConfig) GetRosenpassServerAddr() string
func (*RosenpassConfig) ProtoMessage ¶
func (*RosenpassConfig) ProtoMessage()
func (*RosenpassConfig) ProtoReflect ¶
func (x *RosenpassConfig) ProtoReflect() protoreflect.Message
func (*RosenpassConfig) Reset ¶
func (x *RosenpassConfig) Reset()
func (*RosenpassConfig) String ¶
func (x *RosenpassConfig) String() string
type SignalExchangeClient ¶
type SignalExchangeClient interface { // Synchronously connect to the Signal Exchange service offering connection candidates and waiting for connection candidates from the other party (remote peer) Send(ctx context.Context, in *EncryptedMessage, opts ...grpc.CallOption) (*EncryptedMessage, error) // Connect to the Signal Exchange service offering connection candidates and maintain a channel for receiving candidates from the other party (remote peer) ConnectStream(ctx context.Context, opts ...grpc.CallOption) (SignalExchange_ConnectStreamClient, error) }
SignalExchangeClient is the client API for SignalExchange service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSignalExchangeClient ¶
func NewSignalExchangeClient(cc grpc.ClientConnInterface) SignalExchangeClient
type SignalExchangeServer ¶
type SignalExchangeServer interface { // Synchronously connect to the Signal Exchange service offering connection candidates and waiting for connection candidates from the other party (remote peer) Send(context.Context, *EncryptedMessage) (*EncryptedMessage, error) // Connect to the Signal Exchange service offering connection candidates and maintain a channel for receiving candidates from the other party (remote peer) ConnectStream(SignalExchange_ConnectStreamServer) error // contains filtered or unexported methods }
SignalExchangeServer is the server API for SignalExchange service. All implementations must embed UnimplementedSignalExchangeServer for forward compatibility
type SignalExchange_ConnectStreamClient ¶
type SignalExchange_ConnectStreamClient interface { Send(*EncryptedMessage) error Recv() (*EncryptedMessage, error) grpc.ClientStream }
type SignalExchange_ConnectStreamServer ¶
type SignalExchange_ConnectStreamServer interface { Send(*EncryptedMessage) error Recv() (*EncryptedMessage, error) grpc.ServerStream }
type UnimplementedSignalExchangeServer ¶
type UnimplementedSignalExchangeServer struct { }
UnimplementedSignalExchangeServer must be embedded to have forward compatible implementations.
func (UnimplementedSignalExchangeServer) ConnectStream ¶
func (UnimplementedSignalExchangeServer) ConnectStream(SignalExchange_ConnectStreamServer) error
func (UnimplementedSignalExchangeServer) Send ¶
func (UnimplementedSignalExchangeServer) Send(context.Context, *EncryptedMessage) (*EncryptedMessage, error)
type UnsafeSignalExchangeServer ¶
type UnsafeSignalExchangeServer interface {
// contains filtered or unexported methods
}
UnsafeSignalExchangeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignalExchangeServer will result in compilation errors.