subspacerelaypb

package module
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 6 Imported by: 2

README

Subspace Relay

This repo contains protobuf definitions for transferring RFID-related packets between processes, for example over MQTT.

This provides a general purpose framework for many sorts of use-cases involving connected readers and emulators, not just relaying a physical card to a physical reader over some distance. This enables patterns such as using a PCSC reader remotely over the internet to talk to a card or to write emulation code in a higher level language running on a computer that can interact with a physical reader.

There are two sides of the communication in Subspace Relay, the relay side which exposes a card/reader/etc, and a controller that utilises it. Relays are designed to be simple and controlled by the controller. Some patterns may involve a single controller application connecting to multiple relays while others may only talk to one relay.

Some patterns possible with Subspace Relay:

  • Talking to a card across the internet
  • Relaying a locally connected card to a remote emulator or vice versa
  • Relaying a remotely connected card to a remotely connected reader
  • "Soft" emulation of a card running on a computer being used to test a physical reader

Subspace Relay over MQTT

In theory messages can be sent over any protocol, in practice MQTT has been used to date but it could be easily substituted for any other protocol, ideally one with support for headers to enable request-response but this is not essential if concurrency is not used.

Identification and Encryption

The relay implementations generate a random relay_id, currently as a lowercase UUIDv7 with dashes stripped but any securely generated random identifier would work. The relay_id is then passed through pbkdf to derive the MQTT topic names and encryption keys. This means that if someone can only see the traffic on the MQTT broker they are unable to decrypt the communication.

Go Library

There is a Go library go-subspace-relay that leverages this protobuf schema to exchange messages over MQTT as well as some example applications that make use of the library.

Android App

subspace_relay_mobile is a flutter/dart Android app that uses Android HCE to emulate a card and NFC APIs to act as a reader.

The intention is to eventually support other modes such as acting as a controller, and using externally connected devices like the Chameleon Ultra as a reader or emulator too.

Generated Protobuf Libraries Usage

Use in other languages where there is not yet a higher level library, or if implementing Subspace Relay over a different transport you will need to use the generated protobuf libraries directly.

Go

The Go package can be consumed directly from GitHub with the following import:

import subspacerelaypb "github.com/nvx/subspace-relay"

In theory the Buf SDK could be used as well, but the module path handling isn't great, so consuming from GitHub is the preferable option.

Dart

Buf unfortunately does not host a fully featured Dart package repository so generated dart code has been published to pub.dev as subspace_relay_pb

Other Languages

Buf will automatically generate SDKs for supported languages from corresponding Buf repo https://buf.build/nvxx/subspace-relay You can also use this to import types into your own protobuf packages.

A full list of supported SDKs can be found at https://buf.build/nvxx/subspace-relay/sdks/main:protobuf

Python

Full instructions on consuming Buf generated SDKs in Python can be found at https://buf.build/docs/bsr/generated-sdks/python/

TLDR use pip --extra-index-url https://buf.build/gen/python or add the following to your pip.conf

[global]
extra-index-url = https://buf.build/gen/python

Then you can add the dependency with the following:

pip install nvxx-subspace-relay-protocolbuffers-python

uv and poetry are also supported, see https://buf.build/nvxx/subspace-relay/sdks/main:protocolbuffers/python for details

C#

Full instructions on consuming Buf generated SDKs in C# can be found at https://buf.build/docs/bsr/generated-sdks/nuget/

A copy-pastable version specific to this repo can be found at https://buf.build/nvxx/subspace-relay/sdks/main:protocolbuffers/csharp

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PayloadType_name = map[int32]string{
		0: "PAYLOAD_TYPE_UNSPECIFIED",
		1: "PAYLOAD_TYPE_ARTEMIS",
		2: "PAYLOAD_TYPE_CARDHOPPER",
		3: "PAYLOAD_TYPE_PCSC_READER",
		5: "PAYLOAD_TYPE_PCSC_READER_CONTROL",
		4: "PAYLOAD_TYPE_PCSC_CARD",
	}
	PayloadType_value = map[string]int32{
		"PAYLOAD_TYPE_UNSPECIFIED":         0,
		"PAYLOAD_TYPE_ARTEMIS":             1,
		"PAYLOAD_TYPE_CARDHOPPER":          2,
		"PAYLOAD_TYPE_PCSC_READER":         3,
		"PAYLOAD_TYPE_PCSC_READER_CONTROL": 5,
		"PAYLOAD_TYPE_PCSC_CARD":           4,
	}
)

