tdproto

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

README

Protobuf messages for TapDance

godoc

Rebuild

protoc --go_out=import_path=tdproto:. signalling.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeyType_name = map[int32]string{
		90: "AES_GCM_128",
		91: "AES_GCM_256",
	}
	KeyType_value = map[string]int32{
		"AES_GCM_128": 90,
		"AES_GCM_256": 91,
	}
)

Enum value maps for KeyType.

View Source
var (
	C2S_Transition_name = map[int32]string{
		0:   "C2S_NO_CHANGE",
		1:   "C2S_SESSION_INIT",
		11:  "C2S_SESSION_COVERT_INIT",
		2:   "C2S_EXPECT_RECONNECT",
		3:   "C2S_SESSION_CLOSE",
		4:   "C2S_YIELD_UPLOAD",
		5:   "C2S_ACQUIRE_UPLOAD",
		6:   "C2S_EXPECT_UPLOADONLY_RECONN",
		255: "C2S_ERROR",
	}
	C2S_Transition_value = map[string]int32{
		"C2S_NO_CHANGE":                0,
		"C2S_SESSION_INIT":             1,
		"C2S_SESSION_COVERT_INIT":      11,
		"C2S_EXPECT_RECONNECT":         2,
		"C2S_SESSION_CLOSE":            3,
		"C2S_YIELD_UPLOAD":             4,
		"C2S_ACQUIRE_UPLOAD":           5,
		"C2S_EXPECT_UPLOADONLY_RECONN": 6,
		"C2S_ERROR":                    255,
	}
)

Enum value maps for C2S_Transition.

View Source
var (
	S2C_Transition_name = map[int32]string{
		0:   "S2C_NO_CHANGE",
		1:   "S2C_SESSION_INIT",
		11:  "S2C_SESSION_COVERT_INIT",
		2:   "S2C_CONFIRM_RECONNECT",
		3:   "S2C_SESSION_CLOSE",
		255: "S2C_ERROR",
	}
	S2C_Transition_value = map[string]int32{
		"S2C_NO_CHANGE":           0,
		"S2C_SESSION_INIT":        1,
		"S2C_SESSION_COVERT_INIT": 11,
		"S2C_CONFIRM_RECONNECT":   2,
		"S2C_SESSION_CLOSE":       3,
		"S2C_ERROR":               255,
	}
)

Enum value maps for S2C_Transition.

View Source
var (
	ErrorReasonS2C_name = map[int32]string{
		0:   "NO_ERROR",
		1:   "COVERT_STREAM",
		2:   "CLIENT_REPORTED",
		3:   "CLIENT_PROTOCOL",
		4:   "STATION_INTERNAL",
		5:   "DECOY_OVERLOAD",
		100: "CLIENT_STREAM",
		101: "CLIENT_TIMEOUT",
	}
	ErrorReasonS2C_value = map[string]int32{
		"NO_ERROR":         0,
		"COVERT_STREAM":    1,
		"CLIENT_REPORTED":  2,
		"CLIENT_PROTOCOL":  3,
		"STATION_INTERNAL": 4,
		"DECOY_OVERLOAD":   5,
		"CLIENT_STREAM":    100,
		"CLIENT_TIMEOUT":   101,
	}
)

Enum value maps for ErrorReasonS2C.

View Source
var (
	TransportType_name = map[int32]string{
		0:  "Null",
		1:  "Min",
		2:  "Obfs4",
		99: "Webrtc",
	}
	TransportType_value = map[string]int32{
		"Null":   0,
		"Min":    1,
		"Obfs4":  2,
		"Webrtc": 99,
	}
)

Enum value maps for TransportType.

View Source
var (
	RegistrationSource_name = map[int32]string{
		0: "Unspecified",
		1: "Detector",
		2: "API",
		3: "DetectorPrescan",
		4: "BidirectionalAPI",
	}
	RegistrationSource_value = map[string]int32{
		"Unspecified":      0,
		"Detector":         1,
		"API":              2,
		"DetectorPrescan":  3,
		"BidirectionalAPI": 4,
	}
)

Enum value maps for RegistrationSource.

View Source
var File_signalling_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type C2SWrapper

type C2SWrapper struct {
	SharedSecret        []byte              `protobuf:"bytes,1,opt,name=shared_secret,json=sharedSecret" json:"shared_secret,omitempty"`
	RegistrationPayload *ClientToStation    `protobuf:"bytes,3,opt,name=registration_payload,json=registrationPayload" json:"registration_payload,omitempty"`
	RegistrationSource  *RegistrationSource `` /* 142-byte string literal not displayed */
	// client source address when receiving a registration
	RegistrationAddress []byte `protobuf:"bytes,6,opt,name=registration_address,json=registrationAddress" json:"registration_address,omitempty"`
	// Decoy address used when registering over Decoy registrar
	DecoyAddress         []byte                `protobuf:"bytes,7,opt,name=decoy_address,json=decoyAddress" json:"decoy_address,omitempty"`
	RegistrationResponse *RegistrationResponse `protobuf:"bytes,8,opt,name=registration_response,json=registrationResponse" json:"registration_response,omitempty"`
	// contains filtered or unexported fields
}

func (*C2SWrapper) Descriptor deprecated

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

Deprecated: Use C2SWrapper.ProtoReflect.Descriptor instead.

func (*C2SWrapper) GetDecoyAddress

func (x *C2SWrapper) GetDecoyAddress() []byte

func (*C2SWrapper) GetRegistrationAddress

func (x *C2SWrapper) GetRegistrationAddress() []byte

func (*C2SWrapper) GetRegistrationPayload

func (x *C2SWrapper) GetRegistrationPayload() *ClientToStation

func (*C2SWrapper) GetRegistrationResponse

func (x *C2SWrapper) GetRegistrationResponse() *RegistrationResponse

func (*C2SWrapper) GetRegistrationSource

func (x *C2SWrapper) GetRegistrationSource() RegistrationSource

func (*C2SWrapper) GetSharedSecret

func (x *C2SWrapper) GetSharedSecret() []byte

func (*C2SWrapper) ProtoMessage

func (*C2SWrapper) ProtoMessage()

func (*C2SWrapper) ProtoReflect

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

func (*C2SWrapper) Reset

func (x *C2SWrapper) Reset()

func (*C2SWrapper) String

func (x *C2SWrapper) String() string

type C2S_Transition

type C2S_Transition int32

State transitions of the client

const (
	C2S_Transition_C2S_NO_CHANGE                C2S_Transition = 0
	C2S_Transition_C2S_SESSION_INIT             C2S_Transition = 1  // connect me to squid
	C2S_Transition_C2S_SESSION_COVERT_INIT      C2S_Transition = 11 // connect me to provided covert
	C2S_Transition_C2S_EXPECT_RECONNECT         C2S_Transition = 2
	C2S_Transition_C2S_SESSION_CLOSE            C2S_Transition = 3
	C2S_Transition_C2S_YIELD_UPLOAD             C2S_Transition = 4
	C2S_Transition_C2S_ACQUIRE_UPLOAD           C2S_Transition = 5
	C2S_Transition_C2S_EXPECT_UPLOADONLY_RECONN C2S_Transition = 6
	C2S_Transition_C2S_ERROR                    C2S_Transition = 255
)

func (C2S_Transition) Descriptor

func (C2S_Transition) Enum

func (x C2S_Transition) Enum() *C2S_Transition

func (C2S_Transition) EnumDescriptor deprecated

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

Deprecated: Use C2S_Transition.Descriptor instead.

func (C2S_Transition) Number

func (C2S_Transition) String

func (x C2S_Transition) String() string

func (C2S_Transition) Type

func (*C2S_Transition) UnmarshalJSON deprecated

func (x *C2S_Transition) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type ClientConf

type ClientConf struct {
	DecoyList          *DecoyList          `protobuf:"bytes,1,opt,name=decoy_list,json=decoyList" json:"decoy_list,omitempty"`
	Generation         *uint32             `protobuf:"varint,2,opt,name=generation" json:"generation,omitempty"`
	DefaultPubkey      *PubKey             `protobuf:"bytes,3,opt,name=default_pubkey,json=defaultPubkey" json:"default_pubkey,omitempty"`
	PhantomSubnetsList *PhantomSubnetsList `protobuf:"bytes,4,opt,name=phantom_subnets_list,json=phantomSubnetsList" json:"phantom_subnets_list,omitempty"`
	ConjurePubkey      *PubKey             `protobuf:"bytes,5,opt,name=conjure_pubkey,json=conjurePubkey" json:"conjure_pubkey,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientConf) Descriptor deprecated

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

Deprecated: Use ClientConf.ProtoReflect.Descriptor instead.

func (*ClientConf) GetConjurePubkey

func (x *ClientConf) GetConjurePubkey() *PubKey

func (*ClientConf) GetDecoyList

func (x *ClientConf) GetDecoyList() *DecoyList

func (*ClientConf) GetDefaultPubkey

func (x *ClientConf) GetDefaultPubkey() *PubKey

func (*ClientConf) GetGeneration

func (x *ClientConf) GetGeneration() uint32

func (*ClientConf) GetPhantomSubnetsList

func (x *ClientConf) GetPhantomSubnetsList() *PhantomSubnetsList

func (*ClientConf) ProtoMessage

func (*ClientConf) ProtoMessage()

func (*ClientConf) ProtoReflect

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

func (*ClientConf) Reset

func (x *ClientConf) Reset()

func (*ClientConf) String

func (x *ClientConf) String() string

type ClientToStation

type ClientToStation struct {
	ProtocolVersion *uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion" json:"protocol_version,omitempty"`
	// The client reports its decoy list's version number here, which the
	// station can use to decide whether to send an updated one. The station
	// should always send a list if this field is set to 0.
	DecoyListGeneration *uint32         `protobuf:"varint,2,opt,name=decoy_list_generation,json=decoyListGeneration" json:"decoy_list_generation,omitempty"`
	StateTransition     *C2S_Transition `` /* 129-byte string literal not displayed */
	// The position in the overall session's upload sequence where the current
	// YIELD=>ACQUIRE switchover is happening.
	UploadSync *uint64 `protobuf:"varint,4,opt,name=upload_sync,json=uploadSync" json:"upload_sync,omitempty"`
	// List of decoys that client have unsuccessfully tried in current session.
	// Could be sent in chunks
	FailedDecoys []string      `protobuf:"bytes,10,rep,name=failed_decoys,json=failedDecoys" json:"failed_decoys,omitempty"`
	Stats        *SessionStats `protobuf:"bytes,11,opt,name=stats" json:"stats,omitempty"`
	// NullTransport, MinTransport, Obfs4Transport, etc. Transport type we want from phantom proxy
	Transport *TransportType `protobuf:"varint,12,opt,name=transport,enum=tapdance.TransportType" json:"transport,omitempty"`
	// Station is only required to check this variable during session initialization.
	// If set, station must facilitate connection to said target by itself, i.e. write into squid
	// socket an HTTP/SOCKS/any other connection request.
	// covert_address must have exactly one ':' colon, that separates host (literal IP address or
	// resolvable hostname) and port
	// TODO: make it required for initialization, and stop connecting any client straight to squid?
	CovertAddress *string `protobuf:"bytes,20,opt,name=covert_address,json=covertAddress" json:"covert_address,omitempty"`
	// Used in dark decoys to signal which dark decoy it will connect to.
	MaskedDecoyServerName *string `protobuf:"bytes,21,opt,name=masked_decoy_server_name,json=maskedDecoyServerName" json:"masked_decoy_server_name,omitempty"`
	// Used to indicate to server if client is registering v4, v6 or both
	V6Support *bool `protobuf:"varint,22,opt,name=v6_support,json=v6Support" json:"v6_support,omitempty"`
	V4Support *bool `protobuf:"varint,23,opt,name=v4_support,json=v4Support" json:"v4_support,omitempty"`
	// A collection of optional flags for the registration.
	Flags *RegistrationFlags `protobuf:"bytes,24,opt,name=flags" json:"flags,omitempty"`
	// Transport Extensions
	WebrtcSignal *WebRTCSignal `protobuf:"bytes,31,opt,name=webrtc_signal,json=webrtcSignal" json:"webrtc_signal,omitempty"`
	// Random-sized junk to defeat packet size fingerprinting.
	Padding []byte `protobuf:"bytes,100,opt,name=padding" json:"padding,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientToStation) Descriptor deprecated

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

Deprecated: Use ClientToStation.ProtoReflect.Descriptor instead.

func (*ClientToStation) GetCovertAddress

func (x *ClientToStation) GetCovertAddress() string

func (*ClientToStation) GetDecoyListGeneration

func (x *ClientToStation) GetDecoyListGeneration() uint32

func (*ClientToStation) GetFailedDecoys

func (x *ClientToStation) GetFailedDecoys() []string

func (*ClientToStation) GetFlags

func (x *ClientToStation) GetFlags() *RegistrationFlags

func (*ClientToStation) GetMaskedDecoyServerName

func (x *ClientToStation) GetMaskedDecoyServerName() string

func (*ClientToStation) GetPadding

func (x *ClientToStation) GetPadding() []byte

func (*ClientToStation) GetProtocolVersion

func (x *ClientToStation) GetProtocolVersion() uint32

func (*ClientToStation) GetStateTransition

func (x *ClientToStation) GetStateTransition() C2S_Transition

func (*ClientToStation) GetStats

func (x *ClientToStation) GetStats() *SessionStats

func (*ClientToStation) GetTransport

func (x *ClientToStation) GetTransport() TransportType

func (*ClientToStation) GetUploadSync

func (x *ClientToStation) GetUploadSync() uint64

func (*ClientToStation) GetV4Support

func (x *ClientToStation) GetV4Support() bool

func (*ClientToStation) GetV6Support

func (x *ClientToStation) GetV6Support() bool

func (*ClientToStation) GetWebrtcSignal

func (x *ClientToStation) GetWebrtcSignal() *WebRTCSignal

func (*ClientToStation) ProtoMessage

func (*ClientToStation) ProtoMessage()

func (*ClientToStation) ProtoReflect

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

func (*ClientToStation) Reset

func (x *ClientToStation) Reset()

func (*ClientToStation) String

func (x *ClientToStation) String() string

type DecoyList

type DecoyList struct {
	TlsDecoys []*TLSDecoySpec `protobuf:"bytes,1,rep,name=tls_decoys,json=tlsDecoys" json:"tls_decoys,omitempty"`
	// contains filtered or unexported fields
}

func (*DecoyList) Descriptor deprecated

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

Deprecated: Use DecoyList.ProtoReflect.Descriptor instead.

func (*DecoyList) GetTlsDecoys

func (x *DecoyList) GetTlsDecoys() []*TLSDecoySpec

func (*DecoyList) ProtoMessage

func (*DecoyList) ProtoMessage()

func (*DecoyList) ProtoReflect

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

func (*DecoyList) Reset

func (x *DecoyList) Reset()

func (*DecoyList) String

func (x *DecoyList) String() string

type ErrorReasonS2C

type ErrorReasonS2C int32

Should accompany all S2C_ERROR messages.

const (
	ErrorReasonS2C_NO_ERROR         ErrorReasonS2C = 0
	ErrorReasonS2C_COVERT_STREAM    ErrorReasonS2C = 1   // Squid TCP connection broke
	ErrorReasonS2C_CLIENT_REPORTED  ErrorReasonS2C = 2   // You told me something was wrong, client
	ErrorReasonS2C_CLIENT_PROTOCOL  ErrorReasonS2C = 3   // You messed up, client (e.g. sent a bad protobuf)
	ErrorReasonS2C_STATION_INTERNAL ErrorReasonS2C = 4   // I broke
	ErrorReasonS2C_DECOY_OVERLOAD   ErrorReasonS2C = 5   // Everything's fine, but don't use this decoy right now
	ErrorReasonS2C_CLIENT_STREAM    ErrorReasonS2C = 100 // My stream to you broke. (This is impossible to send)
	ErrorReasonS2C_CLIENT_TIMEOUT   ErrorReasonS2C = 101 // You never came back. (This is impossible to send)
)

func (ErrorReasonS2C) Descriptor

func (ErrorReasonS2C) Enum

func (x ErrorReasonS2C) Enum() *ErrorReasonS2C

func (ErrorReasonS2C) EnumDescriptor deprecated

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

Deprecated: Use ErrorReasonS2C.Descriptor instead.

func (ErrorReasonS2C) Number

func (ErrorReasonS2C) String

func (x ErrorReasonS2C) String() string

func (ErrorReasonS2C) Type

func (*ErrorReasonS2C) UnmarshalJSON deprecated

func (x *ErrorReasonS2C) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type KeyType

type KeyType int32
const (
	KeyType_AES_GCM_128 KeyType = 90
	KeyType_AES_GCM_256 KeyType = 91 // not supported atm
)

func (KeyType) Descriptor

func (KeyType) Descriptor() protoreflect.EnumDescriptor

func (KeyType) Enum

func (x KeyType) Enum() *KeyType

func (KeyType) EnumDescriptor deprecated

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

Deprecated: Use KeyType.Descriptor instead.

func (KeyType) Number

func (x KeyType) Number() protoreflect.EnumNumber

func (KeyType) String

func (x KeyType) String() string

func (KeyType) Type

func (KeyType) Type() protoreflect.EnumType

func (*KeyType) UnmarshalJSON deprecated

func (x *KeyType) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type PhantomSubnets

type PhantomSubnets struct {
	Weight  *uint32  `protobuf:"varint,1,opt,name=weight" json:"weight,omitempty"`
	Subnets []string `protobuf:"bytes,2,rep,name=subnets" json:"subnets,omitempty"`
	// contains filtered or unexported fields
}

func (*PhantomSubnets) Descriptor deprecated

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

Deprecated: Use PhantomSubnets.ProtoReflect.Descriptor instead.

func (*PhantomSubnets) GetSubnets

func (x *PhantomSubnets) GetSubnets() []string

func (*PhantomSubnets) GetWeight

func (x *PhantomSubnets) GetWeight() uint32

func (*PhantomSubnets) ProtoMessage

func (*PhantomSubnets) ProtoMessage()

func (*PhantomSubnets) ProtoReflect

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

func (*PhantomSubnets) Reset

func (x *PhantomSubnets) Reset()

func (*PhantomSubnets) String

func (x *PhantomSubnets) String() string

type PhantomSubnetsList

type PhantomSubnetsList struct {
	WeightedSubnets []*PhantomSubnets `protobuf:"bytes,1,rep,name=weighted_subnets,json=weightedSubnets" json:"weighted_subnets,omitempty"`
	// contains filtered or unexported fields
}

func (*PhantomSubnetsList) Descriptor deprecated

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

Deprecated: Use PhantomSubnetsList.ProtoReflect.Descriptor instead.

func (*PhantomSubnetsList) GetWeightedSubnets

func (x *PhantomSubnetsList) GetWeightedSubnets() []*PhantomSubnets

func (*PhantomSubnetsList) ProtoMessage

func (*PhantomSubnetsList) ProtoMessage()

func (*PhantomSubnetsList) ProtoReflect

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

func (*PhantomSubnetsList) Reset

func (x *PhantomSubnetsList) Reset()

func (*PhantomSubnetsList) String

func (x *PhantomSubnetsList) String() string

type PubKey

type PubKey struct {

	// A public key, as used by the station.
	Key  []byte   `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	Type *KeyType `protobuf:"varint,2,opt,name=type,enum=tapdance.KeyType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*PubKey) Descriptor deprecated

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

Deprecated: Use PubKey.ProtoReflect.Descriptor instead.

func (*PubKey) GetKey

func (x *PubKey) GetKey() []byte

func (*PubKey) GetType

func (x *PubKey) GetType() KeyType

func (*PubKey) ProtoMessage

func (*PubKey) ProtoMessage()

func (*PubKey) ProtoReflect

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

func (*PubKey) Reset

func (x *PubKey) Reset()

func (*PubKey) String

func (x *PubKey) String() string

type RegistrationFlags

type RegistrationFlags struct {
	UploadOnly  *bool `protobuf:"varint,1,opt,name=upload_only,json=uploadOnly" json:"upload_only,omitempty"`
	DarkDecoy   *bool `protobuf:"varint,2,opt,name=dark_decoy,json=darkDecoy" json:"dark_decoy,omitempty"`
	ProxyHeader *bool `protobuf:"varint,3,opt,name=proxy_header,json=proxyHeader" json:"proxy_header,omitempty"`
	Use_TIL     *bool `protobuf:"varint,4,opt,name=use_TIL,json=useTIL" json:"use_TIL,omitempty"`
	Prescanned  *bool `protobuf:"varint,5,opt,name=prescanned" json:"prescanned,omitempty"`
	// contains filtered or unexported fields
}

func (*RegistrationFlags) Descriptor deprecated

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

Deprecated: Use RegistrationFlags.ProtoReflect.Descriptor instead.

func (*RegistrationFlags) GetDarkDecoy

func (x *RegistrationFlags) GetDarkDecoy() bool

func (*RegistrationFlags) GetPrescanned

func (x *RegistrationFlags) GetPrescanned() bool

func (*RegistrationFlags) GetProxyHeader

func (x *RegistrationFlags) GetProxyHeader() bool

func (*RegistrationFlags) GetUploadOnly

func (x *RegistrationFlags) GetUploadOnly() bool

func (*RegistrationFlags) GetUse_TIL

func (x *RegistrationFlags) GetUse_TIL() bool

func (*RegistrationFlags) ProtoMessage

func (*RegistrationFlags) ProtoMessage()

func (*RegistrationFlags) ProtoReflect

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

func (*RegistrationFlags) Reset

func (x *RegistrationFlags) Reset()

func (*RegistrationFlags) String

func (x *RegistrationFlags) String() string

type RegistrationResponse

type RegistrationResponse struct {
	Ipv4Addr *uint32 `protobuf:"fixed32,1,opt,name=ipv4addr" json:"ipv4addr,omitempty"`
	// The 128-bit ipv6 address, in network byte order
	Ipv6Addr []byte `protobuf:"bytes,2,opt,name=ipv6addr" json:"ipv6addr,omitempty"`
	// Respond with randomized port
	Port *uint32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"`
	// Future: station provides client with secret, want chanel present
	// Leave null for now
	ServerRandom []byte `protobuf:"bytes,4,opt,name=serverRandom" json:"serverRandom,omitempty"`
	// If registration wrong, populate this error string
	Error *string `protobuf:"bytes,5,opt,name=error" json:"error,omitempty"`
	// ClientConf field (optional)
	ClientConf *ClientConf `protobuf:"bytes,6,opt,name=clientConf" json:"clientConf,omitempty"`
	// contains filtered or unexported fields
}

Adding message response from Station to Client for birdirectional API

func (*RegistrationResponse) Descriptor deprecated

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

Deprecated: Use RegistrationResponse.ProtoReflect.Descriptor instead.

func (*RegistrationResponse) GetClientConf

func (x *RegistrationResponse) GetClientConf() *ClientConf

func (*RegistrationResponse) GetError

func (x *RegistrationResponse) GetError() string

func (*RegistrationResponse) GetIpv4Addr

func (x *RegistrationResponse) GetIpv4Addr() uint32

func (*RegistrationResponse) GetIpv6Addr

func (x *RegistrationResponse) GetIpv6Addr() []byte

func (*RegistrationResponse) GetPort

func (x *RegistrationResponse) GetPort() uint32

func (*RegistrationResponse) GetServerRandom

func (x *RegistrationResponse) GetServerRandom() []byte

func (*RegistrationResponse) ProtoMessage

func (*RegistrationResponse) ProtoMessage()

func (*RegistrationResponse) ProtoReflect

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

func (*RegistrationResponse) Reset

func (x *RegistrationResponse) Reset()

func (*RegistrationResponse) String

func (x *RegistrationResponse) String() string

type RegistrationSource

type RegistrationSource int32
const (
	RegistrationSource_Unspecified      RegistrationSource = 0
	RegistrationSource_Detector         RegistrationSource = 1
	RegistrationSource_API              RegistrationSource = 2
	RegistrationSource_DetectorPrescan  RegistrationSource = 3
	RegistrationSource_BidirectionalAPI RegistrationSource = 4
)

func (RegistrationSource) Descriptor

func (RegistrationSource) Enum

func (RegistrationSource) EnumDescriptor deprecated

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

Deprecated: Use RegistrationSource.Descriptor instead.

func (RegistrationSource) Number

func (RegistrationSource) String

func (x RegistrationSource) String() string

func (RegistrationSource) Type

func (*RegistrationSource) UnmarshalJSON deprecated

func (x *RegistrationSource) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type S2C_Transition

type S2C_Transition int32

State transitions of the server

const (
	S2C_Transition_S2C_NO_CHANGE           S2C_Transition = 0
	S2C_Transition_S2C_SESSION_INIT        S2C_Transition = 1  // connected to squid
	S2C_Transition_S2C_SESSION_COVERT_INIT S2C_Transition = 11 // connected to covert host
	S2C_Transition_S2C_CONFIRM_RECONNECT   S2C_Transition = 2
	S2C_Transition_S2C_SESSION_CLOSE       S2C_Transition = 3
	// TODO should probably also allow EXPECT_RECONNECT here, for DittoTap
	S2C_Transition_S2C_ERROR S2C_Transition = 255
)

func (S2C_Transition) Descriptor

func (S2C_Transition) Enum

func (x S2C_Transition) Enum() *S2C_Transition

func (S2C_Transition) EnumDescriptor deprecated

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

Deprecated: Use S2C_Transition.Descriptor instead.

func (S2C_Transition) Number

func (S2C_Transition) String

func (x S2C_Transition) String() string

func (S2C_Transition) Type

func (*S2C_Transition) UnmarshalJSON deprecated

func (x *S2C_Transition) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type SessionStats

type SessionStats struct {
	FailedDecoysAmount *uint32 `protobuf:"varint,20,opt,name=failed_decoys_amount,json=failedDecoysAmount" json:"failed_decoys_amount,omitempty"` // how many decoys were tried before success
	// Applicable to whole session:
	TotalTimeToConnect *uint32 `protobuf:"varint,31,opt,name=total_time_to_connect,json=totalTimeToConnect" json:"total_time_to_connect,omitempty"` // includes failed attempts
	// Last (i.e. successful) decoy:
	RttToStation *uint32 `protobuf:"varint,33,opt,name=rtt_to_station,json=rttToStation" json:"rtt_to_station,omitempty"` // measured during initial handshake
	TlsToDecoy   *uint32 `protobuf:"varint,38,opt,name=tls_to_decoy,json=tlsToDecoy" json:"tls_to_decoy,omitempty"`       // includes tcp to decoy
	TcpToDecoy   *uint32 `protobuf:"varint,39,opt,name=tcp_to_decoy,json=tcpToDecoy" json:"tcp_to_decoy,omitempty"`       // measured when establishing tcp connection to decot
	// contains filtered or unexported fields
}

func (*SessionStats) Descriptor deprecated

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

Deprecated: Use SessionStats.ProtoReflect.Descriptor instead.

func (*SessionStats) GetFailedDecoysAmount

func (x *SessionStats) GetFailedDecoysAmount() uint32

func (*SessionStats) GetRttToStation

func (x *SessionStats) GetRttToStation() uint32

func (*SessionStats) GetTcpToDecoy

func (x *SessionStats) GetTcpToDecoy() uint32

func (*SessionStats) GetTlsToDecoy

func (x *SessionStats) GetTlsToDecoy() uint32

func (*SessionStats) GetTotalTimeToConnect

func (x *SessionStats) GetTotalTimeToConnect() uint32

func (*SessionStats) ProtoMessage

func (*SessionStats) ProtoMessage()

func (*SessionStats) ProtoReflect

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

func (*SessionStats) Reset

func (x *SessionStats) Reset()

func (*SessionStats) String

func (x *SessionStats) String() string

type StationToClient

type StationToClient struct {

	// Should accompany (at least) SESSION_INIT and CONFIRM_RECONNECT.
	ProtocolVersion *uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion" json:"protocol_version,omitempty"`
	// There might be a state transition. May be absent; absence should be
	// treated identically to NO_CHANGE.
	StateTransition *S2C_Transition `` /* 129-byte string literal not displayed */
	// The station can send client config info piggybacked
	// on any message, as it sees fit
	ConfigInfo *ClientConf `protobuf:"bytes,3,opt,name=config_info,json=configInfo" json:"config_info,omitempty"`
	// If state_transition == S2C_ERROR, this field is the explanation.
	ErrReason *ErrorReasonS2C `protobuf:"varint,4,opt,name=err_reason,json=errReason,enum=tapdance.ErrorReasonS2C" json:"err_reason,omitempty"`
	// Signals client to stop connecting for following amount of seconds
	TmpBackoff *uint32 `protobuf:"varint,5,opt,name=tmp_backoff,json=tmpBackoff" json:"tmp_backoff,omitempty"`
	// Sent in SESSION_INIT, identifies the station that picked up
	StationId *string `protobuf:"bytes,6,opt,name=station_id,json=stationId" json:"station_id,omitempty"`
	// Random-sized junk to defeat packet size fingerprinting.
	Padding []byte `protobuf:"bytes,100,opt,name=padding" json:"padding,omitempty"`
	// contains filtered or unexported fields
}

func (*StationToClient) Descriptor deprecated

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

Deprecated: Use StationToClient.ProtoReflect.Descriptor instead.

func (*StationToClient) GetConfigInfo

func (x *StationToClient) GetConfigInfo() *ClientConf

func (*StationToClient) GetErrReason

func (x *StationToClient) GetErrReason() ErrorReasonS2C

func (*StationToClient) GetPadding

func (x *StationToClient) GetPadding() []byte

func (*StationToClient) GetProtocolVersion

func (x *StationToClient) GetProtocolVersion() uint32

func (*StationToClient) GetStateTransition

func (x *StationToClient) GetStateTransition() S2C_Transition

func (*StationToClient) GetStationId

func (x *StationToClient) GetStationId() string

func (*StationToClient) GetTmpBackoff

func (x *StationToClient) GetTmpBackoff() uint32

func (*StationToClient) ProtoMessage

func (*StationToClient) ProtoMessage()

func (*StationToClient) ProtoReflect

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

func (*StationToClient) Reset

func (x *StationToClient) Reset()

func (*StationToClient) String

func (x *StationToClient) String() string

type StationToDetector

type StationToDetector struct {
	PhantomIp *string `protobuf:"bytes,1,opt,name=phantom_ip,json=phantomIp" json:"phantom_ip,omitempty"`
	ClientIp  *string `protobuf:"bytes,2,opt,name=client_ip,json=clientIp" json:"client_ip,omitempty"`
	TimeoutNs *uint64 `protobuf:"varint,3,opt,name=timeout_ns,json=timeoutNs" json:"timeout_ns,omitempty"`
	// contains filtered or unexported fields
}

func (*StationToDetector) Descriptor deprecated

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

Deprecated: Use StationToDetector.ProtoReflect.Descriptor instead.

func (*StationToDetector) GetClientIp

func (x *StationToDetector) GetClientIp() string

func (*StationToDetector) GetPhantomIp

func (x *StationToDetector) GetPhantomIp() string

func (*StationToDetector) GetTimeoutNs

func (x *StationToDetector) GetTimeoutNs() uint64

func (*StationToDetector) ProtoMessage

func (*StationToDetector) ProtoMessage()

func (*StationToDetector) ProtoReflect

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

func (*StationToDetector) Reset

func (x *StationToDetector) Reset()

func (*StationToDetector) String

func (x *StationToDetector) String() string

type TLSDecoySpec

type TLSDecoySpec struct {

	// The hostname/SNI to use for this host
	//
	// The hostname is the only required field, although other
	// fields are expected to be present in most cases.
	Hostname *string `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"`
	// The 32-bit ipv4 address, in network byte order
	//
	// If the IPv4 address is absent, then it may be resolved via
	// DNS by the client, or the client may discard this decoy spec
	// if local DNS is untrusted, or the service may be multihomed.
	Ipv4Addr *uint32 `protobuf:"fixed32,2,opt,name=ipv4addr" json:"ipv4addr,omitempty"`
	// The 128-bit ipv6 address, in network byte order
	Ipv6Addr []byte `protobuf:"bytes,6,opt,name=ipv6addr" json:"ipv6addr,omitempty"`
	// The Tapdance station public key to use when contacting this
	// decoy
	//
	// If omitted, the default station public key (if any) is used.
	Pubkey *PubKey `protobuf:"bytes,3,opt,name=pubkey" json:"pubkey,omitempty"`
	// The maximum duration, in milliseconds, to maintain an open
	// connection to this decoy (because the decoy may close the
	// connection itself after this length of time)
	//
	// If omitted, a default of 30,000 milliseconds is assumed.
	Timeout *uint32 `protobuf:"varint,4,opt,name=timeout" json:"timeout,omitempty"`
	// The maximum TCP window size to attempt to use for this decoy.
	//
	// If omitted, a default of 15360 is assumed.
	//
	// TODO: the default is based on the current heuristic of only
	// using decoys that permit windows of 15KB or larger.  If this
	// heuristic changes, then this default doesn't make sense.
	Tcpwin *uint32 `protobuf:"varint,5,opt,name=tcpwin" json:"tcpwin,omitempty"`
	// contains filtered or unexported fields
}

func InitTLSDecoySpec

func InitTLSDecoySpec(ip string, sni string) *TLSDecoySpec

InitTLSDecoySpec creates TLSDecoySpec from ip address and server name. Other feilds, such as Pubkey, Timeout and Tcpwin are left unset.

func (*TLSDecoySpec) Descriptor deprecated

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

Deprecated: Use TLSDecoySpec.ProtoReflect.Descriptor instead.

func (*TLSDecoySpec) GetHostname

func (x *TLSDecoySpec) GetHostname() string

func (*TLSDecoySpec) GetIpAddrStr

func (ds *TLSDecoySpec) GetIpAddrStr() string

GetIpAddrStr returns IP address of TLSDecoySpec as a string.

func (*TLSDecoySpec) GetIpv4Addr

func (x *TLSDecoySpec) GetIpv4Addr() uint32

func (*TLSDecoySpec) GetIpv6Addr

func (x *TLSDecoySpec) GetIpv6Addr() []byte

func (*TLSDecoySpec) GetPubkey

func (x *TLSDecoySpec) GetPubkey() *PubKey

func (*TLSDecoySpec) GetTcpwin

func (x *TLSDecoySpec) GetTcpwin() uint32

func (*TLSDecoySpec) GetTimeout

func (x *TLSDecoySpec) GetTimeout() uint32

func (*TLSDecoySpec) ProtoMessage

func (*TLSDecoySpec) ProtoMessage()

func (*TLSDecoySpec) ProtoReflect

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

func (*TLSDecoySpec) Reset

func (x *TLSDecoySpec) Reset()

func (*TLSDecoySpec) String

func (x *TLSDecoySpec) String() string

type TransportType

type TransportType int32
const (
	TransportType_Null   TransportType = 0
	TransportType_Min    TransportType = 1  // Send a 32-byte HMAC id to let the station distinguish registrations to same host
	TransportType_Obfs4  TransportType = 2  // Not implemented yet?
	TransportType_Webrtc TransportType = 99 // UDP transport: WebRTC DataChannel
)

func (TransportType) Descriptor

func (TransportType) Enum

func (x TransportType) Enum() *TransportType

func (TransportType) EnumDescriptor deprecated

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

Deprecated: Use TransportType.Descriptor instead.

func (TransportType) Number

func (TransportType) String

func (x TransportType) String() string

func (TransportType) Type

func (*TransportType) UnmarshalJSON deprecated

func (x *TransportType) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type WebRTCICECandidate

type WebRTCICECandidate struct {

	// IP is represented in its 16-byte form
	IpUpper *uint64 `protobuf:"varint,1,req,name=ip_upper,json=ipUpper" json:"ip_upper,omitempty"`
	IpLower *uint64 `protobuf:"varint,2,req,name=ip_lower,json=ipLower" json:"ip_lower,omitempty"`
	// Composed info includes port, tcptype (unset if not tcp), candidate type (host, srflx, prflx), protocol (TCP/UDP), and component (RTP/RTCP)
	ComposedInfo *uint32 `protobuf:"varint,3,req,name=composed_info,json=composedInfo" json:"composed_info,omitempty"`
	// contains filtered or unexported fields
}

Deflated ICE Candidate by seed2sdp package

func (*WebRTCICECandidate) Descriptor deprecated

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

Deprecated: Use WebRTCICECandidate.ProtoReflect.Descriptor instead.

func (*WebRTCICECandidate) GetComposedInfo

func (x *WebRTCICECandidate) GetComposedInfo() uint32

func (*WebRTCICECandidate) GetIpLower

func (x *WebRTCICECandidate) GetIpLower() uint64

func (*WebRTCICECandidate) GetIpUpper

func (x *WebRTCICECandidate) GetIpUpper() uint64

func (*WebRTCICECandidate) ProtoMessage

func (*WebRTCICECandidate) ProtoMessage()

func (*WebRTCICECandidate) ProtoReflect

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

func (*WebRTCICECandidate) Reset

func (x *WebRTCICECandidate) Reset()

func (*WebRTCICECandidate) String

func (x *WebRTCICECandidate) String() string

type WebRTCSDP

type WebRTCSDP struct {
	Type       *uint32               `protobuf:"varint,1,req,name=type" json:"type,omitempty"`
	Candidates []*WebRTCICECandidate `protobuf:"bytes,2,rep,name=candidates" json:"candidates,omitempty"` // there could be multiple candidates
	// contains filtered or unexported fields
}

Deflated SDP for WebRTC by seed2sdp package

func (*WebRTCSDP) Descriptor deprecated

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

Deprecated: Use WebRTCSDP.ProtoReflect.Descriptor instead.

func (*WebRTCSDP) GetCandidates

func (x *WebRTCSDP) GetCandidates() []*WebRTCICECandidate

func (*WebRTCSDP) GetType

func (x *WebRTCSDP) GetType() uint32

func (*WebRTCSDP) ProtoMessage

func (*WebRTCSDP) ProtoMessage()

func (*WebRTCSDP) ProtoReflect

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

func (*WebRTCSDP) Reset

func (x *WebRTCSDP) Reset()

func (*WebRTCSDP) String

func (x *WebRTCSDP) String() string

type WebRTCSignal

type WebRTCSignal struct {
	Seed *string    `protobuf:"bytes,1,req,name=seed" json:"seed,omitempty"`
	Sdp  *WebRTCSDP `protobuf:"bytes,2,req,name=sdp" json:"sdp,omitempty"`
	// contains filtered or unexported fields
}

WebRTCSignal includes a deflated SDP and a seed

func (*WebRTCSignal) Descriptor deprecated

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

Deprecated: Use WebRTCSignal.ProtoReflect.Descriptor instead.

func (*WebRTCSignal) GetSdp

func (x *WebRTCSignal) GetSdp() *WebRTCSDP

func (*WebRTCSignal) GetSeed

func (x *WebRTCSignal) GetSeed() string

func (*WebRTCSignal) ProtoMessage

func (*WebRTCSignal) ProtoMessage()

func (*WebRTCSignal) ProtoReflect

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

func (*WebRTCSignal) Reset

func (x *WebRTCSignal) Reset()

func (*WebRTCSignal) String

func (x *WebRTCSignal) String() string

Jump to

Keyboard shortcuts

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