Enum value maps for PayloadType.

View Source
var (
	ConnectionType_name = map[int32]string{
		0: "CONNECTION_TYPE_UNSPECIFIED",
		1: "CONNECTION_TYPE_PCSC",
		6: "CONNECTION_TYPE_PCSC_DIRECT",
		2: "CONNECTION_TYPE_UART",
		3: "CONNECTION_TYPE_OSDP",
		4: "CONNECTION_TYPE_NFC",
		5: "CONNECTION_TYPE_BLE",
	}
	ConnectionType_value = map[string]int32{
		"CONNECTION_TYPE_UNSPECIFIED": 0,
		"CONNECTION_TYPE_PCSC":        1,
		"CONNECTION_TYPE_PCSC_DIRECT": 6,
		"CONNECTION_TYPE_UART":        2,
		"CONNECTION_TYPE_OSDP":        3,
		"CONNECTION_TYPE_NFC":         4,
		"CONNECTION_TYPE_BLE":         5,
	}
)

Enum value maps for ConnectionType.

View Source
var File_nv_subspacerelay_subspacerelay_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConnectionType

type ConnectionType int32
const (
	ConnectionType_CONNECTION_TYPE_UNSPECIFIED ConnectionType = 0
	ConnectionType_CONNECTION_TYPE_PCSC        ConnectionType = 1
	ConnectionType_CONNECTION_TYPE_PCSC_DIRECT ConnectionType = 6
	ConnectionType_CONNECTION_TYPE_UART        ConnectionType = 2
	ConnectionType_CONNECTION_TYPE_OSDP        ConnectionType = 3
	ConnectionType_CONNECTION_TYPE_NFC         ConnectionType = 4
	ConnectionType_CONNECTION_TYPE_BLE         ConnectionType = 5
)

func (ConnectionType) Descriptor

func (ConnectionType) Enum

func (x ConnectionType) Enum() *ConnectionType

func (ConnectionType) EnumDescriptor deprecated

func (ConnectionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConnectionType.Descriptor instead.

func (ConnectionType) Number

func (ConnectionType) String

func (x ConnectionType) String() string

func (ConnectionType) Type

type EmulationShortcut added in v0.0.5

type EmulationShortcut struct {

	// cAPDU headers to match each value must be exactly 4 bytes (CLA INS P1 P2)
	// if omitted will wildcard match any header
	CapduHeader [][]byte `protobuf:"bytes,1,rep,name=capdu_header,json=capduHeader,proto3" json:"capdu_header,omitempty"`
	// data to match
	// if omitted will wildcard any data value
	CapduData [][]byte `protobuf:"bytes,2,rep,name=capdu_data,json=capduData,proto3" json:"capdu_data,omitempty"`
	// rAPDU to respond to the matching shortcut cAPDU
	Rapdu []byte `protobuf:"bytes,3,opt,name=rapdu,proto3" json:"rapdu,omitempty"`
	// if false after the first match the shortcut is forgotten
	// if true it will remain until disconnect or reconnect is received
	// persistent should only be specified for non rpc replies
	// if the persistent flag is present on chained_next fields that set of shortcuts will persist until it no longer matches
	Persistent bool `protobuf:"varint,4,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// if true shortcut will persist disconnect/reconnect cycles
	PersistReconnect bool `protobuf:"varint,7,opt,name=persist_reconnect,json=persistReconnect,proto3" json:"persist_reconnect,omitempty"`
	// if true the matching cAPDU received from the reader will be will be sent as a Payload back to the client
	SendCapdu bool `protobuf:"varint,5,opt,name=send_capdu,json=sendCapdu,proto3" json:"send_capdu,omitempty"`
	// expect the following as the immediate next shortcut to occur to enable response chaining
	// if the shortcut does not match the next cAPDU it is discarded
	ChainedNext []*EmulationShortcut `protobuf:"bytes,6,rep,name=chained_next,json=chainedNext,proto3" json:"chained_next,omitempty"`
	// contains filtered or unexported fields
}

func (*EmulationShortcut) Descriptor deprecated added in v0.0.5

func (*EmulationShortcut) Descriptor() ([]byte, []int)

Deprecated: Use EmulationShortcut.ProtoReflect.Descriptor instead.

func (*EmulationShortcut) GetCapduData added in v0.0.5

func (x *EmulationShortcut) GetCapduData() [][]byte

func (*EmulationShortcut) GetCapduHeader added in v0.0.5

func (x *EmulationShortcut) GetCapduHeader() [][]byte

func (*EmulationShortcut) GetChainedNext added in v0.0.5

func (x *EmulationShortcut) GetChainedNext() []*EmulationShortcut

func (*EmulationShortcut) GetPersistReconnect added in v0.0.8

func (x *EmulationShortcut) GetPersistReconnect() bool

func (*EmulationShortcut) GetPersistent added in v0.0.5

func (x *EmulationShortcut) GetPersistent() bool

func (*EmulationShortcut) GetRapdu added in v0.0.5

func (x *EmulationShortcut) GetRapdu() []byte

func (*EmulationShortcut) GetSendCapdu added in v0.0.5

func (x *EmulationShortcut) GetSendCapdu() bool

func (*EmulationShortcut) ProtoMessage added in v0.0.5

func (*EmulationShortcut) ProtoMessage()

func (*EmulationShortcut) ProtoReflect added in v0.0.5

func (x *EmulationShortcut) ProtoReflect() protoreflect.Message

func (*EmulationShortcut) Reset added in v0.0.5

func (x *EmulationShortcut) Reset()

func (*EmulationShortcut) String added in v0.0.5

func (x *EmulationShortcut) String() string

type Log

type Log struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

func (*Log) Descriptor() ([]byte, []int)

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetMessage

func (x *Log) GetMessage() string

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

func (x *Log) ProtoReflect() protoreflect.Message

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type Message

type Message struct {

	// Types that are valid to be assigned to Message:
	//
	//	*Message_Payload
	//	*Message_EmulationShortcut
	//	*Message_RequestRelayInfo
	//	*Message_RelayInfo
	//	*Message_Log
	//	*Message_Reconnect
	//	*Message_Disconnect
	//	*Message_RequestRelayDiscovery
	//	*Message_RelayDiscoveryPlaintext
	//	*Message_RelayDiscoveryEncrypted
	Message isMessage_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetDisconnect

func (x *Message) GetDisconnect() *emptypb.Empty

func (*Message) GetEmulationShortcut added in v0.0.5

func (x *Message) GetEmulationShortcut() *EmulationShortcut

func (*Message) GetLog

func (x *Message) GetLog() *Log

func (*Message) GetMessage

func (x *Message) GetMessage() isMessage_Message

func (*Message) GetPayload

func (x *Message) GetPayload() *Payload

func (*Message) GetReconnect

func (x *Message) GetReconnect() *Reconnect

func (*Message) GetRelayDiscoveryEncrypted added in v1.0.2

func (x *Message) GetRelayDiscoveryEncrypted() *RelayDiscoveryEncrypted

func (*Message) GetRelayDiscoveryPlaintext added in v1.0.2

func (x *Message) GetRelayDiscoveryPlaintext() *RelayDiscovery

func (*Message) GetRelayInfo added in v0.0.5

func (x *Message) GetRelayInfo() *RelayInfo

func (*Message) GetRequestRelayDiscovery added in v1.0.2

func (x *Message) GetRequestRelayDiscovery() *RequestRelayDiscovery

func (*Message) GetRequestRelayInfo added in v0.0.5

func (x *Message) GetRequestRelayInfo() *emptypb.Empty

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_Disconnect

type Message_Disconnect struct {
	Disconnect *emptypb.Empty `protobuf:"bytes,6,opt,name=disconnect,proto3,oneof"`
}

type Message_EmulationShortcut added in v0.0.5

type Message_EmulationShortcut struct {
	// Load an emulation shortcut config into a supported card emulation relay
	// Shortcuts preempt a cAPDU from the reader with a given rAPDU response to reduce round trip delays
	// if multiple shortcuts match precedence of which shortcut is used is determined by the following
	// 1. chained_next from the previously matched cAPDU
	// 2. non-persistent shortcuts are checked before persistent shortcuts
	// 3. chained_next fields containing multiple EmulationShortcuts will check earlier array entries first
	// 4. non-chained shortcuts with explicit cAPDU headers are checked before wildcard header matches
	// 5. non-chained shortcuts with explicit data matches are checked before wildcard data matches
	// 6. non-chained older shortcuts preferred over newer - this may not always hold true due to network conditions
	// shortcuts are flushed when disconnect or reconnect messages are received by a relay unless persist_reconnect is true
	EmulationShortcut *EmulationShortcut `protobuf:"bytes,7,opt,name=emulation_shortcut,json=emulationShortcut,proto3,oneof"`
}

type Message_Log

type Message_Log struct {
	Log *Log `protobuf:"bytes,4,opt,name=log,proto3,oneof"`
}

type Message_Payload

type Message_Payload struct {
	// Payloads exchanged between a relay and a controller
	Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3,oneof"`
}

type Message_Reconnect

type Message_Reconnect struct {
	// most connections are established automatically, or are driven ia external means (eg cardhopper entering a field)
	// but some remote-driven interactions (eg emulating a card) are still initiated from the local side (eg BLE) or
	// require setup (cardhopper emulation)
	Reconnect *Reconnect `protobuf:"bytes,5,opt,name=reconnect,proto3,oneof"`
}

type Message_RelayDiscoveryEncrypted added in v1.0.2

type Message_RelayDiscoveryEncrypted struct {
	RelayDiscoveryEncrypted *RelayDiscoveryEncrypted `protobuf:"bytes,10,opt,name=relay_discovery_encrypted,json=relayDiscoveryEncrypted,proto3,oneof"`
}

type Message_RelayDiscoveryPlaintext added in v1.0.2

type Message_RelayDiscoveryPlaintext struct {
	// If a relay has discovery enabled it will emit a relay_discovery_plaintext or relay_discovery_encrypted broadcast
	// message on startup and in response to a received request_discovery message.
	// Supporting plaintext discovery removes the cryptographic guarantees that a malicious broker or anything that can
	// see the broker traffic can not view comms when cryptography using relay_ids is enabled.
	// A relay with discovery enabled  will support both plaintext and encrypted discovery unless a whitelisted public
	// key is specified at which point only encrypted discovery messages will be supported and the startup broadcast
	// will be encrypted with he provided public key
	RelayDiscoveryPlaintext *RelayDiscovery `protobuf:"bytes,9,opt,name=relay_discovery_plaintext,json=relayDiscoveryPlaintext,proto3,oneof"`
}

type Message_RelayInfo added in v0.0.5

type Message_RelayInfo struct {
	RelayInfo *RelayInfo `protobuf:"bytes,3,opt,name=relay_info,json=relayInfo,proto3,oneof"`
}

type Message_RequestRelayDiscovery added in v1.0.2

type Message_RequestRelayDiscovery struct {
	// Controllers can broadcast a request_relay_discovery message and all connected relays with discovery enabled will
	// respond with a relay_discovery response.
	// Supporting discovery is opt-in and relays may choose to only support encrypted discovery and optionally whitelist
	// specific controller public keys
	RequestRelayDiscovery *RequestRelayDiscovery `protobuf:"bytes,8,opt,name=request_relay_discovery,json=requestRelayDiscovery,proto3,oneof"`
}

type Message_RequestRelayInfo added in v0.0.5

type Message_RequestRelayInfo struct {
	RequestRelayInfo *emptypb.Empty `protobuf:"bytes,2,opt,name=request_relay_info,json=requestRelayInfo,proto3,oneof"`
}

type Payload

type Payload struct {
	Payload     []byte      `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	PayloadType PayloadType `` /* 129-byte string literal not displayed */
	Sequence    uint32      `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// control is used for PCSC control codes, only uint16 values are valid
	Control *uint32 `protobuf:"varint,4,opt,name=control,proto3,oneof" json:"control,omitempty"`
	// contains filtered or unexported fields
}

func (*Payload) Descriptor deprecated

func (*Payload) Descriptor() ([]byte, []int)

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetControl

func (x *Payload) GetControl() uint32

func (*Payload) GetPayload

func (x *Payload) GetPayload() []byte

func (*Payload) GetPayloadType

func (x *Payload) GetPayloadType() PayloadType

func (*Payload) GetSequence

func (x *Payload) GetSequence() uint32

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type PayloadType

type PayloadType int32
const (
	PayloadType_PAYLOAD_TYPE_UNSPECIFIED PayloadType = 0
	// Relay device is attached to a HID reader or SAM and can exchange Artemis payloads
	PayloadType_PAYLOAD_TYPE_ARTEMIS PayloadType = 1
	// Relay device is attached to a Proxmark3 with the cardhopper standalone mode
	// This can be used to emulate a 14443a-4 card or act as a 14443a-4 reader
	// Payload is raw cardhopper frame
	PayloadType_PAYLOAD_TYPE_CARDHOPPER PayloadType = 2
	// Relay device is attached to a PCSC-like reader and can exchange APDUs to a smart card
	// This is most commonly used with CONNECTION_TYPE_PCSC, but may also be used with CONNECTION_TYPE_NFC and
	// CONNECTION_TYPE_BLE when acting as a reader
	PayloadType_PAYLOAD_TYPE_PCSC_READER PayloadType = 3
	// Relay device is attached to a PCSC-like reader that supports control commands
	// This is normally used with CONNECTION_TYPE_PCSC or CONNECTION_TYPE_PCSC_DIRECT
	PayloadType_PAYLOAD_TYPE_PCSC_READER_CONTROL PayloadType = 5
	// Relay device is emulating a smart card and can respond to APDUs from a reader
	PayloadType_PAYLOAD_TYPE_PCSC_CARD PayloadType = 4
)

func (PayloadType) Descriptor

func (PayloadType) Enum

func (x PayloadType) Enum() *PayloadType

func (PayloadType) EnumDescriptor deprecated

func (PayloadType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PayloadType.Descriptor instead.

func (PayloadType) Number

func (x PayloadType) Number() protoreflect.EnumNumber

func (PayloadType) String

func (x PayloadType) String() string

func (PayloadType) Type

type Reconnect

type Reconnect struct {

	// uid may not be supported by all card emulators
	Uid []byte `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	// ats may not be supported by all card emulators
	Ats []byte `protobuf:"bytes,3,opt,name=ats,proto3" json:"ats,omitempty"`
	// some card emulator relays may need an explicit list of AIDs to register (eg Mobile HCE) or they will not be visible
	// if the relay does not have this requirement it will be ignored
	AidList [][]byte `protobuf:"bytes,4,rep,name=aid_list,json=aidList,proto3" json:"aid_list,omitempty"`
	// initial list of EmulationShortcuts to load
	Shortcuts []*EmulationShortcut `protobuf:"bytes,5,rep,name=shortcuts,proto3" json:"shortcuts,omitempty"`
	// force flush all shortcuts, even those with persist_reconnect set to true
	ForceFlushShortcuts bool `protobuf:"varint,6,opt,name=force_flush_shortcuts,json=forceFlushShortcuts,proto3" json:"force_flush_shortcuts,omitempty"`
	// contains filtered or unexported fields
}

func (*Reconnect) Descriptor deprecated

func (*Reconnect) Descriptor() ([]byte, []int)

Deprecated: Use Reconnect.ProtoReflect.Descriptor instead.

func (*Reconnect) GetAidList added in v0.0.4

func (x *Reconnect) GetAidList() [][]byte

func (*Reconnect) GetAts

func (x *Reconnect) GetAts() []byte

func (*Reconnect) GetForceFlushShortcuts added in v0.0.9

func (x *Reconnect) GetForceFlushShortcuts() bool

func (*Reconnect) GetShortcuts added in v0.0.7

func (x *Reconnect) GetShortcuts() []*EmulationShortcut

func (*Reconnect) GetUid

func (x *Reconnect) GetUid() []byte

func (*Reconnect) ProtoMessage

func (*Reconnect) ProtoMessage()

func (*Reconnect) ProtoReflect

func (x *Reconnect) ProtoReflect() protoreflect.Message

func (*Reconnect) Reset

func (x *Reconnect) Reset()

func (*Reconnect) String

func (x *Reconnect) String() string

type RelayDiscovery added in v1.0.2

type RelayDiscovery struct {
	RelayId   string     `protobuf:"bytes,1,opt,name=relay_id,json=relayId,proto3" json:"relay_id,omitempty"`
	RelayInfo *RelayInfo `protobuf:"bytes,2,opt,name=relay_info,json=relayInfo,proto3" json:"relay_info,omitempty"`
	// contains filtered or unexported fields
}

func (*RelayDiscovery) Descriptor deprecated added in v1.0.2

func (*RelayDiscovery) Descriptor() ([]byte, []int)

Deprecated: Use RelayDiscovery.ProtoReflect.Descriptor instead.

func (*RelayDiscovery) GetRelayId added in v1.0.2

func (x *RelayDiscovery) GetRelayId() string

func (*RelayDiscovery) GetRelayInfo added in v1.0.2

func (x *RelayDiscovery) GetRelayInfo() *RelayInfo

func (*RelayDiscovery) ProtoMessage added in v1.0.2

func (*RelayDiscovery) ProtoMessage()

func (*RelayDiscovery) ProtoReflect added in v1.0.2

func (x *RelayDiscovery) ProtoReflect() protoreflect.Message

func (*RelayDiscovery) Reset added in v1.0.2

func (x *RelayDiscovery) Reset()

func (*RelayDiscovery) String added in v1.0.2

func (x *RelayDiscovery) String() string

type RelayDiscoveryEncrypted added in v1.0.2

type RelayDiscoveryEncrypted struct {

	// controller public key must match the public key specified in the RequestRelayDiscovery message
	ControllerPublicKey []byte `protobuf:"bytes,1,opt,name=controller_public_key,json=controllerPublicKey,proto3" json:"controller_public_key,omitempty"`
	// the relay public key should be randomly generated each time a discovery request is received
	RelayPublicKey []byte `protobuf:"bytes,2,opt,name=relay_public_key,json=relayPublicKey,proto3" json:"relay_public_key,omitempty"`
	// encrypted_relay_discovery contains an encrypted RelayDiscovery message encrypted with AES128-GCM using keys
	// negotiated with ECDH X5519
	EncryptedRelayDiscovery []byte `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*RelayDiscoveryEncrypted) Descriptor deprecated added in v1.0.2

func (*RelayDiscoveryEncrypted) Descriptor() ([]byte, []int)

Deprecated: Use RelayDiscoveryEncrypted.ProtoReflect.Descriptor instead.

func (*RelayDiscoveryEncrypted) GetControllerPublicKey added in v1.0.2

func (x *RelayDiscoveryEncrypted) GetControllerPublicKey() []byte

func (*RelayDiscoveryEncrypted) GetEncryptedRelayDiscovery added in v1.0.2

func (x *RelayDiscoveryEncrypted) GetEncryptedRelayDiscovery() []byte

func (*RelayDiscoveryEncrypted) GetRelayPublicKey added in v1.0.2

func (x *RelayDiscoveryEncrypted) GetRelayPublicKey() []byte

func (*RelayDiscoveryEncrypted) ProtoMessage added in v1.0.2

func (*RelayDiscoveryEncrypted) ProtoMessage()

func (*RelayDiscoveryEncrypted) ProtoReflect added in v1.0.2

func (x *RelayDiscoveryEncrypted) ProtoReflect() protoreflect.Message

func (*RelayDiscoveryEncrypted) Reset added in v1.0.2

func (x *RelayDiscoveryEncrypted) Reset()

func (*RelayDiscoveryEncrypted) String added in v1.0.2

func (x *RelayDiscoveryEncrypted) String() string

type RelayInfo added in v0.0.5

type RelayInfo struct {
	SupportedPayloadTypes []PayloadType  `` /* 168-byte string literal not displayed */
	ConnectionType        ConnectionType `` /* 141-byte string literal not displayed */
	// atr is only present when PAYLOAD_TYPE_PCSC_READER is in supported_payload_types and supported by the reader
	Atr []byte `protobuf:"bytes,2,opt,name=atr,proto3" json:"atr,omitempty"`
	// device_name is only present when available, eg for PCSC readers or when connected to a BLE peripheral
	DeviceName string `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
	// device_address is only present when available, eg when connected to a BLE peripheral
	DeviceAddress []byte `protobuf:"bytes,4,opt,name=device_address,json=deviceAddress,proto3" json:"device_address,omitempty"`
	// rssi is only present when available, eg when connected to a BLE peripheral
	Rssi int32 `protobuf:"zigzag32,6,opt,name=rssi,proto3" json:"rssi,omitempty"`
	// true iff EmulationShortcut messages are supported
	SupportsShortcut bool `protobuf:"varint,7,opt,name=supports_shortcut,json=supportsShortcut,proto3" json:"supports_shortcut,omitempty"`
	// true iff card emulation requires an explicit list of AIDs in the Reconnect message
	RequiresAidList bool `protobuf:"varint,8,opt,name=requires_aid_list,json=requiresAidList,proto3" json:"requires_aid_list,omitempty"`
	// user agent is an optional name/version of the relay application
	UserAgent string `protobuf:"bytes,9,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// Optional parameters for NFC cards. May not always be populated, eg PCSC readers may require querying via pseudo APDUs
	Uid  []byte `protobuf:"bytes,10,opt,name=uid,proto3" json:"uid,omitempty"`
	Atqa []byte `protobuf:"bytes,11,opt,name=atqa,proto3" json:"atqa,omitempty"`
	Sak  []byte `protobuf:"bytes,12,opt,name=sak,proto3" json:"sak,omitempty"`
	Ats  []byte `protobuf:"bytes,13,opt,name=ats,proto3" json:"ats,omitempty"`
	// contains filtered or unexported fields
}

func (*RelayInfo) Descriptor deprecated added in v0.0.5

func (*RelayInfo) Descriptor() ([]byte, []int)

Deprecated: Use RelayInfo.ProtoReflect.Descriptor instead.

func (*RelayInfo) GetAtqa added in v1.0.7

func (x *RelayInfo) GetAtqa() []byte

func (*RelayInfo) GetAtr added in v0.0.5

func (x *RelayInfo) GetAtr() []byte

func (*RelayInfo) GetAts added in v1.0.7

func (x *RelayInfo) GetAts() []byte

func (*RelayInfo) GetConnectionType added in v0.0.5

func (x *RelayInfo) GetConnectionType() ConnectionType

func (*RelayInfo) GetDeviceAddress added in v0.0.5

func (x *RelayInfo) GetDeviceAddress() []byte

func (*RelayInfo) GetDeviceName added in v0.0.5

func (x *RelayInfo) GetDeviceName() string

func (*RelayInfo) GetRequiresAidList added in v0.0.7

func (x *RelayInfo) GetRequiresAidList() bool

func (*RelayInfo) GetRssi added in v0.0.5

func (x *RelayInfo) GetRssi() int32

func (*RelayInfo) GetSak added in v1.0.7

func (x *RelayInfo) GetSak() []byte

func (*RelayInfo) GetSupportedPayloadTypes added in v0.0.5

func (x *RelayInfo) GetSupportedPayloadTypes() []PayloadType

func (*RelayInfo) GetSupportsShortcut added in v0.0.5

func (x *RelayInfo) GetSupportsShortcut() bool

func (*RelayInfo) GetUid added in v1.0.7

func (x *RelayInfo) GetUid() []byte

func (*RelayInfo) GetUserAgent added in v1.0.2

func (x *RelayInfo) GetUserAgent() string

func (*RelayInfo) ProtoMessage added in v0.0.5

func (*RelayInfo) ProtoMessage()

func (*RelayInfo) ProtoReflect added in v0.0.5

func (x *RelayInfo) ProtoReflect() protoreflect.Message

func (*RelayInfo) Reset added in v0.0.5

func (x *RelayInfo) Reset()

func (*RelayInfo) String added in v0.0.5

func (x *RelayInfo) String() string

type RequestRelayDiscovery added in v1.0.2

type RequestRelayDiscovery struct {

	// Optional X5519 public key of the controller that the relay should use to encrypt the discovery response with
	ControllerPublicKey []byte `protobuf:"bytes,1,opt,name=controller_public_key,json=controllerPublicKey,proto3" json:"controller_public_key,omitempty"`
	// Optional payload type the controller is looking for. If specified  relays should only respond if it supports the
	// provided payload type.
	PayloadTypes []PayloadType `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*RequestRelayDiscovery) Descriptor deprecated added in v1.0.2

func (*RequestRelayDiscovery) Descriptor() ([]byte, []int)

Deprecated: Use RequestRelayDiscovery.ProtoReflect.Descriptor instead.

func (*RequestRelayDiscovery) GetControllerPublicKey added in v1.0.2

func (x *RequestRelayDiscovery) GetControllerPublicKey() []byte

func (*RequestRelayDiscovery) GetPayloadTypes added in v1.0.8

func (x *RequestRelayDiscovery) GetPayloadTypes() []PayloadType

func (*RequestRelayDiscovery) ProtoMessage added in v1.0.2

func (*RequestRelayDiscovery) ProtoMessage()

func (*RequestRelayDiscovery) ProtoReflect added in v1.0.2

func (x *RequestRelayDiscovery) ProtoReflect() protoreflect.Message

func (*RequestRelayDiscovery) Reset added in v1.0.2

func (x *RequestRelayDiscovery) Reset()

func (*RequestRelayDiscovery) String added in v1.0.2

func (x *RequestRelayDiscovery) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL