From 427e5f9d8e6b8e6f7e4ca45b2d0633a670682a2e Mon Sep 17 00:00:00 2001 From: Carson Hoffman Date: Thu, 6 Aug 2020 13:18:13 -0400 Subject: [PATCH] Registration API Functionality (#45) * Basic registration API scaffold * Add registration-api to top-level Makefile * Look for C2S payload, not TLSDecoySpec * Add basic ZMQ proxy * Add zmq-proxy to Makefile * Add .PHONY targets to Makefile * Switch application to connecting to ZMQ * Switch API to binding socket * Add logging info in /register endpoint * Expect shared secret, FSP, VSP in payload * Add default config values for registration.refraction.network * Add ZMQ auth to registration API * Auth TODO: done! * Simplify client-to-API payload * Use absolute imports * Set up heartbeat to detect failed connections * Add additional logging * Extract ZMQ payload creation from endpoint handler * Abstract registration publishing, test handler * Re-work ZMQ architecture * Clean up detect.c * Add README for API * Move flags from FSP to C2S * Add ZMQ address options --- Cargo.toml | 2 +- Makefile | 9 +- application/lib/proxies.go | 4 +- application/lib/registration.go | 8 +- application/main.go | 58 +- detect.c | 99 +- proto/signalling.proto | 36 +- proto/signalling.rs | 2617 ++++++++++++++++++---------- registration-api/Caddyfile.example | 9 + registration-api/Makefile | 2 + registration-api/README.md | 9 + registration-api/api_test.go | 206 +++ registration-api/config.toml | 24 + registration-api/main.go | 168 ++ rust_foreign_interface.h | 27 +- src/elligator.rs | 10 +- src/lib.rs | 13 +- src/process_packet.rs | 27 +- src/signalling.rs | 2617 ++++++++++++++++++---------- zmq-proxy/Makefile | 2 + zmq-proxy/README.md | 7 + zmq-proxy/config.toml | 42 + zmq-proxy/main.go | 131 ++ 23 files changed, 4245 insertions(+), 1882 deletions(-) create mode 100644 registration-api/Caddyfile.example create mode 100644 registration-api/Makefile create mode 100644 registration-api/README.md create mode 100644 registration-api/api_test.go create mode 100644 registration-api/config.toml create mode 100644 registration-api/main.go create mode 100644 zmq-proxy/Makefile create mode 100644 zmq-proxy/README.md create mode 100644 zmq-proxy/config.toml create mode 100644 zmq-proxy/main.go diff --git a/Cargo.toml b/Cargo.toml index dfeb8eea..2c9e472f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ errno = "0.2.3" radix = { git = "https://github.com/refraction-networking/radix" } tuntap = { git = "https://github.com/ewust/tuntap.rs" } ipnetwork = "^0.14.0" -protobuf = "2.6" +protobuf = "2.16.2" hkdf = "0.7" sha2 = "0.8.*" hex = "0.3.*" diff --git a/Makefile b/Makefile index 76511435..f1e7cdc5 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ CFLAGS = -Wall -DENABLE_BPF -DHAVE_PF_RING -DHAVE_PF_RING_ZC -DTAPDANCE_USE_PF_R PROTO_RS_PATH=src/signalling.rs -all: rust libtd dark-decoy app ${PROTO_RS_PATH} +all: rust libtd dark-decoy app registration-api zmq-proxy ${PROTO_RS_PATH} rust: ./src/*.rs cargo build --${DEBUG_OR_RELEASE} @@ -29,6 +29,12 @@ libtd: dark-decoy: detect.c loadkey.c rust_util.c rust libtapdance ${CC} ${CFLAGS} -o $@ detect.c loadkey.c rust_util.c ${LIBS} +registration-api: + cd ./registration-api/ && make + +zmq-proxy: + cd ./zmq-proxy/ && make + clean: cargo clean rm -f ${TARGETS} *.o *~ @@ -36,3 +42,4 @@ clean: ${PROTO_RS_PATH}: cd ./proto/ && make +.PHONY: registration-api zmq-proxy diff --git a/application/lib/proxies.go b/application/lib/proxies.go index cd3f7daf..a3709254 100644 --- a/application/lib/proxies.go +++ b/application/lib/proxies.go @@ -179,7 +179,7 @@ func MinTransportProxy(regManager *RegistrationManager, clientConn *net.TCPConn, } defer covertConn.Close() - if reg.Flags&TdFlagProxyHeader != 0 { + if reg.Flags.GetProxyHeader() { err = writePROXYHeader(covertConn, clientConn.RemoteAddr().String()) if err != nil { logger.Printf("failed to send PROXY header to covert: %s", err) @@ -212,7 +212,7 @@ func twoWayProxy(reg *DecoyRegistration, clientConn *net.TCPConn, originalDstIP } defer covertConn.Close() - if reg.Flags&TdFlagProxyHeader != 0 { + if reg.Flags.GetProxyHeader() { err = writePROXYHeader(covertConn, clientConn.RemoteAddr().String()) if err != nil { logger.Printf("failed to send PROXY header to covert: %s", err) diff --git a/application/lib/registration.go b/application/lib/registration.go index 7749e230..d5ca369b 100644 --- a/application/lib/registration.go +++ b/application/lib/registration.go @@ -38,7 +38,7 @@ func NewRegistrationManager() *RegistrationManager { } } -func (regManager *RegistrationManager) NewRegistration(c2s *pb.ClientToStation, conjureKeys *ConjureSharedKeys, flags [1]byte, includeV6 bool) (*DecoyRegistration, error) { +func (regManager *RegistrationManager) NewRegistration(c2s *pb.ClientToStation, conjureKeys *ConjureSharedKeys, includeV6 bool) (*DecoyRegistration, error) { phantomAddr, err := regManager.PhantomSelector.Select( conjureKeys.DarkDecoySeed, uint(c2s.GetDecoyListGeneration()), includeV6) @@ -52,7 +52,7 @@ func (regManager *RegistrationManager) NewRegistration(c2s *pb.ClientToStation, keys: conjureKeys, Covert: c2s.GetCovertAddress(), Mask: c2s.GetMaskedDecoyServerName(), - Flags: uint8(flags[0]), + Flags: c2s.Flags, Transport: uint(c2s.GetTransport()), // hack DecoyListVersion: c2s.GetDecoyListGeneration(), RegistrationTime: time.Now(), @@ -95,7 +95,7 @@ type DecoyRegistration struct { DarkDecoy *net.IP keys *ConjureSharedKeys Covert, Mask string - Flags uint8 + Flags *pb.RegistrationFlags Transport uint RegistrationTime time.Time DecoyListVersion uint32 @@ -114,7 +114,7 @@ func (reg *DecoyRegistration) String() string { Phantom string SharedSecret string Covert, Mask string - Flags uint8 + Flags *pb.RegistrationFlags Transport uint RegTime time.Time DecoyListVersion uint32 diff --git a/application/main.go b/application/main.go index 0016a0c3..06744589 100644 --- a/application/main.go +++ b/application/main.go @@ -1,18 +1,16 @@ package main import ( - "bytes" - "encoding/binary" - "fmt" + "flag" "log" "net" "os" "syscall" "time" - dd "./lib" "github.com/golang/protobuf/proto" zmq "github.com/pebbe/zmq4" + dd "github.com/refraction-networking/conjure/application/lib" pb "github.com/refraction-networking/gotapdance/protobuf" ) @@ -62,7 +60,7 @@ func handleNewConn(regManager *dd.RegistrationManager, clientConn *net.TCPConn) }*/ } -func get_zmq_updates(regManager *dd.RegistrationManager) { +func get_zmq_updates(connectAddr string, regManager *dd.RegistrationManager) { logger := log.New(os.Stdout, "[ZMQ] ", log.Ldate|log.Lmicroseconds) sub, err := zmq.NewSocket(zmq.SUB) if err != nil { @@ -71,11 +69,10 @@ func get_zmq_updates(regManager *dd.RegistrationManager) { } defer sub.Close() - bindAddr := "tcp://*:5591" - sub.Bind(bindAddr) + sub.Connect(connectAddr) sub.SetSubscribe("") - logger.Printf("ZMQ listening on %v\n", bindAddr) + logger.Printf("ZMQ connected to %v\n", connectAddr) for { @@ -103,51 +100,26 @@ func get_zmq_updates(regManager *dd.RegistrationManager) { } func recieve_zmq_message(sub *zmq.Socket, regManager *dd.RegistrationManager) ([]*dd.DecoyRegistration, error) { - // var ipAddr []byte - // var covertAddrLen, maskedAddrLen [1]byte - - var sharedSecret [32]byte - var fixedSizePayload [6]byte - var flags [1]byte - minMsgLen := 32 + 6 + 1 // + 16 - msg, err := sub.RecvBytes(0) if err != nil { logger.Printf("error reading from ZMQ socket: %v\n", err) return nil, err } - if len(msg) < minMsgLen { - logger.Printf("short message of size %v\n", len(msg)) - return nil, fmt.Errorf("short message of size %v", len(msg)) - } - - msgReader := bytes.NewReader(msg) - - msgReader.Read(sharedSecret[:]) - msgReader.Read(fixedSizePayload[:]) - vspSize := binary.BigEndian.Uint16(fixedSizePayload[0:2]) - 16 - flags = [1]byte{fixedSizePayload[2]} - - clientToStationBytes := make([]byte, vspSize) - - msgReader.Read(clientToStationBytes) - - // parse c2s - clientToStation := &pb.ClientToStation{} - err = proto.Unmarshal(clientToStationBytes, clientToStation) + parsed := &pb.ZMQPayload{} + err = proto.Unmarshal(msg, parsed) if err != nil { logger.Printf("Failed to unmarshall ClientToStation: %v", err) return nil, err } - conjureKeys, err := dd.GenSharedKeys(sharedSecret[:]) + conjureKeys, err := dd.GenSharedKeys(parsed.SharedSecret) // Register one or both of v4 and v6 based on support specified by the client var newRegs []*dd.DecoyRegistration - if clientToStation.GetV4Support() { - reg, err := regManager.NewRegistration(clientToStation, &conjureKeys, flags, false) + if parsed.RegistrationPayload.GetV4Support() { + reg, err := regManager.NewRegistration(parsed.RegistrationPayload, &conjureKeys, false) if err != nil { logger.Printf("Failed to create registration: %v", err) return nil, err @@ -159,8 +131,8 @@ func recieve_zmq_message(sub *zmq.Socket, regManager *dd.RegistrationManager) ([ newRegs = append(newRegs, reg) } - if clientToStation.GetV6Support() { - reg, err := regManager.NewRegistration(clientToStation, &conjureKeys, flags, true) + if parsed.RegistrationPayload.GetV6Support() { + reg, err := regManager.NewRegistration(parsed.RegistrationPayload, &conjureKeys, true) if err != nil { logger.Printf("Failed to create registration: %v", err) return nil, err @@ -177,9 +149,13 @@ func recieve_zmq_message(sub *zmq.Socket, regManager *dd.RegistrationManager) ([ var logger *log.Logger func main() { + var zmqAddress string + flag.StringVar(&zmqAddress, "zmq-address", "ipc://@zmq-proxy", "Address of ZMQ proxy") + flag.Parse() + regManager := dd.NewRegistrationManager() logger = regManager.Logger - go get_zmq_updates(regManager) + go get_zmq_updates(zmqAddress, regManager) go func() { for { diff --git a/detect.c b/detect.c index 1758b315..806c5abe 100644 --- a/detect.c +++ b/detect.c @@ -11,7 +11,7 @@ #include #include #include -//#include +#include // The Makefile in this directory provides a `make tapdance` and a // `make zc_tapdance` rule. The latter causes the following #define to happen. @@ -68,21 +68,13 @@ void* g_rust_failed_map = 0; int g_update_cli_conf_when_convenient = 0; int g_update_overloaded_decoys_when_convenient = 0; -//void *g_zmq_ctx; -//void *g_zmq_socket; - #define TIMESPEC_DIFF(a, b) ((a.tv_sec - b.tv_sec)*1000000000LL + \ ((int64_t)a.tv_nsec - (int64_t)b.tv_nsec)) void the_program(uint8_t core_id, unsigned int log_interval, - uint8_t* station_key, char* zmq_listener) + uint8_t* station_key, char* workers_socket_addr) { - struct RustGlobalsStruct rust_globals = rust_detect_init(core_id, station_key); - - // init zeromq - //g_zmq_ctx = zmq_ctx_new(); - //g_zmq_socket = zmq_socket(g_zmq_ctx, ZMQ_PUB); - //zmq_connect(g_zmq_socket, zmq_listener); + struct RustGlobalsStruct rust_globals = rust_detect_init(core_id, station_key, workers_socket_addr); //g_rust_failed_map = rust_globals.fail_map; //g_rust_cli_conf_proto_ptr = rust_globals.cli_conf; @@ -333,7 +325,7 @@ void startup_pfring_maybezc(unsigned int cluster_id, int proc_ind) pid_t start_tapdance_process(int core_affinity, unsigned int cluster_id, int proc_ind, unsigned int log_interval, - uint8_t* station_key, char* zmq_listener) + uint8_t* station_key, char* workers_socket_addr) { pid_t the_pid = fork(); if(the_pid == 0) @@ -345,7 +337,7 @@ pid_t start_tapdance_process(int core_affinity, unsigned int cluster_id, signal(SIGINT, sigproc_child); signal(SIGTERM, sigproc_child); signal(SIGPIPE, ignore_sigpipe); - the_program(proc_ind, log_interval, station_key, zmq_listener); + the_program(proc_ind, log_interval, station_key, workers_socket_addr); } printf("Core %d: PID %d, lcore %d\n", proc_ind, the_pid, core_affinity); return the_pid; @@ -378,7 +370,8 @@ struct cmd_options uint8_t* public_key; // the public key, used only for diagnostic // (all nuls if not provided) int skip_core; // -1 if not skipping any core, otherwise the core to skip - char* zmq_address; + char* zmq_address; // address of output ZMQ socket to bind + char* zmq_worker_address; // address of ZMQ socket to bind for communication between threads }; static uint8_t station_key[TD_KEYLEN_BYTES] = { @@ -399,6 +392,8 @@ void parse_cmd_args(int argc, char* argv[], struct cmd_options* options) options->pfring_offset = 0; options->log_interval = 1000; // milliseconds int skip_core = -1; // If >0, skip this core when incrementing + options->zmq_address = "ipc://@detector"; + options->zmq_worker_address = "ipc://@detector-workers"; char* keyfile_name = 0; @@ -406,7 +401,7 @@ void parse_cmd_args(int argc, char* argv[], struct cmd_options* options) options->public_key = public_key; char c; - while ((c = getopt(argc,argv,"i:n:c:o:l:K:s:a:z:")) != -1) + while ((c = getopt(argc,argv,"i:n:c:o:l:K:s:a:w:z:")) != -1) { switch (c) { @@ -435,10 +430,14 @@ void parse_cmd_args(int argc, char* argv[], struct cmd_options* options) case 's': skip_core = atoi(optarg); break; - case 'a': - options->zmq_address = malloc(strlen(optarg)); - strcpy(options->zmq_address, optarg); - break; + case 'a': + options->zmq_address = malloc(strlen(optarg)); + strcpy(options->zmq_address, optarg); + break; + case 'w': + options->zmq_worker_address = malloc(strlen(optarg)); + strcpy(options->zmq_worker_address, optarg); + break; case 'z': options->pfring_offset = atoi(optarg); break; @@ -520,25 +519,49 @@ void parse_cmd_args(int argc, char* argv[], struct cmd_options* options) fflush(stdout); } -// id is a 1-byte identifier that uniquely determines which proxy process it will go to -// should be the first byte of the session (alternatively, hash of the client IP) -//extern void *g_zmq_socket; // Provided by zc_tapdance -int send_packet_to_proxy(uint8_t id, uint8_t *pkt, size_t len) +// Start a new process to proxy messages between +// the worker threads and the outgoing ZMQ socket. +int handle_zmq_proxy(char *socket_addr, char *workers_socket_addr) { - /* - zmq_msg_t msg; - int rc = zmq_msg_init_size (&msg, len+1); - if (rc != 0) { - return rc; + int pid = fork(); + if (pid == 0) { + // Set up ZMQ sockets, one for publishing to the proxy and one for taking in + // messages from other threads + void *ctx = zmq_ctx_new(); + void *pub = zmq_socket(ctx, ZMQ_PUB); + + // Bind the socket for publishing to the proxy + printf("binding zmq socket to %s\n", socket_addr); + int rc = zmq_bind(pub, socket_addr); + if (rc != 0) { + printf("bind on pub socket failed: %s\n", zmq_strerror(errno)); + return rc; + } + + void *sub = zmq_socket(ctx, ZMQ_SUB); + rc = zmq_setsockopt(sub, ZMQ_SUBSCRIBE, NULL, 0); + if (rc != 0) { + printf("failed to set sock opt: %s\n", zmq_strerror(errno)); + return rc; + } + + // Bind the socket for communication between worker threads + // (they're actually set up as separate processes, so we + // need to use IPC rather than inproc communication) + printf("binding zmq worker socket to %s\n", workers_socket_addr); + rc = zmq_bind(sub, workers_socket_addr); + if (rc != 0) { + printf("bind on sub socket failed: %s\n", zmq_strerror(errno)); + return rc; + } + + // Proxy traffic between worker threads and the outgoing socket + rc = zmq_proxy(sub, pub, NULL); + if (rc != 0) { + printf("proxy returned error: %s\n", zmq_strerror(errno)); + return rc; + } } - // TODO: can we do this without memcpy? Maybe setup msg - // or even just use zmq_send directly? - memcpy(zmq_msg_data(&msg), &id, 1); - memcpy(&(((char*)zmq_msg_data(&msg))[1]), pkt, len); - // TODO: use ZMQ_DONTWAIT to make this non-blocking - return zmq_msg_send(&msg, g_zmq_socket, 0); - */ - // Not implemented return 0; } @@ -569,6 +592,8 @@ int main(int argc, char* argv[]) sa2.sa_sigaction = notify_overloaded_decoys_file_update; sigaction(SIGUSR2, &sa2, NULL); + handle_zmq_proxy(options.zmq_address, options.zmq_worker_address); + int i; int core_num = options.core_affinity_offset; for (i=0; i protocol used in client to proxy station - optional uint32 c2s_transport = 24; + // A collection of optional flags for the registration. + optional RegistrationFlags flags = 24; // Random-sized junk to defeat packet size fingerprinting. optional bytes padding = 100; } +// Message type used as the request body when registering via the HTTP API. +// This message is assumed to be sent via TLS, meaning that sending the secret outright is acceptable. +message ClientToAPI { + // The secret that will be used when forming phantom connections. + optional bytes secret = 1; + + // The ClientToStation payload; the same as used in decoy registrations. + optional ClientToStation registration_payload = 2; +} + +message ZMQPayload { + optional bytes shared_secret = 1; + optional ClientToStation registration_payload = 3; +} + message SessionStats { optional uint32 failed_decoys_amount = 20; // how many decoys were tried before success diff --git a/proto/signalling.rs b/proto/signalling.rs index 31bde054..4ec22b3c 100644 --- a/proto/signalling.rs +++ b/proto/signalling.rs @@ -1,11 +1,12 @@ -// This file is generated by rust-protobuf 2.6.2. Do not edit +// This file is generated by rust-protobuf 2.16.2. Do not edit // @generated -// https://github.com/Manishearth/rust-clippy/issues/702 +// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] -#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_attributes)] +#![rustfmt::skip] #![allow(box_pointers)] #![allow(dead_code)] @@ -14,12 +15,13 @@ #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] -#![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `signalling.proto` -use protobuf::Message as Message_imported_for_functions; -use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_16_2; #[derive(PartialEq,Clone,Default)] pub struct PubKey { @@ -103,7 +105,7 @@ impl ::protobuf::Message for PubKey { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -136,12 +138,12 @@ impl ::protobuf::Message for PubKey { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.key.as_ref() { os.write_bytes(1, &v)?; } if let Some(v) = self.field_type { - os.write_enum(2, v.value())?; + os.write_enum(2, ::protobuf::ProtobufEnum::value(&v))?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) @@ -159,13 +161,13 @@ impl ::protobuf::Message for PubKey { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -178,40 +180,30 @@ impl ::protobuf::Message for PubKey { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "key", - |m: &PubKey| { &m.key }, - |m: &mut PubKey| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "type", - |m: &PubKey| { &m.field_type }, - |m: &mut PubKey| { &mut m.field_type }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "PubKey", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "key", + |m: &PubKey| { &m.key }, + |m: &mut PubKey| { &mut m.key }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "type", + |m: &PubKey| { &m.field_type }, + |m: &mut PubKey| { &mut m.field_type }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "PubKey", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static PubKey { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const PubKey, - }; - unsafe { - instance.get(PubKey::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PubKey::new) } } @@ -224,14 +216,14 @@ impl ::protobuf::Clear for PubKey { } impl ::std::fmt::Debug for PubKey { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for PubKey { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -241,7 +233,7 @@ pub struct TLSDecoySpec { hostname: ::protobuf::SingularField<::std::string::String>, ipv4addr: ::std::option::Option, ipv6addr: ::protobuf::SingularField<::std::vec::Vec>, - pubkey: ::protobuf::SingularPtrField, + pub pubkey: ::protobuf::SingularPtrField, timeout: ::std::option::Option, tcpwin: ::std::option::Option, // special fields @@ -355,7 +347,7 @@ impl TLSDecoySpec { pub fn get_pubkey(&self) -> &PubKey { - self.pubkey.as_ref().unwrap_or_else(|| PubKey::default_instance()) + self.pubkey.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_pubkey(&mut self) { self.pubkey.clear(); @@ -433,7 +425,7 @@ impl ::protobuf::Message for TLSDecoySpec { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -503,7 +495,7 @@ impl ::protobuf::Message for TLSDecoySpec { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.hostname.as_ref() { os.write_string(1, &v)?; } @@ -540,13 +532,13 @@ impl ::protobuf::Message for TLSDecoySpec { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -559,60 +551,50 @@ impl ::protobuf::Message for TLSDecoySpec { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "hostname", - |m: &TLSDecoySpec| { &m.hostname }, - |m: &mut TLSDecoySpec| { &mut m.hostname }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFixed32>( - "ipv4addr", - |m: &TLSDecoySpec| { &m.ipv4addr }, - |m: &mut TLSDecoySpec| { &mut m.ipv4addr }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "ipv6addr", - |m: &TLSDecoySpec| { &m.ipv6addr }, - |m: &mut TLSDecoySpec| { &mut m.ipv6addr }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pubkey", - |m: &TLSDecoySpec| { &m.pubkey }, - |m: &mut TLSDecoySpec| { &mut m.pubkey }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "timeout", - |m: &TLSDecoySpec| { &m.timeout }, - |m: &mut TLSDecoySpec| { &mut m.timeout }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tcpwin", - |m: &TLSDecoySpec| { &m.tcpwin }, - |m: &mut TLSDecoySpec| { &mut m.tcpwin }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "TLSDecoySpec", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "hostname", + |m: &TLSDecoySpec| { &m.hostname }, + |m: &mut TLSDecoySpec| { &mut m.hostname }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFixed32>( + "ipv4addr", + |m: &TLSDecoySpec| { &m.ipv4addr }, + |m: &mut TLSDecoySpec| { &mut m.ipv4addr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "ipv6addr", + |m: &TLSDecoySpec| { &m.ipv6addr }, + |m: &mut TLSDecoySpec| { &mut m.ipv6addr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "pubkey", + |m: &TLSDecoySpec| { &m.pubkey }, + |m: &mut TLSDecoySpec| { &mut m.pubkey }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "timeout", + |m: &TLSDecoySpec| { &m.timeout }, + |m: &mut TLSDecoySpec| { &mut m.timeout }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tcpwin", + |m: &TLSDecoySpec| { &m.tcpwin }, + |m: &mut TLSDecoySpec| { &mut m.tcpwin }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "TLSDecoySpec", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static TLSDecoySpec { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const TLSDecoySpec, - }; - unsafe { - instance.get(TLSDecoySpec::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(TLSDecoySpec::new) } } @@ -629,24 +611,25 @@ impl ::protobuf::Clear for TLSDecoySpec { } impl ::std::fmt::Debug for TLSDecoySpec { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for TLSDecoySpec { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct ClientConf { // message fields - decoy_list: ::protobuf::SingularPtrField, + pub decoy_list: ::protobuf::SingularPtrField, generation: ::std::option::Option, - default_pubkey: ::protobuf::SingularPtrField, - dark_decoy_blocks: ::protobuf::SingularPtrField, + pub default_pubkey: ::protobuf::SingularPtrField, + pub dark_decoy_blocks: ::protobuf::SingularPtrField, + pub conjure_pubkey: ::protobuf::SingularPtrField, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, @@ -667,7 +650,7 @@ impl ClientConf { pub fn get_decoy_list(&self) -> &DecoyList { - self.decoy_list.as_ref().unwrap_or_else(|| DecoyList::default_instance()) + self.decoy_list.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_decoy_list(&mut self) { self.decoy_list.clear(); @@ -719,7 +702,7 @@ impl ClientConf { pub fn get_default_pubkey(&self) -> &PubKey { - self.default_pubkey.as_ref().unwrap_or_else(|| PubKey::default_instance()) + self.default_pubkey.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_default_pubkey(&mut self) { self.default_pubkey.clear(); @@ -752,7 +735,7 @@ impl ClientConf { pub fn get_dark_decoy_blocks(&self) -> &DarkDecoyBlocks { - self.dark_decoy_blocks.as_ref().unwrap_or_else(|| DarkDecoyBlocks::default_instance()) + self.dark_decoy_blocks.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_dark_decoy_blocks(&mut self) { self.dark_decoy_blocks.clear(); @@ -780,6 +763,39 @@ impl ClientConf { pub fn take_dark_decoy_blocks(&mut self) -> DarkDecoyBlocks { self.dark_decoy_blocks.take().unwrap_or_else(|| DarkDecoyBlocks::new()) } + + // optional .tapdance.PubKey conjure_pubkey = 5; + + + pub fn get_conjure_pubkey(&self) -> &PubKey { + self.conjure_pubkey.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_conjure_pubkey(&mut self) { + self.conjure_pubkey.clear(); + } + + pub fn has_conjure_pubkey(&self) -> bool { + self.conjure_pubkey.is_some() + } + + // Param is passed by value, moved + pub fn set_conjure_pubkey(&mut self, v: PubKey) { + self.conjure_pubkey = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_conjure_pubkey(&mut self) -> &mut PubKey { + if self.conjure_pubkey.is_none() { + self.conjure_pubkey.set_default(); + } + self.conjure_pubkey.as_mut().unwrap() + } + + // Take field + pub fn take_conjure_pubkey(&mut self) -> PubKey { + self.conjure_pubkey.take().unwrap_or_else(|| PubKey::new()) + } } impl ::protobuf::Message for ClientConf { @@ -799,10 +815,15 @@ impl ::protobuf::Message for ClientConf { return false; } }; + for v in &self.conjure_pubkey { + if !v.is_initialized() { + return false; + } + }; true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -822,6 +843,9 @@ impl ::protobuf::Message for ClientConf { 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.dark_decoy_blocks)?; }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.conjure_pubkey)?; + }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, @@ -849,12 +873,16 @@ impl ::protobuf::Message for ClientConf { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } + if let Some(ref v) = self.conjure_pubkey.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.decoy_list.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -873,6 +901,11 @@ impl ::protobuf::Message for ClientConf { os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; } + if let Some(ref v) = self.conjure_pubkey.as_ref() { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -889,13 +922,13 @@ impl ::protobuf::Message for ClientConf { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -908,50 +941,45 @@ impl ::protobuf::Message for ClientConf { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "decoy_list", - |m: &ClientConf| { &m.decoy_list }, - |m: &mut ClientConf| { &mut m.decoy_list }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "generation", - |m: &ClientConf| { &m.generation }, - |m: &mut ClientConf| { &mut m.generation }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "default_pubkey", - |m: &ClientConf| { &m.default_pubkey }, - |m: &mut ClientConf| { &mut m.default_pubkey }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "dark_decoy_blocks", - |m: &ClientConf| { &m.dark_decoy_blocks }, - |m: &mut ClientConf| { &mut m.dark_decoy_blocks }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ClientConf", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "decoy_list", + |m: &ClientConf| { &m.decoy_list }, + |m: &mut ClientConf| { &mut m.decoy_list }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "generation", + |m: &ClientConf| { &m.generation }, + |m: &mut ClientConf| { &mut m.generation }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "default_pubkey", + |m: &ClientConf| { &m.default_pubkey }, + |m: &mut ClientConf| { &mut m.default_pubkey }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "dark_decoy_blocks", + |m: &ClientConf| { &m.dark_decoy_blocks }, + |m: &mut ClientConf| { &mut m.dark_decoy_blocks }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "conjure_pubkey", + |m: &ClientConf| { &m.conjure_pubkey }, + |m: &mut ClientConf| { &mut m.conjure_pubkey }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ClientConf", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ClientConf { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ClientConf, - }; - unsafe { - instance.get(ClientConf::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ClientConf::new) } } @@ -961,26 +989,27 @@ impl ::protobuf::Clear for ClientConf { self.generation = ::std::option::Option::None; self.default_pubkey.clear(); self.dark_decoy_blocks.clear(); + self.conjure_pubkey.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for ClientConf { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ClientConf { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct DecoyList { // message fields - tls_decoys: ::protobuf::RepeatedField, + pub tls_decoys: ::protobuf::RepeatedField, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, @@ -1033,7 +1062,7 @@ impl ::protobuf::Message for DecoyList { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1061,7 +1090,7 @@ impl ::protobuf::Message for DecoyList { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { for v in &self.tls_decoys { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1083,13 +1112,13 @@ impl ::protobuf::Message for DecoyList { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -1102,35 +1131,25 @@ impl ::protobuf::Message for DecoyList { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "tls_decoys", - |m: &DecoyList| { &m.tls_decoys }, - |m: &mut DecoyList| { &mut m.tls_decoys }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "DecoyList", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "tls_decoys", + |m: &DecoyList| { &m.tls_decoys }, + |m: &mut DecoyList| { &mut m.tls_decoys }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "DecoyList", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static DecoyList { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const DecoyList, - }; - unsafe { - instance.get(DecoyList::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(DecoyList::new) } } @@ -1142,21 +1161,21 @@ impl ::protobuf::Clear for DecoyList { } impl ::std::fmt::Debug for DecoyList { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DecoyList { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct DarkDecoyBlocks { // message fields - blocks: ::protobuf::RepeatedField<::std::string::String>, + pub blocks: ::protobuf::RepeatedField<::std::string::String>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, @@ -1204,7 +1223,7 @@ impl ::protobuf::Message for DarkDecoyBlocks { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1231,7 +1250,7 @@ impl ::protobuf::Message for DarkDecoyBlocks { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { for v in &self.blocks { os.write_string(1, &v)?; }; @@ -1251,13 +1270,13 @@ impl ::protobuf::Message for DarkDecoyBlocks { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -1270,35 +1289,25 @@ impl ::protobuf::Message for DarkDecoyBlocks { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "blocks", - |m: &DarkDecoyBlocks| { &m.blocks }, - |m: &mut DarkDecoyBlocks| { &mut m.blocks }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "DarkDecoyBlocks", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "blocks", + |m: &DarkDecoyBlocks| { &m.blocks }, + |m: &mut DarkDecoyBlocks| { &mut m.blocks }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "DarkDecoyBlocks", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static DarkDecoyBlocks { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const DarkDecoyBlocks, - }; - unsafe { - instance.get(DarkDecoyBlocks::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(DarkDecoyBlocks::new) } } @@ -1310,14 +1319,14 @@ impl ::protobuf::Clear for DarkDecoyBlocks { } impl ::std::fmt::Debug for DarkDecoyBlocks { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DarkDecoyBlocks { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -1326,7 +1335,7 @@ pub struct StationToClient { // message fields protocol_version: ::std::option::Option, state_transition: ::std::option::Option, - config_info: ::protobuf::SingularPtrField, + pub config_info: ::protobuf::SingularPtrField, err_reason: ::std::option::Option, tmp_backoff: ::std::option::Option, station_id: ::protobuf::SingularField<::std::string::String>, @@ -1389,7 +1398,7 @@ impl StationToClient { pub fn get_config_info(&self) -> &ClientConf { - self.config_info.as_ref().unwrap_or_else(|| ClientConf::default_instance()) + self.config_info.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_config_info(&mut self) { self.config_info.clear(); @@ -1539,7 +1548,7 @@ impl ::protobuf::Message for StationToClient { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1611,12 +1620,12 @@ impl ::protobuf::Message for StationToClient { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.protocol_version { os.write_uint32(1, v)?; } if let Some(v) = self.state_transition { - os.write_enum(2, v.value())?; + os.write_enum(2, ::protobuf::ProtobufEnum::value(&v))?; } if let Some(ref v) = self.config_info.as_ref() { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; @@ -1624,7 +1633,7 @@ impl ::protobuf::Message for StationToClient { v.write_to_with_cached_sizes(os)?; } if let Some(v) = self.err_reason { - os.write_enum(4, v.value())?; + os.write_enum(4, ::protobuf::ProtobufEnum::value(&v))?; } if let Some(v) = self.tmp_backoff { os.write_uint32(5, v)?; @@ -1651,13 +1660,13 @@ impl ::protobuf::Message for StationToClient { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -1670,65 +1679,55 @@ impl ::protobuf::Message for StationToClient { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "protocol_version", - |m: &StationToClient| { &m.protocol_version }, - |m: &mut StationToClient| { &mut m.protocol_version }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "state_transition", - |m: &StationToClient| { &m.state_transition }, - |m: &mut StationToClient| { &mut m.state_transition }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "config_info", - |m: &StationToClient| { &m.config_info }, - |m: &mut StationToClient| { &mut m.config_info }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err_reason", - |m: &StationToClient| { &m.err_reason }, - |m: &mut StationToClient| { &mut m.err_reason }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tmp_backoff", - |m: &StationToClient| { &m.tmp_backoff }, - |m: &mut StationToClient| { &mut m.tmp_backoff }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "station_id", - |m: &StationToClient| { &m.station_id }, - |m: &mut StationToClient| { &mut m.station_id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "padding", - |m: &StationToClient| { &m.padding }, - |m: &mut StationToClient| { &mut m.padding }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "StationToClient", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "protocol_version", + |m: &StationToClient| { &m.protocol_version }, + |m: &mut StationToClient| { &mut m.protocol_version }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "state_transition", + |m: &StationToClient| { &m.state_transition }, + |m: &mut StationToClient| { &mut m.state_transition }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "config_info", + |m: &StationToClient| { &m.config_info }, + |m: &mut StationToClient| { &mut m.config_info }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "err_reason", + |m: &StationToClient| { &m.err_reason }, + |m: &mut StationToClient| { &mut m.err_reason }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tmp_backoff", + |m: &StationToClient| { &m.tmp_backoff }, + |m: &mut StationToClient| { &mut m.tmp_backoff }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "station_id", + |m: &StationToClient| { &m.station_id }, + |m: &mut StationToClient| { &mut m.station_id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "padding", + |m: &StationToClient| { &m.padding }, + |m: &mut StationToClient| { &mut m.padding }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "StationToClient", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static StationToClient { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const StationToClient, - }; - unsafe { - instance.get(StationToClient::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StationToClient::new) } } @@ -1746,14 +1745,287 @@ impl ::protobuf::Clear for StationToClient { } impl ::std::fmt::Debug for StationToClient { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for StationToClient { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct RegistrationFlags { + // message fields + upload_only: ::std::option::Option, + dark_decoy: ::std::option::Option, + proxy_header: ::std::option::Option, + use_TIL: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RegistrationFlags { + fn default() -> &'a RegistrationFlags { + ::default_instance() + } +} + +impl RegistrationFlags { + pub fn new() -> RegistrationFlags { + ::std::default::Default::default() + } + + // optional bool upload_only = 1; + + + pub fn get_upload_only(&self) -> bool { + self.upload_only.unwrap_or(false) + } + pub fn clear_upload_only(&mut self) { + self.upload_only = ::std::option::Option::None; + } + + pub fn has_upload_only(&self) -> bool { + self.upload_only.is_some() + } + + // Param is passed by value, moved + pub fn set_upload_only(&mut self, v: bool) { + self.upload_only = ::std::option::Option::Some(v); + } + + // optional bool dark_decoy = 2; + + + pub fn get_dark_decoy(&self) -> bool { + self.dark_decoy.unwrap_or(false) + } + pub fn clear_dark_decoy(&mut self) { + self.dark_decoy = ::std::option::Option::None; + } + + pub fn has_dark_decoy(&self) -> bool { + self.dark_decoy.is_some() + } + + // Param is passed by value, moved + pub fn set_dark_decoy(&mut self, v: bool) { + self.dark_decoy = ::std::option::Option::Some(v); + } + + // optional bool proxy_header = 3; + + + pub fn get_proxy_header(&self) -> bool { + self.proxy_header.unwrap_or(false) + } + pub fn clear_proxy_header(&mut self) { + self.proxy_header = ::std::option::Option::None; + } + + pub fn has_proxy_header(&self) -> bool { + self.proxy_header.is_some() + } + + // Param is passed by value, moved + pub fn set_proxy_header(&mut self, v: bool) { + self.proxy_header = ::std::option::Option::Some(v); + } + + // optional bool use_TIL = 4; + + + pub fn get_use_TIL(&self) -> bool { + self.use_TIL.unwrap_or(false) + } + pub fn clear_use_TIL(&mut self) { + self.use_TIL = ::std::option::Option::None; + } + + pub fn has_use_TIL(&self) -> bool { + self.use_TIL.is_some() + } + + // Param is passed by value, moved + pub fn set_use_TIL(&mut self, v: bool) { + self.use_TIL = ::std::option::Option::Some(v); + } +} + +impl ::protobuf::Message for RegistrationFlags { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.upload_only = ::std::option::Option::Some(tmp); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.dark_decoy = ::std::option::Option::Some(tmp); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.proxy_header = ::std::option::Option::Some(tmp); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.use_TIL = ::std::option::Option::Some(tmp); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(v) = self.upload_only { + my_size += 2; + } + if let Some(v) = self.dark_decoy { + my_size += 2; + } + if let Some(v) = self.proxy_header { + my_size += 2; + } + if let Some(v) = self.use_TIL { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(v) = self.upload_only { + os.write_bool(1, v)?; + } + if let Some(v) = self.dark_decoy { + os.write_bool(2, v)?; + } + if let Some(v) = self.proxy_header { + os.write_bool(3, v)?; + } + if let Some(v) = self.use_TIL { + os.write_bool(4, v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RegistrationFlags { + RegistrationFlags::new() + } + + fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "upload_only", + |m: &RegistrationFlags| { &m.upload_only }, + |m: &mut RegistrationFlags| { &mut m.upload_only }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "dark_decoy", + |m: &RegistrationFlags| { &m.dark_decoy }, + |m: &mut RegistrationFlags| { &mut m.dark_decoy }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "proxy_header", + |m: &RegistrationFlags| { &m.proxy_header }, + |m: &mut RegistrationFlags| { &mut m.proxy_header }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "use_TIL", + |m: &RegistrationFlags| { &m.use_TIL }, + |m: &mut RegistrationFlags| { &mut m.use_TIL }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RegistrationFlags", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static RegistrationFlags { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RegistrationFlags::new) + } +} + +impl ::protobuf::Clear for RegistrationFlags { + fn clear(&mut self) { + self.upload_only = ::std::option::Option::None; + self.dark_decoy = ::std::option::Option::None; + self.proxy_header = ::std::option::Option::None; + self.use_TIL = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for RegistrationFlags { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for RegistrationFlags { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -1764,13 +2036,14 @@ pub struct ClientToStation { decoy_list_generation: ::std::option::Option, state_transition: ::std::option::Option, upload_sync: ::std::option::Option, - failed_decoys: ::protobuf::RepeatedField<::std::string::String>, - stats: ::protobuf::SingularPtrField, + pub failed_decoys: ::protobuf::RepeatedField<::std::string::String>, + pub stats: ::protobuf::SingularPtrField, + transport: ::std::option::Option, covert_address: ::protobuf::SingularField<::std::string::String>, masked_decoy_server_name: ::protobuf::SingularField<::std::string::String>, v6_support: ::std::option::Option, v4_support: ::std::option::Option, - c2s_transport: ::std::option::Option, + pub flags: ::protobuf::SingularPtrField, padding: ::protobuf::SingularField<::std::vec::Vec>, // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -1893,7 +2166,7 @@ impl ClientToStation { pub fn get_stats(&self) -> &SessionStats { - self.stats.as_ref().unwrap_or_else(|| SessionStats::default_instance()) + self.stats.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_stats(&mut self) { self.stats.clear(); @@ -1922,6 +2195,25 @@ impl ClientToStation { self.stats.take().unwrap_or_else(|| SessionStats::new()) } + // optional .tapdance.TransportType transport = 12; + + + pub fn get_transport(&self) -> TransportType { + self.transport.unwrap_or(TransportType::NullTransport) + } + pub fn clear_transport(&mut self) { + self.transport = ::std::option::Option::None; + } + + pub fn has_transport(&self) -> bool { + self.transport.is_some() + } + + // Param is passed by value, moved + pub fn set_transport(&mut self, v: TransportType) { + self.transport = ::std::option::Option::Some(v); + } + // optional string covert_address = 20; @@ -2032,23 +2324,37 @@ impl ClientToStation { self.v4_support = ::std::option::Option::Some(v); } - // optional uint32 c2s_transport = 24; + // optional .tapdance.RegistrationFlags flags = 24; - pub fn get_c2s_transport(&self) -> u32 { - self.c2s_transport.unwrap_or(0) + pub fn get_flags(&self) -> &RegistrationFlags { + self.flags.as_ref().unwrap_or_else(|| ::default_instance()) } - pub fn clear_c2s_transport(&mut self) { - self.c2s_transport = ::std::option::Option::None; + pub fn clear_flags(&mut self) { + self.flags.clear(); } - pub fn has_c2s_transport(&self) -> bool { - self.c2s_transport.is_some() + pub fn has_flags(&self) -> bool { + self.flags.is_some() } // Param is passed by value, moved - pub fn set_c2s_transport(&mut self, v: u32) { - self.c2s_transport = ::std::option::Option::Some(v); + pub fn set_flags(&mut self, v: RegistrationFlags) { + self.flags = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_flags(&mut self) -> &mut RegistrationFlags { + if self.flags.is_none() { + self.flags.set_default(); + } + self.flags.as_mut().unwrap() + } + + // Take field + pub fn take_flags(&mut self) -> RegistrationFlags { + self.flags.take().unwrap_or_else(|| RegistrationFlags::new()) } // optional bytes padding = 100; @@ -2095,10 +2401,15 @@ impl ::protobuf::Message for ClientToStation { return false; } }; + for v in &self.flags { + if !v.is_initialized() { + return false; + } + }; true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2132,6 +2443,9 @@ impl ::protobuf::Message for ClientToStation { 11 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.stats)?; }, + 12 => { + ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.transport, 12, &mut self.unknown_fields)? + }, 20 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.covert_address)?; }, @@ -2153,11 +2467,7 @@ impl ::protobuf::Message for ClientToStation { self.v4_support = ::std::option::Option::Some(tmp); }, 24 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.c2s_transport = ::std::option::Option::Some(tmp); + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.flags)?; }, 100 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?; @@ -2193,6 +2503,9 @@ impl ::protobuf::Message for ClientToStation { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } + if let Some(v) = self.transport { + my_size += ::protobuf::rt::enum_size(12, v); + } if let Some(ref v) = self.covert_address.as_ref() { my_size += ::protobuf::rt::string_size(20, &v); } @@ -2205,8 +2518,9 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.v4_support { my_size += 3; } - if let Some(v) = self.c2s_transport { - my_size += ::protobuf::rt::value_size(24, v, ::protobuf::wire_format::WireTypeVarint); + if let Some(ref v) = self.flags.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } if let Some(ref v) = self.padding.as_ref() { my_size += ::protobuf::rt::bytes_size(100, &v); @@ -2216,7 +2530,7 @@ impl ::protobuf::Message for ClientToStation { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.protocol_version { os.write_uint32(1, v)?; } @@ -2224,7 +2538,7 @@ impl ::protobuf::Message for ClientToStation { os.write_uint32(2, v)?; } if let Some(v) = self.state_transition { - os.write_enum(3, v.value())?; + os.write_enum(3, ::protobuf::ProtobufEnum::value(&v))?; } if let Some(v) = self.upload_sync { os.write_uint64(4, v)?; @@ -2237,6 +2551,9 @@ impl ::protobuf::Message for ClientToStation { os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; } + if let Some(v) = self.transport { + os.write_enum(12, ::protobuf::ProtobufEnum::value(&v))?; + } if let Some(ref v) = self.covert_address.as_ref() { os.write_string(20, &v)?; } @@ -2249,8 +2566,10 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.v4_support { os.write_bool(23, v)?; } - if let Some(v) = self.c2s_transport { - os.write_uint32(24, v)?; + if let Some(ref v) = self.flags.as_ref() { + os.write_tag(24, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; } if let Some(ref v) = self.padding.as_ref() { os.write_bytes(100, &v)?; @@ -2271,13 +2590,13 @@ impl ::protobuf::Message for ClientToStation { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -2290,90 +2609,85 @@ impl ::protobuf::Message for ClientToStation { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "protocol_version", - |m: &ClientToStation| { &m.protocol_version }, - |m: &mut ClientToStation| { &mut m.protocol_version }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "decoy_list_generation", - |m: &ClientToStation| { &m.decoy_list_generation }, - |m: &mut ClientToStation| { &mut m.decoy_list_generation }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "state_transition", - |m: &ClientToStation| { &m.state_transition }, - |m: &mut ClientToStation| { &mut m.state_transition }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "upload_sync", - |m: &ClientToStation| { &m.upload_sync }, - |m: &mut ClientToStation| { &mut m.upload_sync }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "failed_decoys", - |m: &ClientToStation| { &m.failed_decoys }, - |m: &mut ClientToStation| { &mut m.failed_decoys }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "stats", - |m: &ClientToStation| { &m.stats }, - |m: &mut ClientToStation| { &mut m.stats }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "covert_address", - |m: &ClientToStation| { &m.covert_address }, - |m: &mut ClientToStation| { &mut m.covert_address }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "masked_decoy_server_name", - |m: &ClientToStation| { &m.masked_decoy_server_name }, - |m: &mut ClientToStation| { &mut m.masked_decoy_server_name }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "v6_support", - |m: &ClientToStation| { &m.v6_support }, - |m: &mut ClientToStation| { &mut m.v6_support }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "v4_support", - |m: &ClientToStation| { &m.v4_support }, - |m: &mut ClientToStation| { &mut m.v4_support }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "c2s_transport", - |m: &ClientToStation| { &m.c2s_transport }, - |m: &mut ClientToStation| { &mut m.c2s_transport }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "padding", - |m: &ClientToStation| { &m.padding }, - |m: &mut ClientToStation| { &mut m.padding }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ClientToStation", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "protocol_version", + |m: &ClientToStation| { &m.protocol_version }, + |m: &mut ClientToStation| { &mut m.protocol_version }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "decoy_list_generation", + |m: &ClientToStation| { &m.decoy_list_generation }, + |m: &mut ClientToStation| { &mut m.decoy_list_generation }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "state_transition", + |m: &ClientToStation| { &m.state_transition }, + |m: &mut ClientToStation| { &mut m.state_transition }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "upload_sync", + |m: &ClientToStation| { &m.upload_sync }, + |m: &mut ClientToStation| { &mut m.upload_sync }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "failed_decoys", + |m: &ClientToStation| { &m.failed_decoys }, + |m: &mut ClientToStation| { &mut m.failed_decoys }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "stats", + |m: &ClientToStation| { &m.stats }, + |m: &mut ClientToStation| { &mut m.stats }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "transport", + |m: &ClientToStation| { &m.transport }, + |m: &mut ClientToStation| { &mut m.transport }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "covert_address", + |m: &ClientToStation| { &m.covert_address }, + |m: &mut ClientToStation| { &mut m.covert_address }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "masked_decoy_server_name", + |m: &ClientToStation| { &m.masked_decoy_server_name }, + |m: &mut ClientToStation| { &mut m.masked_decoy_server_name }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "v6_support", + |m: &ClientToStation| { &m.v6_support }, + |m: &mut ClientToStation| { &mut m.v6_support }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "v4_support", + |m: &ClientToStation| { &m.v4_support }, + |m: &mut ClientToStation| { &mut m.v4_support }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "flags", + |m: &ClientToStation| { &m.flags }, + |m: &mut ClientToStation| { &mut m.flags }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "padding", + |m: &ClientToStation| { &m.padding }, + |m: &mut ClientToStation| { &mut m.padding }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ClientToStation", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ClientToStation { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ClientToStation, - }; - unsafe { - instance.get(ClientToStation::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ClientToStation::new) } } @@ -2385,33 +2699,486 @@ impl ::protobuf::Clear for ClientToStation { self.upload_sync = ::std::option::Option::None; self.failed_decoys.clear(); self.stats.clear(); + self.transport = ::std::option::Option::None; self.covert_address.clear(); self.masked_decoy_server_name.clear(); self.v6_support = ::std::option::Option::None; self.v4_support = ::std::option::Option::None; - self.c2s_transport = ::std::option::Option::None; + self.flags.clear(); self.padding.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for ClientToStation { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ClientToStation { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] -pub struct SessionStats { +pub struct ClientToAPI { // message fields - failed_decoys_amount: ::std::option::Option, - total_time_to_connect: ::std::option::Option, + secret: ::protobuf::SingularField<::std::vec::Vec>, + pub registration_payload: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientToAPI { + fn default() -> &'a ClientToAPI { + ::default_instance() + } +} + +impl ClientToAPI { + pub fn new() -> ClientToAPI { + ::std::default::Default::default() + } + + // optional bytes secret = 1; + + + pub fn get_secret(&self) -> &[u8] { + match self.secret.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_secret(&mut self) { + self.secret.clear(); + } + + pub fn has_secret(&self) -> bool { + self.secret.is_some() + } + + // Param is passed by value, moved + pub fn set_secret(&mut self, v: ::std::vec::Vec) { + self.secret = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_secret(&mut self) -> &mut ::std::vec::Vec { + if self.secret.is_none() { + self.secret.set_default(); + } + self.secret.as_mut().unwrap() + } + + // Take field + pub fn take_secret(&mut self) -> ::std::vec::Vec { + self.secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional .tapdance.ClientToStation registration_payload = 2; + + + pub fn get_registration_payload(&self) -> &ClientToStation { + self.registration_payload.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_registration_payload(&mut self) { + self.registration_payload.clear(); + } + + pub fn has_registration_payload(&self) -> bool { + self.registration_payload.is_some() + } + + // Param is passed by value, moved + pub fn set_registration_payload(&mut self, v: ClientToStation) { + self.registration_payload = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_registration_payload(&mut self) -> &mut ClientToStation { + if self.registration_payload.is_none() { + self.registration_payload.set_default(); + } + self.registration_payload.as_mut().unwrap() + } + + // Take field + pub fn take_registration_payload(&mut self) -> ClientToStation { + self.registration_payload.take().unwrap_or_else(|| ClientToStation::new()) + } +} + +impl ::protobuf::Message for ClientToAPI { + fn is_initialized(&self) -> bool { + for v in &self.registration_payload { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.secret)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.registration_payload)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.secret.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(ref v) = self.registration_payload.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.secret.as_ref() { + os.write_bytes(1, &v)?; + } + if let Some(ref v) = self.registration_payload.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ClientToAPI { + ClientToAPI::new() + } + + fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "secret", + |m: &ClientToAPI| { &m.secret }, + |m: &mut ClientToAPI| { &mut m.secret }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "registration_payload", + |m: &ClientToAPI| { &m.registration_payload }, + |m: &mut ClientToAPI| { &mut m.registration_payload }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ClientToAPI", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static ClientToAPI { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ClientToAPI::new) + } +} + +impl ::protobuf::Clear for ClientToAPI { + fn clear(&mut self) { + self.secret.clear(); + self.registration_payload.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for ClientToAPI { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ClientToAPI { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct ZMQPayload { + // message fields + shared_secret: ::protobuf::SingularField<::std::vec::Vec>, + pub registration_payload: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ZMQPayload { + fn default() -> &'a ZMQPayload { + ::default_instance() + } +} + +impl ZMQPayload { + pub fn new() -> ZMQPayload { + ::std::default::Default::default() + } + + // optional bytes shared_secret = 1; + + + pub fn get_shared_secret(&self) -> &[u8] { + match self.shared_secret.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_shared_secret(&mut self) { + self.shared_secret.clear(); + } + + pub fn has_shared_secret(&self) -> bool { + self.shared_secret.is_some() + } + + // Param is passed by value, moved + pub fn set_shared_secret(&mut self, v: ::std::vec::Vec) { + self.shared_secret = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_shared_secret(&mut self) -> &mut ::std::vec::Vec { + if self.shared_secret.is_none() { + self.shared_secret.set_default(); + } + self.shared_secret.as_mut().unwrap() + } + + // Take field + pub fn take_shared_secret(&mut self) -> ::std::vec::Vec { + self.shared_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional .tapdance.ClientToStation registration_payload = 3; + + + pub fn get_registration_payload(&self) -> &ClientToStation { + self.registration_payload.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_registration_payload(&mut self) { + self.registration_payload.clear(); + } + + pub fn has_registration_payload(&self) -> bool { + self.registration_payload.is_some() + } + + // Param is passed by value, moved + pub fn set_registration_payload(&mut self, v: ClientToStation) { + self.registration_payload = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_registration_payload(&mut self) -> &mut ClientToStation { + if self.registration_payload.is_none() { + self.registration_payload.set_default(); + } + self.registration_payload.as_mut().unwrap() + } + + // Take field + pub fn take_registration_payload(&mut self) -> ClientToStation { + self.registration_payload.take().unwrap_or_else(|| ClientToStation::new()) + } +} + +impl ::protobuf::Message for ZMQPayload { + fn is_initialized(&self) -> bool { + for v in &self.registration_payload { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.shared_secret)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.registration_payload)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.shared_secret.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(ref v) = self.registration_payload.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.shared_secret.as_ref() { + os.write_bytes(1, &v)?; + } + if let Some(ref v) = self.registration_payload.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ZMQPayload { + ZMQPayload::new() + } + + fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "shared_secret", + |m: &ZMQPayload| { &m.shared_secret }, + |m: &mut ZMQPayload| { &mut m.shared_secret }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "registration_payload", + |m: &ZMQPayload| { &m.registration_payload }, + |m: &mut ZMQPayload| { &mut m.registration_payload }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ZMQPayload", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static ZMQPayload { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ZMQPayload::new) + } +} + +impl ::protobuf::Clear for ZMQPayload { + fn clear(&mut self) { + self.shared_secret.clear(); + self.registration_payload.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for ZMQPayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ZMQPayload { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct SessionStats { + // message fields + failed_decoys_amount: ::std::option::Option, + total_time_to_connect: ::std::option::Option, rtt_to_station: ::std::option::Option, tls_to_decoy: ::std::option::Option, tcp_to_decoy: ::std::option::Option, @@ -2532,7 +3299,7 @@ impl ::protobuf::Message for SessionStats { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2603,7 +3370,7 @@ impl ::protobuf::Message for SessionStats { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.failed_decoys_amount { os.write_uint32(20, v)?; } @@ -2635,13 +3402,13 @@ impl ::protobuf::Message for SessionStats { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -2654,55 +3421,45 @@ impl ::protobuf::Message for SessionStats { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "failed_decoys_amount", - |m: &SessionStats| { &m.failed_decoys_amount }, - |m: &mut SessionStats| { &mut m.failed_decoys_amount }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "total_time_to_connect", - |m: &SessionStats| { &m.total_time_to_connect }, - |m: &mut SessionStats| { &mut m.total_time_to_connect }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "rtt_to_station", - |m: &SessionStats| { &m.rtt_to_station }, - |m: &mut SessionStats| { &mut m.rtt_to_station }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tls_to_decoy", - |m: &SessionStats| { &m.tls_to_decoy }, - |m: &mut SessionStats| { &mut m.tls_to_decoy }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tcp_to_decoy", - |m: &SessionStats| { &m.tcp_to_decoy }, - |m: &mut SessionStats| { &mut m.tcp_to_decoy }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "SessionStats", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "failed_decoys_amount", + |m: &SessionStats| { &m.failed_decoys_amount }, + |m: &mut SessionStats| { &mut m.failed_decoys_amount }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "total_time_to_connect", + |m: &SessionStats| { &m.total_time_to_connect }, + |m: &mut SessionStats| { &mut m.total_time_to_connect }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "rtt_to_station", + |m: &SessionStats| { &m.rtt_to_station }, + |m: &mut SessionStats| { &mut m.rtt_to_station }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tls_to_decoy", + |m: &SessionStats| { &m.tls_to_decoy }, + |m: &mut SessionStats| { &mut m.tls_to_decoy }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tcp_to_decoy", + |m: &SessionStats| { &m.tcp_to_decoy }, + |m: &mut SessionStats| { &mut m.tcp_to_decoy }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "SessionStats", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static SessionStats { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const SessionStats, - }; - unsafe { - instance.get(SessionStats::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SessionStats::new) } } @@ -2718,14 +3475,14 @@ impl ::protobuf::Clear for SessionStats { } impl ::std::fmt::Debug for SessionStats { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SessionStats { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -2757,15 +3514,10 @@ impl ::protobuf::ProtobufEnum for KeyType { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("KeyType", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("KeyType", file_descriptor_proto()) + }) } } @@ -2780,8 +3532,8 @@ impl ::std::default::Default for KeyType { } impl ::protobuf::reflect::ProtobufValue for KeyType { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -2834,15 +3586,10 @@ impl ::protobuf::ProtobufEnum for C2S_Transition { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("C2S_Transition", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("C2S_Transition", file_descriptor_proto()) + }) } } @@ -2856,8 +3603,8 @@ impl ::std::default::Default for C2S_Transition { } impl ::protobuf::reflect::ProtobufValue for C2S_Transition { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -2901,15 +3648,10 @@ impl ::protobuf::ProtobufEnum for S2C_Transition { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("S2C_Transition", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("S2C_Transition", file_descriptor_proto()) + }) } } @@ -2923,8 +3665,8 @@ impl ::std::default::Default for S2C_Transition { } impl ::protobuf::reflect::ProtobufValue for S2C_Transition { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -2974,15 +3716,10 @@ impl ::protobuf::ProtobufEnum for ErrorReasonS2C { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("ErrorReasonS2C", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("ErrorReasonS2C", file_descriptor_proto()) + }) } } @@ -2996,8 +3733,61 @@ impl ::std::default::Default for ErrorReasonS2C { } impl ::protobuf::reflect::ProtobufValue for ErrorReasonS2C { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum TransportType { + NullTransport = 0, + MinTransport = 1, + Obfs4Transport = 2, +} + +impl ::protobuf::ProtobufEnum for TransportType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(TransportType::NullTransport), + 1 => ::std::option::Option::Some(TransportType::MinTransport), + 2 => ::std::option::Option::Some(TransportType::Obfs4Transport), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [TransportType] = &[ + TransportType::NullTransport, + TransportType::MinTransport, + TransportType::Obfs4Transport, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("TransportType", file_descriptor_proto()) + }) + } +} + +impl ::std::marker::Copy for TransportType { +} + +impl ::std::default::Default for TransportType { + fn default() -> Self { + TransportType::NullTransport + } +} + +impl ::protobuf::reflect::ProtobufValue for TransportType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -3009,369 +3799,434 @@ static file_descriptor_proto_data: &'static [u8] = b"\ (\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\x18\x06\x20\x01(\x0cR\x08ipv6ad\ dr\x12(\n\x06pubkey\x18\x03\x20\x01(\x0b2\x10.tapdance.PubKeyR\x06pubkey\ \x12\x18\n\x07timeout\x18\x04\x20\x01(\rR\x07timeout\x12\x16\n\x06tcpwin\ - \x18\x05\x20\x01(\rR\x06tcpwin\"\xe0\x01\n\nClientConf\x122\n\ndecoy_lis\ + \x18\x05\x20\x01(\rR\x06tcpwin\"\x99\x02\n\nClientConf\x122\n\ndecoy_lis\ t\x18\x01\x20\x01(\x0b2\x13.tapdance.DecoyListR\tdecoyList\x12\x1e\n\nge\ neration\x18\x02\x20\x01(\rR\ngeneration\x127\n\x0edefault_pubkey\x18\ \x03\x20\x01(\x0b2\x10.tapdance.PubKeyR\rdefaultPubkey\x12E\n\x11dark_de\ coy_blocks\x18\x04\x20\x01(\x0b2\x19.tapdance.DarkDecoyBlocksR\x0fdarkDe\ - coyBlocks\"B\n\tDecoyList\x125\n\ntls_decoys\x18\x01\x20\x03(\x0b2\x16.t\ - apdance.TLSDecoySpecR\ttlsDecoys\")\n\x0fDarkDecoyBlocks\x12\x16\n\x06bl\ - ocks\x18\x01\x20\x03(\tR\x06blocks\"\xcb\x02\n\x0fStationToClient\x12)\n\ - \x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x12C\n\x10st\ - ate_transition\x18\x02\x20\x01(\x0e2\x18.tapdance.S2C_TransitionR\x0fsta\ - teTransition\x125\n\x0bconfig_info\x18\x03\x20\x01(\x0b2\x14.tapdance.Cl\ - ientConfR\nconfigInfo\x127\n\nerr_reason\x18\x04\x20\x01(\x0e2\x18.tapda\ - nce.ErrorReasonS2CR\terrReason\x12\x1f\n\x0btmp_backoff\x18\x05\x20\x01(\ - \rR\ntmpBackoff\x12\x1d\n\nstation_id\x18\x06\x20\x01(\tR\tstationId\x12\ - \x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"\x86\x04\n\x0fClientToS\ - tation\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\ - \x122\n\x15decoy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGenerat\ - ion\x12C\n\x10state_transition\x18\x03\x20\x01(\x0e2\x18.tapdance.C2S_Tr\ - ansitionR\x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\ - \x04R\nuploadSync\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoy\ - s\x12,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.tapdance.SessionStatsR\x05st\ - ats\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\rcovertAddress\x127\n\ - \x18masked_decoy_server_name\x18\x15\x20\x01(\tR\x15maskedDecoyServerNam\ - e\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv6Support\x12\x1d\n\nv4_s\ - upport\x18\x17\x20\x01(\x08R\tv4Support\x12#\n\rc2s_transport\x18\x18\ - \x20\x01(\rR\x0cc2sTransport\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07\ - padding\"\xdd\x01\n\x0cSessionStats\x120\n\x14failed_decoys_amount\x18\ - \x14\x20\x01(\rR\x12failedDecoysAmount\x121\n\x15total_time_to_connect\ - \x18\x1f\x20\x01(\rR\x12totalTimeToConnect\x12$\n\x0ertt_to_station\x18!\ - \x20\x01(\rR\x0crttToStation\x12\x20\n\x0ctls_to_decoy\x18&\x20\x01(\rR\ - \ntlsToDecoy\x12\x20\n\x0ctcp_to_decoy\x18'\x20\x01(\rR\ntcpToDecoy*+\n\ - \x07KeyType\x12\x0f\n\x0bAES_GCM_128\x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*\ - \xe7\x01\n\x0eC2S_Transition\x12\x11\n\rC2S_NO_CHANGE\x10\0\x12\x14\n\ - \x10C2S_SESSION_INIT\x10\x01\x12\x1b\n\x17C2S_SESSION_COVERT_INIT\x10\ - \x0b\x12\x18\n\x14C2S_EXPECT_RECONNECT\x10\x02\x12\x15\n\x11C2S_SESSION_\ - CLOSE\x10\x03\x12\x14\n\x10C2S_YIELD_UPLOAD\x10\x04\x12\x16\n\x12C2S_ACQ\ - UIRE_UPLOAD\x10\x05\x12\x20\n\x1cC2S_EXPECT_UPLOADONLY_RECONN\x10\x06\ - \x12\x0e\n\tC2S_ERROR\x10\xff\x01*\x98\x01\n\x0eS2C_Transition\x12\x11\n\ - \rS2C_NO_CHANGE\x10\0\x12\x14\n\x10S2C_SESSION_INIT\x10\x01\x12\x1b\n\ - \x17S2C_SESSION_COVERT_INIT\x10\x0b\x12\x19\n\x15S2C_CONFIRM_RECONNECT\ - \x10\x02\x12\x15\n\x11S2C_SESSION_CLOSE\x10\x03\x12\x0e\n\tS2C_ERROR\x10\ - \xff\x01*\xac\x01\n\x0eErrorReasonS2C\x12\x0c\n\x08NO_ERROR\x10\0\x12\ - \x11\n\rCOVERT_STREAM\x10\x01\x12\x13\n\x0fCLIENT_REPORTED\x10\x02\x12\ - \x13\n\x0fCLIENT_PROTOCOL\x10\x03\x12\x14\n\x10STATION_INTERNAL\x10\x04\ - \x12\x12\n\x0eDECOY_OVERLOAD\x10\x05\x12\x11\n\rCLIENT_STREAM\x10d\x12\ - \x12\n\x0eCLIENT_TIMEOUT\x10eJ\x88F\n\x07\x12\x05\0\0\xd5\x01\x01\n\x08\ - \n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\n\x01\x02\x12\x03\x06\0\x112\xa5\ - \x01\x20TODO:\x20We're\x20using\x20proto2\x20because\x20it's\x20the\x20d\ - efault\x20on\x20Ubuntu\x2016.04.\n\x20At\x20some\x20point\x20we\x20will\ - \x20want\x20to\x20migrate\x20to\x20proto3,\x20but\x20we\x20are\x20not\n\ - \x20using\x20any\x20proto3\x20features\x20yet.\n\n\n\n\x02\x05\0\x12\x04\ - \x08\0\x0b\x01\n\n\n\x03\x05\0\x01\x12\x03\x08\x05\x0c\n\x0b\n\x04\x05\0\ - \x02\0\x12\x03\t\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\t\x04\x0f\n\ - \x0c\n\x05\x05\0\x02\0\x02\x12\x03\t\x12\x14\n\x20\n\x04\x05\0\x02\x01\ - \x12\x03\n\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\ - \x02\x01\x01\x12\x03\n\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\n\ - \x12\x14\n\n\n\x02\x04\0\x12\x04\r\0\x12\x01\n\n\n\x03\x04\0\x01\x12\x03\ - \r\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x0f\x04\x1b\x1a'\x20A\x20public\ - \x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\x04\0\x02\ - \0\x04\x12\x03\x0f\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x0f\r\x12\ - \n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x0f\x13\x16\n\x0c\n\x05\x04\0\x02\0\ - \x03\x12\x03\x0f\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x11\x04\x1e\n\ - \x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\0\x02\ - \x01\x06\x12\x03\x11\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x11\x15\ - \x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x11\x1c\x1d\n\n\n\x02\x04\x01\ - \x12\x04\x14\0:\x01\n\n\n\x03\x04\x01\x01\x12\x03\x14\x08\x14\n\xa1\x01\ - \n\x04\x04\x01\x02\0\x12\x03\x19\x04!\x1a\x93\x01\x20The\x20hostname/SNI\ - \x20to\x20use\x20for\x20this\x20host\n\n\x20The\x20hostname\x20is\x20the\ - \x20only\x20required\x20field,\x20although\x20other\n\x20fields\x20are\ - \x20expected\x20to\x20be\x20present\x20in\x20most\x20cases.\n\n\x0c\n\ - \x05\x04\x01\x02\0\x04\x12\x03\x19\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x05\ - \x12\x03\x19\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x19\x14\x1c\n\ - \x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x19\x1f\x20\n\xf7\x01\n\x04\x04\x01\ - \x02\x01\x12\x03\x20\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20ipv4\x20addre\ - ss,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\x20IPv4\x20addres\ - s\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resolved\x20via\n\x20DN\ - S\x20by\x20the\x20client,\x20or\x20the\x20client\x20may\x20discard\x20th\ - is\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20untrusted,\x20or\ - \x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\x05\x04\x01\x02\ - \x01\x04\x12\x03\x20\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x20\ - \r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x15\x1d\n\x0c\n\x05\ - \x04\x01\x02\x01\x03\x12\x03\x20\x20!\n>\n\x04\x04\x01\x02\x02\x12\x03#\ - \x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20network\x20\ - byte\x20order\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03#\x04\x0c\n\x0c\n\ - \x05\x04\x01\x02\x02\x05\x12\x03#\r\x12\n\x0c\n\x05\x04\x01\x02\x02\x01\ - \x12\x03#\x13\x1b\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03#\x1e\x1f\n\x91\ - \x01\n\x04\x04\x01\x02\x03\x12\x03)\x04\x1f\x1a\x83\x01\x20The\x20Tapdan\ - ce\x20station\x20public\x20key\x20to\x20use\x20when\x20contacting\x20thi\ - s\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20default\x20station\x20publi\ - c\x20key\x20(if\x20any)\x20is\x20used.\n\n\x0c\n\x05\x04\x01\x02\x03\x04\ - \x12\x03)\x04\x0c\n\x0c\n\x05\x04\x01\x02\x03\x06\x12\x03)\r\x13\n\x0c\n\ - \x05\x04\x01\x02\x03\x01\x12\x03)\x14\x1a\n\x0c\n\x05\x04\x01\x02\x03\ - \x03\x12\x03)\x1d\x1e\n\xee\x01\n\x04\x04\x01\x02\x04\x12\x030\x04\x20\ - \x1a\xe0\x01\x20The\x20maximum\x20duration,\x20in\x20milliseconds,\x20to\ - \x20maintain\x20an\x20open\n\x20connection\x20to\x20this\x20decoy\x20(be\ - cause\x20the\x20decoy\x20may\x20close\x20the\n\x20connection\x20itself\ - \x20after\x20this\x20length\x20of\x20time)\n\n\x20If\x20omitted,\x20a\ - \x20default\x20of\x2030,000\x20milliseconds\x20is\x20assumed.\n\n\x0c\n\ - \x05\x04\x01\x02\x04\x04\x12\x030\x04\x0c\n\x0c\n\x05\x04\x01\x02\x04\ - \x05\x12\x030\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x030\x14\x1b\n\ - \x0c\n\x05\x04\x01\x02\x04\x03\x12\x030\x1e\x1f\n\xb0\x02\n\x04\x04\x01\ - \x02\x05\x12\x039\x04\x1f\x1a\xa2\x02\x20The\x20maximum\x20TCP\x20window\ - \x20size\x20to\x20attempt\x20to\x20use\x20for\x20this\x20decoy.\n\n\x20I\ - f\x20omitted,\x20a\x20default\x20of\x2015360\x20is\x20assumed.\n\n\x20TO\ - DO:\x20the\x20default\x20is\x20based\x20on\x20the\x20current\x20heuristi\ - c\x20of\x20only\n\x20using\x20decoys\x20that\x20permit\x20windows\x20of\ - \x2015KB\x20or\x20larger.\x20\x20If\x20this\n\x20heuristic\x20changes,\ - \x20then\x20this\x20default\x20doesn't\x20make\x20sense.\n\n\x0c\n\x05\ - \x04\x01\x02\x05\x04\x12\x039\x04\x0c\n\x0c\n\x05\x04\x01\x02\x05\x05\ - \x12\x039\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x039\x14\x1a\n\x0c\n\ - \x05\x04\x01\x02\x05\x03\x12\x039\x1d\x1e\n\x83\x08\n\x02\x04\x02\x12\ - \x04Q\0V\x012\xf6\x07\x20In\x20version\x201,\x20the\x20request\x20is\x20\ - very\x20simple:\x20when\n\x20the\x20client\x20sends\x20a\x20MSG_PROTO\ - \x20to\x20the\x20station,\x20if\x20the\n\x20generation\x20number\x20is\ - \x20present,\x20then\x20this\x20request\x20includes\n\x20(in\x20addition\ - \x20to\x20whatever\x20other\x20operations\x20are\x20part\x20of\x20the\n\ - \x20request)\x20a\x20request\x20for\x20the\x20station\x20to\x20send\x20a\ - \x20copy\x20of\n\x20the\x20current\x20decoy\x20set\x20that\x20has\x20a\ - \x20generation\x20number\x20greater\n\x20than\x20the\x20generation\x20nu\ - mber\x20in\x20its\x20request.\n\n\x20If\x20the\x20response\x20contains\ - \x20a\x20DecoyListUpdate\x20with\x20a\x20generation\x20number\x20equal\n\ - \x20to\x20that\x20which\x20the\x20client\x20sent,\x20then\x20the\x20clie\ - nt\x20is\x20\"caught\x20up\"\x20with\n\x20the\x20station\x20and\x20the\ - \x20response\x20contains\x20no\x20new\x20information\n\x20(and\x20all\ - \x20other\x20fields\x20may\x20be\x20omitted\x20or\x20empty).\x20\x20Othe\ - rwise,\n\x20the\x20station\x20will\x20send\x20the\x20latest\x20configura\ - tion\x20information,\n\x20along\x20with\x20its\x20generation\x20number.\ - \n\n\x20The\x20station\x20can\x20also\x20send\x20ClientConf\x20messages\ - \n\x20(as\x20part\x20of\x20Station2Client\x20messages)\x20whenever\x20it\ - \x20wants.\n\x20The\x20client\x20is\x20expected\x20to\x20react\x20as\x20\ - if\x20it\x20had\x20requested\n\x20such\x20messages\x20--\x20possibly\x20\ - by\x20ignoring\x20them,\x20if\x20the\x20client\n\x20is\x20already\x20up-\ - to-date\x20according\x20to\x20the\x20generation\x20number.\n\n\n\n\x03\ - \x04\x02\x01\x12\x03Q\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\x03R\x04&\n\ - \x0c\n\x05\x04\x02\x02\0\x04\x12\x03R\x04\x0c\n\x0c\n\x05\x04\x02\x02\0\ - \x06\x12\x03R\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03R\x17!\n\x0c\n\ - \x05\x04\x02\x02\0\x03\x12\x03R$%\n\x0b\n\x04\x04\x02\x02\x01\x12\x03S\ - \x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03S\x04\x0c\n\x0c\n\x05\x04\ - \x02\x02\x01\x05\x12\x03S\r\x13\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03S\ - \x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03S!\"\n\x0b\n\x04\x04\x02\ - \x02\x02\x12\x03T\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03T\x04\x0c\ - \n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03T\r\x13\n\x0c\n\x05\x04\x02\x02\ - \x02\x01\x12\x03T\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03T%&\n\x0b\ - \n\x04\x04\x02\x02\x03\x12\x03U\x043\n\x0c\n\x05\x04\x02\x02\x03\x04\x12\ - \x03U\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03U\r\x1c\n\x0c\n\x05\ - \x04\x02\x02\x03\x01\x12\x03U\x1d.\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\ - \x03U12\n\n\n\x02\x04\x03\x12\x04X\0Z\x01\n\n\n\x03\x04\x03\x01\x12\x03X\ - \x08\x11\n\x0b\n\x04\x04\x03\x02\0\x12\x03Y\x04)\n\x0c\n\x05\x04\x03\x02\ - \0\x04\x12\x03Y\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03Y\r\x19\n\ - \x0c\n\x05\x04\x03\x02\0\x01\x12\x03Y\x1a$\n\x0c\n\x05\x04\x03\x02\0\x03\ - \x12\x03Y'(\n\n\n\x02\x04\x04\x12\x04\\\0^\x01\n\n\n\x03\x04\x04\x01\x12\ - \x03\\\x08\x17\n\x0b\n\x04\x04\x04\x02\0\x12\x03]\x04\x1f\n\x0c\n\x05\ - \x04\x04\x02\0\x04\x12\x03]\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x05\x12\ - \x03]\r\x13\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03]\x14\x1a\n\x0c\n\x05\ - \x04\x04\x02\0\x03\x12\x03]\x1d\x1e\n-\n\x02\x05\x01\x12\x04a\0k\x01\x1a\ - !\x20State\x20transitions\x20of\x20the\x20client\n\n\n\n\x03\x05\x01\x01\ - \x12\x03a\x05\x13\n\x0b\n\x04\x05\x01\x02\0\x12\x03b\x04\x16\n\x0c\n\x05\ - \x05\x01\x02\0\x01\x12\x03b\x04\x11\n\x0c\n\x05\x05\x01\x02\0\x02\x12\ - \x03b\x14\x15\n\"\n\x04\x05\x01\x02\x01\x12\x03c\x04\x19\"\x15\x20connec\ - t\x20me\x20to\x20squid\n\n\x0c\n\x05\x05\x01\x02\x01\x01\x12\x03c\x04\ - \x14\n\x0c\n\x05\x05\x01\x02\x01\x02\x12\x03c\x17\x18\n,\n\x04\x05\x01\ - \x02\x02\x12\x03d\x04!\"\x1f\x20connect\x20me\x20to\x20provided\x20cover\ - t\n\n\x0c\n\x05\x05\x01\x02\x02\x01\x12\x03d\x04\x1b\n\x0c\n\x05\x05\x01\ - \x02\x02\x02\x12\x03d\x1e\x20\n\x0b\n\x04\x05\x01\x02\x03\x12\x03e\x04\ - \x1d\n\x0c\n\x05\x05\x01\x02\x03\x01\x12\x03e\x04\x18\n\x0c\n\x05\x05\ - \x01\x02\x03\x02\x12\x03e\x1b\x1c\n\x0b\n\x04\x05\x01\x02\x04\x12\x03f\ - \x04\x1a\n\x0c\n\x05\x05\x01\x02\x04\x01\x12\x03f\x04\x15\n\x0c\n\x05\ - \x05\x01\x02\x04\x02\x12\x03f\x18\x19\n\x0b\n\x04\x05\x01\x02\x05\x12\ - \x03g\x04\x19\n\x0c\n\x05\x05\x01\x02\x05\x01\x12\x03g\x04\x14\n\x0c\n\ - \x05\x05\x01\x02\x05\x02\x12\x03g\x17\x18\n\x0b\n\x04\x05\x01\x02\x06\ - \x12\x03h\x04\x1b\n\x0c\n\x05\x05\x01\x02\x06\x01\x12\x03h\x04\x16\n\x0c\ - \n\x05\x05\x01\x02\x06\x02\x12\x03h\x19\x1a\n\x0b\n\x04\x05\x01\x02\x07\ - \x12\x03i\x04%\n\x0c\n\x05\x05\x01\x02\x07\x01\x12\x03i\x04\x20\n\x0c\n\ - \x05\x05\x01\x02\x07\x02\x12\x03i#$\n\x0b\n\x04\x05\x01\x02\x08\x12\x03j\ - \x04\x14\n\x0c\n\x05\x05\x01\x02\x08\x01\x12\x03j\x04\r\n\x0c\n\x05\x05\ - \x01\x02\x08\x02\x12\x03j\x10\x13\n-\n\x02\x05\x02\x12\x04n\0v\x01\x1a!\ - \x20State\x20transitions\x20of\x20the\x20server\n\n\n\n\x03\x05\x02\x01\ - \x12\x03n\x05\x13\n\x0b\n\x04\x05\x02\x02\0\x12\x03o\x04\x16\n\x0c\n\x05\ - \x05\x02\x02\0\x01\x12\x03o\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\ - \x03o\x14\x15\n!\n\x04\x05\x02\x02\x01\x12\x03p\x04\x19\"\x14\x20connect\ - ed\x20to\x20squid\n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03p\x04\x14\n\ - \x0c\n\x05\x05\x02\x02\x01\x02\x12\x03p\x17\x18\n'\n\x04\x05\x02\x02\x02\ - \x12\x03q\x04!\"\x1a\x20connected\x20to\x20covert\x20host\n\n\x0c\n\x05\ - \x05\x02\x02\x02\x01\x12\x03q\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\ - \x12\x03q\x1e\x20\n\x0b\n\x04\x05\x02\x02\x03\x12\x03r\x04\x1e\n\x0c\n\ - \x05\x05\x02\x02\x03\x01\x12\x03r\x04\x19\n\x0c\n\x05\x05\x02\x02\x03\ - \x02\x12\x03r\x1c\x1d\n\x0b\n\x04\x05\x02\x02\x04\x12\x03s\x04\x1a\n\x0c\ - \n\x05\x05\x02\x02\x04\x01\x12\x03s\x04\x15\n\x0c\n\x05\x05\x02\x02\x04\ - \x02\x12\x03s\x18\x19\nR\n\x04\x05\x02\x02\x05\x12\x03u\x04\x14\x1aE\x20\ - TODO\x20should\x20probably\x20also\x20allow\x20EXPECT_RECONNECT\x20here,\ - \x20for\x20DittoTap\n\n\x0c\n\x05\x05\x02\x02\x05\x01\x12\x03u\x04\r\n\ - \x0c\n\x05\x05\x02\x02\x05\x02\x12\x03u\x10\x13\n7\n\x02\x05\x03\x12\x05\ - y\0\x83\x01\x01\x1a*\x20Should\x20accompany\x20all\x20S2C_ERROR\x20messa\ - ges.\n\n\n\n\x03\x05\x03\x01\x12\x03y\x05\x13\n\x0b\n\x04\x05\x03\x02\0\ - \x12\x03z\x04\x11\n\x0c\n\x05\x05\x03\x02\0\x01\x12\x03z\x04\x0c\n\x0c\n\ - \x05\x05\x03\x02\0\x02\x12\x03z\x0f\x10\n)\n\x04\x05\x03\x02\x01\x12\x03\ - {\x04\x16\"\x1c\x20Squid\x20TCP\x20connection\x20broke\n\n\x0c\n\x05\x05\ - \x03\x02\x01\x01\x12\x03{\x04\x11\n\x0c\n\x05\x05\x03\x02\x01\x02\x12\ - \x03{\x14\x15\n6\n\x04\x05\x03\x02\x02\x12\x03|\x04\x18\")\x20You\x20tol\ - d\x20me\x20something\x20was\x20wrong,\x20client\n\n\x0c\n\x05\x05\x03\ - \x02\x02\x01\x12\x03|\x04\x13\n\x0c\n\x05\x05\x03\x02\x02\x02\x12\x03|\ - \x16\x17\n?\n\x04\x05\x03\x02\x03\x12\x03}\x04\x18\"2\x20You\x20messed\ - \x20up,\x20client\x20(e.g.\x20sent\x20a\x20bad\x20protobuf)\n\n\x0c\n\ - \x05\x05\x03\x02\x03\x01\x12\x03}\x04\x13\n\x0c\n\x05\x05\x03\x02\x03\ - \x02\x12\x03}\x16\x17\n\x16\n\x04\x05\x03\x02\x04\x12\x03~\x04\x19\"\t\ - \x20I\x20broke\n\n\x0c\n\x05\x05\x03\x02\x04\x01\x12\x03~\x04\x14\n\x0c\ - \n\x05\x05\x03\x02\x04\x02\x12\x03~\x17\x18\nD\n\x04\x05\x03\x02\x05\x12\ - \x03\x7f\x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\x20use\x20t\ - his\x20decoy\x20right\x20now\n\n\x0c\n\x05\x05\x03\x02\x05\x01\x12\x03\ - \x7f\x04\x12\n\x0c\n\x05\x05\x03\x02\x05\x02\x12\x03\x7f\x15\x16\nD\n\ - \x04\x05\x03\x02\x06\x12\x04\x81\x01\x04\x18\"6\x20My\x20stream\x20to\ - \x20you\x20broke.\x20(This\x20is\x20impossible\x20to\x20send)\n\n\r\n\ - \x05\x05\x03\x02\x06\x01\x12\x04\x81\x01\x04\x11\n\r\n\x05\x05\x03\x02\ - \x06\x02\x12\x04\x81\x01\x14\x17\nA\n\x04\x05\x03\x02\x07\x12\x04\x82\ - \x01\x04\x19\"3\x20You\x20never\x20came\x20back.\x20(This\x20is\x20impos\ - sible\x20to\x20send)\n\n\r\n\x05\x05\x03\x02\x07\x01\x12\x04\x82\x01\x04\ - \x12\n\r\n\x05\x05\x03\x02\x07\x02\x12\x04\x82\x01\x15\x18\n\x0c\n\x02\ - \x04\x05\x12\x06\x85\x01\0\x9c\x01\x01\n\x0b\n\x03\x04\x05\x01\x12\x04\ - \x85\x01\x08\x17\nO\n\x04\x04\x05\x02\0\x12\x04\x87\x01\x04)\x1aA\x20Sho\ - uld\x20accompany\x20(at\x20least)\x20SESSION_INIT\x20and\x20CONFIRM_RECO\ - NNECT.\n\n\r\n\x05\x04\x05\x02\0\x04\x12\x04\x87\x01\x04\x0c\n\r\n\x05\ - \x04\x05\x02\0\x05\x12\x04\x87\x01\r\x13\n\r\n\x05\x04\x05\x02\0\x01\x12\ - \x04\x87\x01\x14$\n\r\n\x05\x04\x05\x02\0\x03\x12\x04\x87\x01'(\nv\n\x04\ - \x04\x05\x02\x01\x12\x04\x8b\x01\x041\x1ah\x20There\x20might\x20be\x20a\ - \x20state\x20transition.\x20May\x20be\x20absent;\x20absence\x20should\ - \x20be\n\x20treated\x20identically\x20to\x20NO_CHANGE.\n\n\r\n\x05\x04\ - \x05\x02\x01\x04\x12\x04\x8b\x01\x04\x0c\n\r\n\x05\x04\x05\x02\x01\x06\ - \x12\x04\x8b\x01\r\x1b\n\r\n\x05\x04\x05\x02\x01\x01\x12\x04\x8b\x01\x1c\ - ,\n\r\n\x05\x04\x05\x02\x01\x03\x12\x04\x8b\x01/0\nc\n\x04\x04\x05\x02\ - \x02\x12\x04\x8f\x01\x04(\x1aU\x20The\x20station\x20can\x20send\x20clien\ - t\x20config\x20info\x20piggybacked\n\x20on\x20any\x20message,\x20as\x20i\ - t\x20sees\x20fit\n\n\r\n\x05\x04\x05\x02\x02\x04\x12\x04\x8f\x01\x04\x0c\ - \n\r\n\x05\x04\x05\x02\x02\x06\x12\x04\x8f\x01\r\x17\n\r\n\x05\x04\x05\ - \x02\x02\x01\x12\x04\x8f\x01\x18#\n\r\n\x05\x04\x05\x02\x02\x03\x12\x04\ - \x8f\x01&'\nP\n\x04\x04\x05\x02\x03\x12\x04\x92\x01\x04+\x1aB\x20If\x20s\ - tate_transition\x20==\x20S2C_ERROR,\x20this\x20field\x20is\x20the\x20exp\ - lanation.\n\n\r\n\x05\x04\x05\x02\x03\x04\x12\x04\x92\x01\x04\x0c\n\r\n\ - \x05\x04\x05\x02\x03\x06\x12\x04\x92\x01\r\x1b\n\r\n\x05\x04\x05\x02\x03\ - \x01\x12\x04\x92\x01\x1c&\n\r\n\x05\x04\x05\x02\x03\x03\x12\x04\x92\x01)\ - *\nQ\n\x04\x04\x05\x02\x04\x12\x04\x95\x01\x04$\x1aC\x20Signals\x20clien\ - t\x20to\x20stop\x20connecting\x20for\x20following\x20amount\x20of\x20sec\ - onds\n\n\r\n\x05\x04\x05\x02\x04\x04\x12\x04\x95\x01\x04\x0c\n\r\n\x05\ - \x04\x05\x02\x04\x05\x12\x04\x95\x01\r\x13\n\r\n\x05\x04\x05\x02\x04\x01\ - \x12\x04\x95\x01\x14\x1f\n\r\n\x05\x04\x05\x02\x04\x03\x12\x04\x95\x01\"\ - #\nK\n\x04\x04\x05\x02\x05\x12\x04\x98\x01\x04#\x1a=\x20Sent\x20in\x20SE\ - SSION_INIT,\x20identifies\x20the\x20station\x20that\x20picked\x20up\n\n\ - \r\n\x05\x04\x05\x02\x05\x04\x12\x04\x98\x01\x04\x0c\n\r\n\x05\x04\x05\ - \x02\x05\x05\x12\x04\x98\x01\r\x13\n\r\n\x05\x04\x05\x02\x05\x01\x12\x04\ - \x98\x01\x14\x1e\n\r\n\x05\x04\x05\x02\x05\x03\x12\x04\x98\x01!\"\nG\n\ - \x04\x04\x05\x02\x06\x12\x04\x9b\x01\x04!\x1a9\x20Random-sized\x20junk\ - \x20to\x20defeat\x20packet\x20size\x20fingerprinting.\n\n\r\n\x05\x04\ - \x05\x02\x06\x04\x12\x04\x9b\x01\x04\x0c\n\r\n\x05\x04\x05\x02\x06\x05\ - \x12\x04\x9b\x01\r\x12\n\r\n\x05\x04\x05\x02\x06\x01\x12\x04\x9b\x01\x13\ - \x1a\n\r\n\x05\x04\x05\x02\x06\x03\x12\x04\x9b\x01\x1d\x20\n\x0c\n\x02\ - \x04\x06\x12\x06\x9e\x01\0\xc7\x01\x01\n\x0b\n\x03\x04\x06\x01\x12\x04\ - \x9e\x01\x08\x17\n\x0c\n\x04\x04\x06\x02\0\x12\x04\x9f\x01\x04)\n\r\n\ - \x05\x04\x06\x02\0\x04\x12\x04\x9f\x01\x04\x0c\n\r\n\x05\x04\x06\x02\0\ - \x05\x12\x04\x9f\x01\r\x13\n\r\n\x05\x04\x06\x02\0\x01\x12\x04\x9f\x01\ - \x14$\n\r\n\x05\x04\x06\x02\0\x03\x12\x04\x9f\x01'(\n\xd0\x01\n\x04\x04\ - \x06\x02\x01\x12\x04\xa4\x01\x04.\x1a\xc1\x01\x20The\x20client\x20report\ - s\x20its\x20decoy\x20list's\x20version\x20number\x20here,\x20which\x20th\ - e\n\x20station\x20can\x20use\x20to\x20decide\x20whether\x20to\x20send\ - \x20an\x20updated\x20one.\x20The\x20station\n\x20should\x20always\x20sen\ - d\x20a\x20list\x20if\x20this\x20field\x20is\x20set\x20to\x200.\n\n\r\n\ - \x05\x04\x06\x02\x01\x04\x12\x04\xa4\x01\x04\x0c\n\r\n\x05\x04\x06\x02\ - \x01\x05\x12\x04\xa4\x01\r\x13\n\r\n\x05\x04\x06\x02\x01\x01\x12\x04\xa4\ - \x01\x14)\n\r\n\x05\x04\x06\x02\x01\x03\x12\x04\xa4\x01,-\n\x0c\n\x04\ - \x04\x06\x02\x02\x12\x04\xa6\x01\x041\n\r\n\x05\x04\x06\x02\x02\x04\x12\ - \x04\xa6\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x02\x06\x12\x04\xa6\x01\r\x1b\ - \n\r\n\x05\x04\x06\x02\x02\x01\x12\x04\xa6\x01\x1c,\n\r\n\x05\x04\x06\ - \x02\x02\x03\x12\x04\xa6\x01/0\n\x80\x01\n\x04\x04\x06\x02\x03\x12\x04\ - \xaa\x01\x04$\x1ar\x20The\x20position\x20in\x20the\x20overall\x20session\ + coyBlocks\x127\n\x0econjure_pubkey\x18\x05\x20\x01(\x0b2\x10.tapdance.Pu\ + bKeyR\rconjurePubkey\"B\n\tDecoyList\x125\n\ntls_decoys\x18\x01\x20\x03(\ + \x0b2\x16.tapdance.TLSDecoySpecR\ttlsDecoys\")\n\x0fDarkDecoyBlocks\x12\ + \x16\n\x06blocks\x18\x01\x20\x03(\tR\x06blocks\"\xcb\x02\n\x0fStationToC\ + lient\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\ + \x12C\n\x10state_transition\x18\x02\x20\x01(\x0e2\x18.tapdance.S2C_Trans\ + itionR\x0fstateTransition\x125\n\x0bconfig_info\x18\x03\x20\x01(\x0b2\ + \x14.tapdance.ClientConfR\nconfigInfo\x127\n\nerr_reason\x18\x04\x20\x01\ + (\x0e2\x18.tapdance.ErrorReasonS2CR\terrReason\x12\x1f\n\x0btmp_backoff\ + \x18\x05\x20\x01(\rR\ntmpBackoff\x12\x1d\n\nstation_id\x18\x06\x20\x01(\ + \tR\tstationId\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"\x8f\ + \x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_only\x18\x01\x20\x01(\ + \x08R\nuploadOnly\x12\x1d\n\ndark_decoy\x18\x02\x20\x01(\x08R\tdarkDecoy\ + \x12!\n\x0cproxy_header\x18\x03\x20\x01(\x08R\x0bproxyHeader\x12\x17\n\ + \x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\"\xcb\x04\n\x0fClientToStati\ + on\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x12\ + 2\n\x15decoy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGeneration\ + \x12C\n\x10state_transition\x18\x03\x20\x01(\x0e2\x18.tapdance.C2S_Trans\ + itionR\x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\x04R\ + \nuploadSync\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoys\x12\ + ,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.tapdance.SessionStatsR\x05stats\ + \x125\n\ttransport\x18\x0c\x20\x01(\x0e2\x17.tapdance.TransportTypeR\ttr\ + ansport\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\rcovertAddress\x127\ + \n\x18masked_decoy_server_name\x18\x15\x20\x01(\tR\x15maskedDecoyServerN\ + ame\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv6Support\x12\x1d\n\nv4\ + _support\x18\x17\x20\x01(\x08R\tv4Support\x121\n\x05flags\x18\x18\x20\ + \x01(\x0b2\x1b.tapdance.RegistrationFlagsR\x05flags\x12\x18\n\x07padding\ + \x18d\x20\x01(\x0cR\x07padding\"s\n\x0bClientToAPI\x12\x16\n\x06secret\ + \x18\x01\x20\x01(\x0cR\x06secret\x12L\n\x14registration_payload\x18\x02\ + \x20\x01(\x0b2\x19.tapdance.ClientToStationR\x13registrationPayload\"\ + \x7f\n\nZMQPayload\x12#\n\rshared_secret\x18\x01\x20\x01(\x0cR\x0cshared\ + Secret\x12L\n\x14registration_payload\x18\x03\x20\x01(\x0b2\x19.tapdance\ + .ClientToStationR\x13registrationPayload\"\xdd\x01\n\x0cSessionStats\x12\ + 0\n\x14failed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAmount\ + \x121\n\x15total_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToConne\ + ct\x12$\n\x0ertt_to_station\x18!\x20\x01(\rR\x0crttToStation\x12\x20\n\ + \x0ctls_to_decoy\x18&\x20\x01(\rR\ntlsToDecoy\x12\x20\n\x0ctcp_to_decoy\ + \x18'\x20\x01(\rR\ntcpToDecoy*+\n\x07KeyType\x12\x0f\n\x0bAES_GCM_128\ + \x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*\xe7\x01\n\x0eC2S_Transition\x12\x11\ + \n\rC2S_NO_CHANGE\x10\0\x12\x14\n\x10C2S_SESSION_INIT\x10\x01\x12\x1b\n\ + \x17C2S_SESSION_COVERT_INIT\x10\x0b\x12\x18\n\x14C2S_EXPECT_RECONNECT\ + \x10\x02\x12\x15\n\x11C2S_SESSION_CLOSE\x10\x03\x12\x14\n\x10C2S_YIELD_U\ + PLOAD\x10\x04\x12\x16\n\x12C2S_ACQUIRE_UPLOAD\x10\x05\x12\x20\n\x1cC2S_E\ + XPECT_UPLOADONLY_RECONN\x10\x06\x12\x0e\n\tC2S_ERROR\x10\xff\x01*\x98\ + \x01\n\x0eS2C_Transition\x12\x11\n\rS2C_NO_CHANGE\x10\0\x12\x14\n\x10S2C\ + _SESSION_INIT\x10\x01\x12\x1b\n\x17S2C_SESSION_COVERT_INIT\x10\x0b\x12\ + \x19\n\x15S2C_CONFIRM_RECONNECT\x10\x02\x12\x15\n\x11S2C_SESSION_CLOSE\ + \x10\x03\x12\x0e\n\tS2C_ERROR\x10\xff\x01*\xac\x01\n\x0eErrorReasonS2C\ + \x12\x0c\n\x08NO_ERROR\x10\0\x12\x11\n\rCOVERT_STREAM\x10\x01\x12\x13\n\ + \x0fCLIENT_REPORTED\x10\x02\x12\x13\n\x0fCLIENT_PROTOCOL\x10\x03\x12\x14\ + \n\x10STATION_INTERNAL\x10\x04\x12\x12\n\x0eDECOY_OVERLOAD\x10\x05\x12\ + \x11\n\rCLIENT_STREAM\x10d\x12\x12\n\x0eCLIENT_TIMEOUT\x10e*H\n\rTranspo\ + rtType\x12\x11\n\rNullTransport\x10\0\x12\x10\n\x0cMinTransport\x10\x01\ + \x12\x12\n\x0eObfs4Transport\x10\x02J\xdeQ\n\x07\x12\x05\0\0\xf5\x01\x01\ + \n\x08\n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\n\x01\x02\x12\x03\x06\0\x112\ + \xa5\x01\x20TODO:\x20We're\x20using\x20proto2\x20because\x20it's\x20the\ + \x20default\x20on\x20Ubuntu\x2016.04.\n\x20At\x20some\x20point\x20we\x20\ + will\x20want\x20to\x20migrate\x20to\x20proto3,\x20but\x20we\x20are\x20no\ + t\n\x20using\x20any\x20proto3\x20features\x20yet.\n\n\n\n\x02\x05\0\x12\ + \x04\x08\0\x0b\x01\n\n\n\x03\x05\0\x01\x12\x03\x08\x05\x0c\n\x0b\n\x04\ + \x05\0\x02\0\x12\x03\t\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\t\x04\ + \x0f\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\t\x12\x14\n\x20\n\x04\x05\0\x02\ + \x01\x12\x03\n\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\ + \x05\0\x02\x01\x01\x12\x03\n\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\ + \x03\n\x12\x14\n\n\n\x02\x04\0\x12\x04\r\0\x12\x01\n\n\n\x03\x04\0\x01\ + \x12\x03\r\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x0f\x04\x1b\x1a'\x20A\ + \x20public\x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\ + \x04\0\x02\0\x04\x12\x03\x0f\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ + \x0f\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x0f\x13\x16\n\x0c\n\x05\ + \x04\0\x02\0\x03\x12\x03\x0f\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\ + \x11\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x11\x04\x0c\n\x0c\n\ + \x05\x04\0\x02\x01\x06\x12\x03\x11\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\ + \x12\x03\x11\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x11\x1c\x1d\n\ + \n\n\x02\x04\x01\x12\x04\x14\0:\x01\n\n\n\x03\x04\x01\x01\x12\x03\x14\ + \x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x19\x04!\x1a\x93\x01\x20T\ + he\x20hostname/SNI\x20to\x20use\x20for\x20this\x20host\n\n\x20The\x20hos\ + tname\x20is\x20the\x20only\x20required\x20field,\x20although\x20other\n\ + \x20fields\x20are\x20expected\x20to\x20be\x20present\x20in\x20most\x20ca\ + ses.\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x19\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\0\x05\x12\x03\x19\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\ + \x19\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x19\x1f\x20\n\xf7\x01\ + \n\x04\x04\x01\x02\x01\x12\x03\x20\x04\"\x1a\xe9\x01\x20The\x2032-bit\ + \x20ipv4\x20address,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\ + \x20IPv4\x20address\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resol\ + ved\x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20the\x20client\x20ma\ + y\x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20u\ + ntrusted,\x20or\x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\ + \x05\x04\x01\x02\x01\x04\x12\x03\x20\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\ + \x05\x12\x03\x20\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x15\ + \x1d\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x20\x20!\n>\n\x04\x04\x01\ + \x02\x02\x12\x03#\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20\ + in\x20network\x20byte\x20order\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03\ + #\x04\x0c\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03#\r\x12\n\x0c\n\x05\x04\ + \x01\x02\x02\x01\x12\x03#\x13\x1b\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\ + \x03#\x1e\x1f\n\x91\x01\n\x04\x04\x01\x02\x03\x12\x03)\x04\x1f\x1a\x83\ + \x01\x20The\x20Tapdance\x20station\x20public\x20key\x20to\x20use\x20when\ + \x20contacting\x20this\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20defaul\ + t\x20station\x20public\x20key\x20(if\x20any)\x20is\x20used.\n\n\x0c\n\ + \x05\x04\x01\x02\x03\x04\x12\x03)\x04\x0c\n\x0c\n\x05\x04\x01\x02\x03\ + \x06\x12\x03)\r\x13\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03)\x14\x1a\n\ + \x0c\n\x05\x04\x01\x02\x03\x03\x12\x03)\x1d\x1e\n\xee\x01\n\x04\x04\x01\ + \x02\x04\x12\x030\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20duration,\x20\ + in\x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connection\x20t\ + o\x20this\x20decoy\x20(because\x20the\x20decoy\x20may\x20close\x20the\n\ + \x20connection\x20itself\x20after\x20this\x20length\x20of\x20time)\n\n\ + \x20If\x20omitted,\x20a\x20default\x20of\x2030,000\x20milliseconds\x20is\ + \x20assumed.\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x030\x04\x0c\n\x0c\n\ + \x05\x04\x01\x02\x04\x05\x12\x030\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\ + \x12\x030\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x030\x1e\x1f\n\xb0\ + \x02\n\x04\x04\x01\x02\x05\x12\x039\x04\x1f\x1a\xa2\x02\x20The\x20maximu\ + m\x20TCP\x20window\x20size\x20to\x20attempt\x20to\x20use\x20for\x20this\ + \x20decoy.\n\n\x20If\x20omitted,\x20a\x20default\x20of\x2015360\x20is\ + \x20assumed.\n\n\x20TODO:\x20the\x20default\x20is\x20based\x20on\x20the\ + \x20current\x20heuristic\x20of\x20only\n\x20using\x20decoys\x20that\x20p\ + ermit\x20windows\x20of\x2015KB\x20or\x20larger.\x20\x20If\x20this\n\x20h\ + euristic\x20changes,\x20then\x20this\x20default\x20doesn't\x20make\x20se\ + nse.\n\n\x0c\n\x05\x04\x01\x02\x05\x04\x12\x039\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\x05\x05\x12\x039\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x039\ + \x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x039\x1d\x1e\n\x83\x08\n\ + \x02\x04\x02\x12\x04Q\0W\x012\xf6\x07\x20In\x20version\x201,\x20the\x20r\ + equest\x20is\x20very\x20simple:\x20when\n\x20the\x20client\x20sends\x20a\ + \x20MSG_PROTO\x20to\x20the\x20station,\x20if\x20the\n\x20generation\x20n\ + umber\x20is\x20present,\x20then\x20this\x20request\x20includes\n\x20(in\ + \x20addition\x20to\x20whatever\x20other\x20operations\x20are\x20part\x20\ + of\x20the\n\x20request)\x20a\x20request\x20for\x20the\x20station\x20to\ + \x20send\x20a\x20copy\x20of\n\x20the\x20current\x20decoy\x20set\x20that\ + \x20has\x20a\x20generation\x20number\x20greater\n\x20than\x20the\x20gene\ + ration\x20number\x20in\x20its\x20request.\n\n\x20If\x20the\x20response\ + \x20contains\x20a\x20DecoyListUpdate\x20with\x20a\x20generation\x20numbe\ + r\x20equal\n\x20to\x20that\x20which\x20the\x20client\x20sent,\x20then\ + \x20the\x20client\x20is\x20\"caught\x20up\"\x20with\n\x20the\x20station\ + \x20and\x20the\x20response\x20contains\x20no\x20new\x20information\n\x20\ + (and\x20all\x20other\x20fields\x20may\x20be\x20omitted\x20or\x20empty).\ + \x20\x20Otherwise,\n\x20the\x20station\x20will\x20send\x20the\x20latest\ + \x20configuration\x20information,\n\x20along\x20with\x20its\x20generatio\ + n\x20number.\n\n\x20The\x20station\x20can\x20also\x20send\x20ClientConf\ + \x20messages\n\x20(as\x20part\x20of\x20Station2Client\x20messages)\x20wh\ + enever\x20it\x20wants.\n\x20The\x20client\x20is\x20expected\x20to\x20rea\ + ct\x20as\x20if\x20it\x20had\x20requested\n\x20such\x20messages\x20--\x20\ + possibly\x20by\x20ignoring\x20them,\x20if\x20the\x20client\n\x20is\x20al\ + ready\x20up-to-date\x20according\x20to\x20the\x20generation\x20number.\n\ + \n\n\n\x03\x04\x02\x01\x12\x03Q\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\ + \x03R\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03R\x04\x0c\n\x0c\n\x05\ + \x04\x02\x02\0\x06\x12\x03R\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03R\ + \x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03R$%\n\x0b\n\x04\x04\x02\x02\ + \x01\x12\x03S\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03S\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\x01\x05\x12\x03S\r\x13\n\x0c\n\x05\x04\x02\x02\ + \x01\x01\x12\x03S\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03S!\"\n\ + \x0b\n\x04\x04\x02\x02\x02\x12\x03T\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\ + \x12\x03T\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03T\r\x13\n\x0c\n\ + \x05\x04\x02\x02\x02\x01\x12\x03T\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\ + \x12\x03T%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03U\x043\n\x0c\n\x05\x04\ + \x02\x02\x03\x04\x12\x03U\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\ + \x03U\r\x1c\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03U\x1d.\n\x0c\n\x05\ + \x04\x02\x02\x03\x03\x12\x03U12\n\x0b\n\x04\x04\x02\x02\x04\x12\x03V\x04\ + '\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\ + \x02\x04\x06\x12\x03V\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03V\x14\ + \"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03V%&\n\n\n\x02\x04\x03\x12\x04Y\ + \0[\x01\n\n\n\x03\x04\x03\x01\x12\x03Y\x08\x11\n\x0b\n\x04\x04\x03\x02\0\ + \x12\x03Z\x04)\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03Z\x04\x0c\n\x0c\n\ + \x05\x04\x03\x02\0\x06\x12\x03Z\r\x19\n\x0c\n\x05\x04\x03\x02\0\x01\x12\ + \x03Z\x1a$\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03Z'(\n\n\n\x02\x04\x04\ + \x12\x04]\0_\x01\n\n\n\x03\x04\x04\x01\x12\x03]\x08\x17\n\x0b\n\x04\x04\ + \x04\x02\0\x12\x03^\x04\x1f\n\x0c\n\x05\x04\x04\x02\0\x04\x12\x03^\x04\ + \x0c\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03^\r\x13\n\x0c\n\x05\x04\x04\ + \x02\0\x01\x12\x03^\x14\x1a\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03^\x1d\ + \x1e\n-\n\x02\x05\x01\x12\x04b\0l\x01\x1a!\x20State\x20transitions\x20of\ + \x20the\x20client\n\n\n\n\x03\x05\x01\x01\x12\x03b\x05\x13\n\x0b\n\x04\ + \x05\x01\x02\0\x12\x03c\x04\x16\n\x0c\n\x05\x05\x01\x02\0\x01\x12\x03c\ + \x04\x11\n\x0c\n\x05\x05\x01\x02\0\x02\x12\x03c\x14\x15\n\"\n\x04\x05\ + \x01\x02\x01\x12\x03d\x04\x19\"\x15\x20connect\x20me\x20to\x20squid\n\n\ + \x0c\n\x05\x05\x01\x02\x01\x01\x12\x03d\x04\x14\n\x0c\n\x05\x05\x01\x02\ + \x01\x02\x12\x03d\x17\x18\n,\n\x04\x05\x01\x02\x02\x12\x03e\x04!\"\x1f\ + \x20connect\x20me\x20to\x20provided\x20covert\n\n\x0c\n\x05\x05\x01\x02\ + \x02\x01\x12\x03e\x04\x1b\n\x0c\n\x05\x05\x01\x02\x02\x02\x12\x03e\x1e\ + \x20\n\x0b\n\x04\x05\x01\x02\x03\x12\x03f\x04\x1d\n\x0c\n\x05\x05\x01\ + \x02\x03\x01\x12\x03f\x04\x18\n\x0c\n\x05\x05\x01\x02\x03\x02\x12\x03f\ + \x1b\x1c\n\x0b\n\x04\x05\x01\x02\x04\x12\x03g\x04\x1a\n\x0c\n\x05\x05\ + \x01\x02\x04\x01\x12\x03g\x04\x15\n\x0c\n\x05\x05\x01\x02\x04\x02\x12\ + \x03g\x18\x19\n\x0b\n\x04\x05\x01\x02\x05\x12\x03h\x04\x19\n\x0c\n\x05\ + \x05\x01\x02\x05\x01\x12\x03h\x04\x14\n\x0c\n\x05\x05\x01\x02\x05\x02\ + \x12\x03h\x17\x18\n\x0b\n\x04\x05\x01\x02\x06\x12\x03i\x04\x1b\n\x0c\n\ + \x05\x05\x01\x02\x06\x01\x12\x03i\x04\x16\n\x0c\n\x05\x05\x01\x02\x06\ + \x02\x12\x03i\x19\x1a\n\x0b\n\x04\x05\x01\x02\x07\x12\x03j\x04%\n\x0c\n\ + \x05\x05\x01\x02\x07\x01\x12\x03j\x04\x20\n\x0c\n\x05\x05\x01\x02\x07\ + \x02\x12\x03j#$\n\x0b\n\x04\x05\x01\x02\x08\x12\x03k\x04\x14\n\x0c\n\x05\ + \x05\x01\x02\x08\x01\x12\x03k\x04\r\n\x0c\n\x05\x05\x01\x02\x08\x02\x12\ + \x03k\x10\x13\n-\n\x02\x05\x02\x12\x04o\0w\x01\x1a!\x20State\x20transiti\ + ons\x20of\x20the\x20server\n\n\n\n\x03\x05\x02\x01\x12\x03o\x05\x13\n\ + \x0b\n\x04\x05\x02\x02\0\x12\x03p\x04\x16\n\x0c\n\x05\x05\x02\x02\0\x01\ + \x12\x03p\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\x03p\x14\x15\n!\n\ + \x04\x05\x02\x02\x01\x12\x03q\x04\x19\"\x14\x20connected\x20to\x20squid\ + \n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03q\x04\x14\n\x0c\n\x05\x05\x02\ + \x02\x01\x02\x12\x03q\x17\x18\n'\n\x04\x05\x02\x02\x02\x12\x03r\x04!\"\ + \x1a\x20connected\x20to\x20covert\x20host\n\n\x0c\n\x05\x05\x02\x02\x02\ + \x01\x12\x03r\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\x12\x03r\x1e\x20\n\ + \x0b\n\x04\x05\x02\x02\x03\x12\x03s\x04\x1e\n\x0c\n\x05\x05\x02\x02\x03\ + \x01\x12\x03s\x04\x19\n\x0c\n\x05\x05\x02\x02\x03\x02\x12\x03s\x1c\x1d\n\ + \x0b\n\x04\x05\x02\x02\x04\x12\x03t\x04\x1a\n\x0c\n\x05\x05\x02\x02\x04\ + \x01\x12\x03t\x04\x15\n\x0c\n\x05\x05\x02\x02\x04\x02\x12\x03t\x18\x19\n\ + R\n\x04\x05\x02\x02\x05\x12\x03v\x04\x14\x1aE\x20TODO\x20should\x20proba\ + bly\x20also\x20allow\x20EXPECT_RECONNECT\x20here,\x20for\x20DittoTap\n\n\ + \x0c\n\x05\x05\x02\x02\x05\x01\x12\x03v\x04\r\n\x0c\n\x05\x05\x02\x02\ + \x05\x02\x12\x03v\x10\x13\n7\n\x02\x05\x03\x12\x05z\0\x84\x01\x01\x1a*\ + \x20Should\x20accompany\x20all\x20S2C_ERROR\x20messages.\n\n\n\n\x03\x05\ + \x03\x01\x12\x03z\x05\x13\n\x0b\n\x04\x05\x03\x02\0\x12\x03{\x04\x11\n\ + \x0c\n\x05\x05\x03\x02\0\x01\x12\x03{\x04\x0c\n\x0c\n\x05\x05\x03\x02\0\ + \x02\x12\x03{\x0f\x10\n)\n\x04\x05\x03\x02\x01\x12\x03|\x04\x16\"\x1c\ + \x20Squid\x20TCP\x20connection\x20broke\n\n\x0c\n\x05\x05\x03\x02\x01\ + \x01\x12\x03|\x04\x11\n\x0c\n\x05\x05\x03\x02\x01\x02\x12\x03|\x14\x15\n\ + 6\n\x04\x05\x03\x02\x02\x12\x03}\x04\x18\")\x20You\x20told\x20me\x20some\ + thing\x20was\x20wrong,\x20client\n\n\x0c\n\x05\x05\x03\x02\x02\x01\x12\ + \x03}\x04\x13\n\x0c\n\x05\x05\x03\x02\x02\x02\x12\x03}\x16\x17\n?\n\x04\ + \x05\x03\x02\x03\x12\x03~\x04\x18\"2\x20You\x20messed\x20up,\x20client\ + \x20(e.g.\x20sent\x20a\x20bad\x20protobuf)\n\n\x0c\n\x05\x05\x03\x02\x03\ + \x01\x12\x03~\x04\x13\n\x0c\n\x05\x05\x03\x02\x03\x02\x12\x03~\x16\x17\n\ + \x16\n\x04\x05\x03\x02\x04\x12\x03\x7f\x04\x19\"\t\x20I\x20broke\n\n\x0c\ + \n\x05\x05\x03\x02\x04\x01\x12\x03\x7f\x04\x14\n\x0c\n\x05\x05\x03\x02\ + \x04\x02\x12\x03\x7f\x17\x18\nE\n\x04\x05\x03\x02\x05\x12\x04\x80\x01\ + \x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\x20use\x20this\x20d\ + ecoy\x20right\x20now\n\n\r\n\x05\x05\x03\x02\x05\x01\x12\x04\x80\x01\x04\ + \x12\n\r\n\x05\x05\x03\x02\x05\x02\x12\x04\x80\x01\x15\x16\nD\n\x04\x05\ + \x03\x02\x06\x12\x04\x82\x01\x04\x18\"6\x20My\x20stream\x20to\x20you\x20\ + broke.\x20(This\x20is\x20impossible\x20to\x20send)\n\n\r\n\x05\x05\x03\ + \x02\x06\x01\x12\x04\x82\x01\x04\x11\n\r\n\x05\x05\x03\x02\x06\x02\x12\ + \x04\x82\x01\x14\x17\nA\n\x04\x05\x03\x02\x07\x12\x04\x83\x01\x04\x19\"3\ + \x20You\x20never\x20came\x20back.\x20(This\x20is\x20impossible\x20to\x20\ + send)\n\n\r\n\x05\x05\x03\x02\x07\x01\x12\x04\x83\x01\x04\x12\n\r\n\x05\ + \x05\x03\x02\x07\x02\x12\x04\x83\x01\x15\x18\n\x0c\n\x02\x05\x04\x12\x06\ + \x86\x01\0\x8a\x01\x01\n\x0b\n\x03\x05\x04\x01\x12\x04\x86\x01\x05\x12\n\ + \x0c\n\x04\x05\x04\x02\0\x12\x04\x87\x01\x04\x16\n\r\n\x05\x05\x04\x02\0\ + \x01\x12\x04\x87\x01\x04\x11\n\r\n\x05\x05\x04\x02\0\x02\x12\x04\x87\x01\ + \x14\x15\n`\n\x04\x05\x04\x02\x01\x12\x04\x88\x01\x04\x15\"R\x20Send\x20\ + a\x2032-byte\x20HMAC\x20id\x20to\x20let\x20the\x20station\x20distinguish\ + \x20registrations\x20to\x20same\x20host\n\n\r\n\x05\x05\x04\x02\x01\x01\ + \x12\x04\x88\x01\x04\x10\n\r\n\x05\x05\x04\x02\x01\x02\x12\x04\x88\x01\ + \x13\x14\n$\n\x04\x05\x04\x02\x02\x12\x04\x89\x01\x04\x17\"\x16\x20Not\ + \x20implemented\x20yet?\n\n\r\n\x05\x05\x04\x02\x02\x01\x12\x04\x89\x01\ + \x04\x12\n\r\n\x05\x05\x04\x02\x02\x02\x12\x04\x89\x01\x15\x16\n\x0c\n\ + \x02\x04\x05\x12\x06\x8c\x01\0\xa3\x01\x01\n\x0b\n\x03\x04\x05\x01\x12\ + \x04\x8c\x01\x08\x17\nO\n\x04\x04\x05\x02\0\x12\x04\x8e\x01\x04)\x1aA\ + \x20Should\x20accompany\x20(at\x20least)\x20SESSION_INIT\x20and\x20CONFI\ + RM_RECONNECT.\n\n\r\n\x05\x04\x05\x02\0\x04\x12\x04\x8e\x01\x04\x0c\n\r\ + \n\x05\x04\x05\x02\0\x05\x12\x04\x8e\x01\r\x13\n\r\n\x05\x04\x05\x02\0\ + \x01\x12\x04\x8e\x01\x14$\n\r\n\x05\x04\x05\x02\0\x03\x12\x04\x8e\x01'(\ + \nv\n\x04\x04\x05\x02\x01\x12\x04\x92\x01\x041\x1ah\x20There\x20might\ + \x20be\x20a\x20state\x20transition.\x20May\x20be\x20absent;\x20absence\ + \x20should\x20be\n\x20treated\x20identically\x20to\x20NO_CHANGE.\n\n\r\n\ + \x05\x04\x05\x02\x01\x04\x12\x04\x92\x01\x04\x0c\n\r\n\x05\x04\x05\x02\ + \x01\x06\x12\x04\x92\x01\r\x1b\n\r\n\x05\x04\x05\x02\x01\x01\x12\x04\x92\ + \x01\x1c,\n\r\n\x05\x04\x05\x02\x01\x03\x12\x04\x92\x01/0\nc\n\x04\x04\ + \x05\x02\x02\x12\x04\x96\x01\x04(\x1aU\x20The\x20station\x20can\x20send\ + \x20client\x20config\x20info\x20piggybacked\n\x20on\x20any\x20message,\ + \x20as\x20it\x20sees\x20fit\n\n\r\n\x05\x04\x05\x02\x02\x04\x12\x04\x96\ + \x01\x04\x0c\n\r\n\x05\x04\x05\x02\x02\x06\x12\x04\x96\x01\r\x17\n\r\n\ + \x05\x04\x05\x02\x02\x01\x12\x04\x96\x01\x18#\n\r\n\x05\x04\x05\x02\x02\ + \x03\x12\x04\x96\x01&'\nP\n\x04\x04\x05\x02\x03\x12\x04\x99\x01\x04+\x1a\ + B\x20If\x20state_transition\x20==\x20S2C_ERROR,\x20this\x20field\x20is\ + \x20the\x20explanation.\n\n\r\n\x05\x04\x05\x02\x03\x04\x12\x04\x99\x01\ + \x04\x0c\n\r\n\x05\x04\x05\x02\x03\x06\x12\x04\x99\x01\r\x1b\n\r\n\x05\ + \x04\x05\x02\x03\x01\x12\x04\x99\x01\x1c&\n\r\n\x05\x04\x05\x02\x03\x03\ + \x12\x04\x99\x01)*\nQ\n\x04\x04\x05\x02\x04\x12\x04\x9c\x01\x04$\x1aC\ + \x20Signals\x20client\x20to\x20stop\x20connecting\x20for\x20following\ + \x20amount\x20of\x20seconds\n\n\r\n\x05\x04\x05\x02\x04\x04\x12\x04\x9c\ + \x01\x04\x0c\n\r\n\x05\x04\x05\x02\x04\x05\x12\x04\x9c\x01\r\x13\n\r\n\ + \x05\x04\x05\x02\x04\x01\x12\x04\x9c\x01\x14\x1f\n\r\n\x05\x04\x05\x02\ + \x04\x03\x12\x04\x9c\x01\"#\nK\n\x04\x04\x05\x02\x05\x12\x04\x9f\x01\x04\ + #\x1a=\x20Sent\x20in\x20SESSION_INIT,\x20identifies\x20the\x20station\ + \x20that\x20picked\x20up\n\n\r\n\x05\x04\x05\x02\x05\x04\x12\x04\x9f\x01\ + \x04\x0c\n\r\n\x05\x04\x05\x02\x05\x05\x12\x04\x9f\x01\r\x13\n\r\n\x05\ + \x04\x05\x02\x05\x01\x12\x04\x9f\x01\x14\x1e\n\r\n\x05\x04\x05\x02\x05\ + \x03\x12\x04\x9f\x01!\"\nG\n\x04\x04\x05\x02\x06\x12\x04\xa2\x01\x04!\ + \x1a9\x20Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20finge\ + rprinting.\n\n\r\n\x05\x04\x05\x02\x06\x04\x12\x04\xa2\x01\x04\x0c\n\r\n\ + \x05\x04\x05\x02\x06\x05\x12\x04\xa2\x01\r\x12\n\r\n\x05\x04\x05\x02\x06\ + \x01\x12\x04\xa2\x01\x13\x1a\n\r\n\x05\x04\x05\x02\x06\x03\x12\x04\xa2\ + \x01\x1d\x20\n\x0c\n\x02\x04\x06\x12\x06\xa5\x01\0\xaa\x01\x01\n\x0b\n\ + \x03\x04\x06\x01\x12\x04\xa5\x01\x08\x19\n\x0c\n\x04\x04\x06\x02\0\x12\ + \x04\xa6\x01\x08&\n\r\n\x05\x04\x06\x02\0\x04\x12\x04\xa6\x01\x08\x10\n\ + \r\n\x05\x04\x06\x02\0\x05\x12\x04\xa6\x01\x11\x15\n\r\n\x05\x04\x06\x02\ + \0\x01\x12\x04\xa6\x01\x16!\n\r\n\x05\x04\x06\x02\0\x03\x12\x04\xa6\x01$\ + %\n\x0c\n\x04\x04\x06\x02\x01\x12\x04\xa7\x01\x08%\n\r\n\x05\x04\x06\x02\ + \x01\x04\x12\x04\xa7\x01\x08\x10\n\r\n\x05\x04\x06\x02\x01\x05\x12\x04\ + \xa7\x01\x11\x15\n\r\n\x05\x04\x06\x02\x01\x01\x12\x04\xa7\x01\x16\x20\n\ + \r\n\x05\x04\x06\x02\x01\x03\x12\x04\xa7\x01#$\n\x0c\n\x04\x04\x06\x02\ + \x02\x12\x04\xa8\x01\x08'\n\r\n\x05\x04\x06\x02\x02\x04\x12\x04\xa8\x01\ + \x08\x10\n\r\n\x05\x04\x06\x02\x02\x05\x12\x04\xa8\x01\x11\x15\n\r\n\x05\ + \x04\x06\x02\x02\x01\x12\x04\xa8\x01\x16\"\n\r\n\x05\x04\x06\x02\x02\x03\ + \x12\x04\xa8\x01%&\n\x0c\n\x04\x04\x06\x02\x03\x12\x04\xa9\x01\x08\"\n\r\ + \n\x05\x04\x06\x02\x03\x04\x12\x04\xa9\x01\x08\x10\n\r\n\x05\x04\x06\x02\ + \x03\x05\x12\x04\xa9\x01\x11\x15\n\r\n\x05\x04\x06\x02\x03\x01\x12\x04\ + \xa9\x01\x16\x1d\n\r\n\x05\x04\x06\x02\x03\x03\x12\x04\xa9\x01\x20!\n\ + \x0c\n\x02\x04\x07\x12\x06\xac\x01\0\xd8\x01\x01\n\x0b\n\x03\x04\x07\x01\ + \x12\x04\xac\x01\x08\x17\n\x0c\n\x04\x04\x07\x02\0\x12\x04\xad\x01\x04)\ + \n\r\n\x05\x04\x07\x02\0\x04\x12\x04\xad\x01\x04\x0c\n\r\n\x05\x04\x07\ + \x02\0\x05\x12\x04\xad\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xad\ + \x01\x14$\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xad\x01'(\n\xd0\x01\n\x04\ + \x04\x07\x02\x01\x12\x04\xb2\x01\x04.\x1a\xc1\x01\x20The\x20client\x20re\ + ports\x20its\x20decoy\x20list's\x20version\x20number\x20here,\x20which\ + \x20the\n\x20station\x20can\x20use\x20to\x20decide\x20whether\x20to\x20s\ + end\x20an\x20updated\x20one.\x20The\x20station\n\x20should\x20always\x20\ + send\x20a\x20list\x20if\x20this\x20field\x20is\x20set\x20to\x200.\n\n\r\ + \n\x05\x04\x07\x02\x01\x04\x12\x04\xb2\x01\x04\x0c\n\r\n\x05\x04\x07\x02\ + \x01\x05\x12\x04\xb2\x01\r\x13\n\r\n\x05\x04\x07\x02\x01\x01\x12\x04\xb2\ + \x01\x14)\n\r\n\x05\x04\x07\x02\x01\x03\x12\x04\xb2\x01,-\n\x0c\n\x04\ + \x04\x07\x02\x02\x12\x04\xb4\x01\x041\n\r\n\x05\x04\x07\x02\x02\x04\x12\ + \x04\xb4\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x02\x06\x12\x04\xb4\x01\r\x1b\ + \n\r\n\x05\x04\x07\x02\x02\x01\x12\x04\xb4\x01\x1c,\n\r\n\x05\x04\x07\ + \x02\x02\x03\x12\x04\xb4\x01/0\n\x80\x01\n\x04\x04\x07\x02\x03\x12\x04\ + \xb8\x01\x04$\x1ar\x20The\x20position\x20in\x20the\x20overall\x20session\ 's\x20upload\x20sequence\x20where\x20the\x20current\n\x20YIELD=>ACQUIRE\ - \x20switchover\x20is\x20happening.\n\n\r\n\x05\x04\x06\x02\x03\x04\x12\ - \x04\xaa\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x03\x05\x12\x04\xaa\x01\r\x13\ - \n\r\n\x05\x04\x06\x02\x03\x01\x12\x04\xaa\x01\x14\x1f\n\r\n\x05\x04\x06\ - \x02\x03\x03\x12\x04\xaa\x01\"#\nq\n\x04\x04\x06\x02\x04\x12\x04\xaf\x01\ + \x20switchover\x20is\x20happening.\n\n\r\n\x05\x04\x07\x02\x03\x04\x12\ + \x04\xb8\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x03\x05\x12\x04\xb8\x01\r\x13\ + \n\r\n\x05\x04\x07\x02\x03\x01\x12\x04\xb8\x01\x14\x1f\n\r\n\x05\x04\x07\ + \x02\x03\x03\x12\x04\xb8\x01\"#\nq\n\x04\x04\x07\x02\x04\x12\x04\xbd\x01\ \x04'\x1ac\x20List\x20of\x20decoys\x20that\x20client\x20have\x20unsucces\ sfully\x20tried\x20in\x20current\x20session.\n\x20Could\x20be\x20sent\ - \x20in\x20chunks\n\n\r\n\x05\x04\x06\x02\x04\x04\x12\x04\xaf\x01\x04\x0c\ - \n\r\n\x05\x04\x06\x02\x04\x05\x12\x04\xaf\x01\r\x13\n\r\n\x05\x04\x06\ - \x02\x04\x01\x12\x04\xaf\x01\x14!\n\r\n\x05\x04\x06\x02\x04\x03\x12\x04\ - \xaf\x01$&\n\x0c\n\x04\x04\x06\x02\x05\x12\x04\xb1\x01\x04%\n\r\n\x05\ - \x04\x06\x02\x05\x04\x12\x04\xb1\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x05\ - \x06\x12\x04\xb1\x01\r\x19\n\r\n\x05\x04\x06\x02\x05\x01\x12\x04\xb1\x01\ - \x1a\x1f\n\r\n\x05\x04\x06\x02\x05\x03\x12\x04\xb1\x01\"$\n\xc8\x03\n\ - \x04\x04\x06\x02\x06\x12\x04\xb9\x01\x04(\x1a\xb9\x03\x20Station\x20is\ - \x20only\x20required\x20to\x20check\x20this\x20variable\x20during\x20ses\ - sion\x20initialization.\n\x20If\x20set,\x20station\x20must\x20facilitate\ - \x20connection\x20to\x20said\x20target\x20by\x20itself,\x20i.e.\x20write\ - \x20into\x20squid\n\x20socket\x20an\x20HTTP/SOCKS/any\x20other\x20connec\ - tion\x20request.\n\x20covert_address\x20must\x20have\x20exactly\x20one\ - \x20':'\x20colon,\x20that\x20separates\x20host\x20(literal\x20IP\x20addr\ - ess\x20or\n\x20resolvable\x20hostname)\x20and\x20port\n\x20TODO:\x20make\ - \x20it\x20required\x20for\x20initialization,\x20and\x20stop\x20connectin\ - g\x20any\x20client\x20straight\x20to\x20squid?\n\n\r\n\x05\x04\x06\x02\ - \x06\x04\x12\x04\xb9\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x06\x05\x12\x04\ - \xb9\x01\r\x13\n\r\n\x05\x04\x06\x02\x06\x01\x12\x04\xb9\x01\x14\"\n\r\n\ - \x05\x04\x06\x02\x06\x03\x12\x04\xb9\x01%'\nR\n\x04\x04\x06\x02\x07\x12\ - \x04\xbc\x01\x042\x1aD\x20Used\x20in\x20dark\x20decoys\x20to\x20signal\ - \x20which\x20dark\x20decoy\x20it\x20will\x20connect\x20to.\n\n\r\n\x05\ - \x04\x06\x02\x07\x04\x12\x04\xbc\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x07\ - \x05\x12\x04\xbc\x01\r\x13\n\r\n\x05\x04\x06\x02\x07\x01\x12\x04\xbc\x01\ - \x14,\n\r\n\x05\x04\x06\x02\x07\x03\x12\x04\xbc\x01/1\nR\n\x04\x04\x06\ - \x02\x08\x12\x04\xbf\x01\x04\"\x1aD\x20Used\x20to\x20indicate\x20to\x20s\ - erver\x20if\x20client\x20is\x20registering\x20v4,\x20v6\x20or\x20both\n\ - \n\r\n\x05\x04\x06\x02\x08\x04\x12\x04\xbf\x01\x04\x0c\n\r\n\x05\x04\x06\ - \x02\x08\x05\x12\x04\xbf\x01\r\x11\n\r\n\x05\x04\x06\x02\x08\x01\x12\x04\ - \xbf\x01\x12\x1c\n\r\n\x05\x04\x06\x02\x08\x03\x12\x04\xbf\x01\x1f!\n\ - \x0c\n\x04\x04\x06\x02\t\x12\x04\xc0\x01\x04\"\n\r\n\x05\x04\x06\x02\t\ - \x04\x12\x04\xc0\x01\x04\x0c\n\r\n\x05\x04\x06\x02\t\x05\x12\x04\xc0\x01\ - \r\x11\n\r\n\x05\x04\x06\x02\t\x01\x12\x04\xc0\x01\x12\x1c\n\r\n\x05\x04\ - \x06\x02\t\x03\x12\x04\xc0\x01\x1f!\nI\n\x04\x04\x06\x02\n\x12\x04\xc3\ - \x01\x04'\x1a;\x20Protocol\x20Type\x20->\x20protocol\x20used\x20in\x20cl\ - ient\x20to\x20proxy\x20station\n\n\r\n\x05\x04\x06\x02\n\x04\x12\x04\xc3\ - \x01\x04\x0c\n\r\n\x05\x04\x06\x02\n\x05\x12\x04\xc3\x01\r\x13\n\r\n\x05\ - \x04\x06\x02\n\x01\x12\x04\xc3\x01\x14!\n\r\n\x05\x04\x06\x02\n\x03\x12\ - \x04\xc3\x01$&\nG\n\x04\x04\x06\x02\x0b\x12\x04\xc6\x01\x04!\x1a9\x20Ran\ - dom-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprinting.\n\ - \n\r\n\x05\x04\x06\x02\x0b\x04\x12\x04\xc6\x01\x04\x0c\n\r\n\x05\x04\x06\ - \x02\x0b\x05\x12\x04\xc6\x01\r\x12\n\r\n\x05\x04\x06\x02\x0b\x01\x12\x04\ - \xc6\x01\x13\x1a\n\r\n\x05\x04\x06\x02\x0b\x03\x12\x04\xc6\x01\x1d\x20\n\ - \x0c\n\x02\x04\x07\x12\x06\xc9\x01\0\xd5\x01\x01\n\x0b\n\x03\x04\x07\x01\ - \x12\x04\xc9\x01\x08\x14\n9\n\x04\x04\x07\x02\0\x12\x04\xca\x01\x04.\"+\ - \x20how\x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\ - \x05\x04\x07\x02\0\x04\x12\x04\xca\x01\x04\x0c\n\r\n\x05\x04\x07\x02\0\ - \x05\x12\x04\xca\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xca\x01\ - \x14(\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xca\x01+-\nm\n\x04\x04\x07\x02\ - \x01\x12\x04\xcf\x01\x04/\x1a\x1e\x20Applicable\x20to\x20whole\x20sessio\ - n:\n\"\x1a\x20includes\x20failed\x20attempts\n2#\x20Timings\x20below\x20\ - are\x20in\x20milliseconds\n\n\r\n\x05\x04\x07\x02\x01\x04\x12\x04\xcf\ - \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x01\x05\x12\x04\xcf\x01\r\x13\n\r\n\ - \x05\x04\x07\x02\x01\x01\x12\x04\xcf\x01\x14)\n\r\n\x05\x04\x07\x02\x01\ - \x03\x12\x04\xcf\x01,.\nR\n\x04\x04\x07\x02\x02\x12\x04\xd2\x01\x04(\x1a\ - \x1f\x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20durin\ - g\x20initial\x20handshake\n\n\r\n\x05\x04\x07\x02\x02\x04\x12\x04\xd2\ - \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x02\x05\x12\x04\xd2\x01\r\x13\n\r\n\ - \x05\x04\x07\x02\x02\x01\x12\x04\xd2\x01\x14\"\n\r\n\x05\x04\x07\x02\x02\ - \x03\x12\x04\xd2\x01%'\n%\n\x04\x04\x07\x02\x03\x12\x04\xd3\x01\x04&\"\ - \x17\x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x07\x02\x03\x04\ - \x12\x04\xd3\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x03\x05\x12\x04\xd3\x01\r\ - \x13\n\r\n\x05\x04\x07\x02\x03\x01\x12\x04\xd3\x01\x14\x20\n\r\n\x05\x04\ - \x07\x02\x03\x03\x12\x04\xd3\x01#%\nB\n\x04\x04\x07\x02\x04\x12\x04\xd4\ - \x01\x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\ - \x20to\x20decot\n\n\r\n\x05\x04\x07\x02\x04\x04\x12\x04\xd4\x01\x04\x0c\ - \n\r\n\x05\x04\x07\x02\x04\x05\x12\x04\xd4\x01\r\x13\n\r\n\x05\x04\x07\ - \x02\x04\x01\x12\x04\xd4\x01\x14\x20\n\r\n\x05\x04\x07\x02\x04\x03\x12\ - \x04\xd4\x01#%\ + \x20in\x20chunks\n\n\r\n\x05\x04\x07\x02\x04\x04\x12\x04\xbd\x01\x04\x0c\ + \n\r\n\x05\x04\x07\x02\x04\x05\x12\x04\xbd\x01\r\x13\n\r\n\x05\x04\x07\ + \x02\x04\x01\x12\x04\xbd\x01\x14!\n\r\n\x05\x04\x07\x02\x04\x03\x12\x04\ + \xbd\x01$&\n\x0c\n\x04\x04\x07\x02\x05\x12\x04\xbf\x01\x04%\n\r\n\x05\ + \x04\x07\x02\x05\x04\x12\x04\xbf\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x05\ + \x06\x12\x04\xbf\x01\r\x19\n\r\n\x05\x04\x07\x02\x05\x01\x12\x04\xbf\x01\ + \x1a\x1f\n\r\n\x05\x04\x07\x02\x05\x03\x12\x04\xbf\x01\"$\nk\n\x04\x04\ + \x07\x02\x06\x12\x04\xc2\x01\x04*\x1a]\x20NullTransport,\x20MinTransport\ + ,\x20Obfs4Transport,\x20etc.\x20Transport\x20type\x20we\x20want\x20from\ + \x20phantom\x20proxy\n\n\r\n\x05\x04\x07\x02\x06\x04\x12\x04\xc2\x01\x04\ + \x0c\n\r\n\x05\x04\x07\x02\x06\x06\x12\x04\xc2\x01\r\x1a\n\r\n\x05\x04\ + \x07\x02\x06\x01\x12\x04\xc2\x01\x1b$\n\r\n\x05\x04\x07\x02\x06\x03\x12\ + \x04\xc2\x01')\n\xc8\x03\n\x04\x04\x07\x02\x07\x12\x04\xca\x01\x04(\x1a\ + \xb9\x03\x20Station\x20is\x20only\x20required\x20to\x20check\x20this\x20\ + variable\x20during\x20session\x20initialization.\n\x20If\x20set,\x20stat\ + ion\x20must\x20facilitate\x20connection\x20to\x20said\x20target\x20by\ + \x20itself,\x20i.e.\x20write\x20into\x20squid\n\x20socket\x20an\x20HTTP/\ + SOCKS/any\x20other\x20connection\x20request.\n\x20covert_address\x20must\ + \x20have\x20exactly\x20one\x20':'\x20colon,\x20that\x20separates\x20host\ + \x20(literal\x20IP\x20address\x20or\n\x20resolvable\x20hostname)\x20and\ + \x20port\n\x20TODO:\x20make\x20it\x20required\x20for\x20initialization,\ + \x20and\x20stop\x20connecting\x20any\x20client\x20straight\x20to\x20squi\ + d?\n\n\r\n\x05\x04\x07\x02\x07\x04\x12\x04\xca\x01\x04\x0c\n\r\n\x05\x04\ + \x07\x02\x07\x05\x12\x04\xca\x01\r\x13\n\r\n\x05\x04\x07\x02\x07\x01\x12\ + \x04\xca\x01\x14\"\n\r\n\x05\x04\x07\x02\x07\x03\x12\x04\xca\x01%'\nR\n\ + \x04\x04\x07\x02\x08\x12\x04\xcd\x01\x042\x1aD\x20Used\x20in\x20dark\x20\ + decoys\x20to\x20signal\x20which\x20dark\x20decoy\x20it\x20will\x20connec\ + t\x20to.\n\n\r\n\x05\x04\x07\x02\x08\x04\x12\x04\xcd\x01\x04\x0c\n\r\n\ + \x05\x04\x07\x02\x08\x05\x12\x04\xcd\x01\r\x13\n\r\n\x05\x04\x07\x02\x08\ + \x01\x12\x04\xcd\x01\x14,\n\r\n\x05\x04\x07\x02\x08\x03\x12\x04\xcd\x01/\ + 1\nR\n\x04\x04\x07\x02\t\x12\x04\xd0\x01\x04\"\x1aD\x20Used\x20to\x20ind\ + icate\x20to\x20server\x20if\x20client\x20is\x20registering\x20v4,\x20v6\ + \x20or\x20both\n\n\r\n\x05\x04\x07\x02\t\x04\x12\x04\xd0\x01\x04\x0c\n\r\ + \n\x05\x04\x07\x02\t\x05\x12\x04\xd0\x01\r\x11\n\r\n\x05\x04\x07\x02\t\ + \x01\x12\x04\xd0\x01\x12\x1c\n\r\n\x05\x04\x07\x02\t\x03\x12\x04\xd0\x01\ + \x1f!\n\x0c\n\x04\x04\x07\x02\n\x12\x04\xd1\x01\x04\"\n\r\n\x05\x04\x07\ + \x02\n\x04\x12\x04\xd1\x01\x04\x0c\n\r\n\x05\x04\x07\x02\n\x05\x12\x04\ + \xd1\x01\r\x11\n\r\n\x05\x04\x07\x02\n\x01\x12\x04\xd1\x01\x12\x1c\n\r\n\ + \x05\x04\x07\x02\n\x03\x12\x04\xd1\x01\x1f!\nD\n\x04\x04\x07\x02\x0b\x12\ + \x04\xd4\x01\x08.\x1a6\x20A\x20collection\x20of\x20optional\x20flags\x20\ + for\x20the\x20registration.\n\n\r\n\x05\x04\x07\x02\x0b\x04\x12\x04\xd4\ + \x01\x08\x10\n\r\n\x05\x04\x07\x02\x0b\x06\x12\x04\xd4\x01\x11\"\n\r\n\ + \x05\x04\x07\x02\x0b\x01\x12\x04\xd4\x01#(\n\r\n\x05\x04\x07\x02\x0b\x03\ + \x12\x04\xd4\x01+-\nG\n\x04\x04\x07\x02\x0c\x12\x04\xd7\x01\x04!\x1a9\ + \x20Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprin\ + ting.\n\n\r\n\x05\x04\x07\x02\x0c\x04\x12\x04\xd7\x01\x04\x0c\n\r\n\x05\ + \x04\x07\x02\x0c\x05\x12\x04\xd7\x01\r\x12\n\r\n\x05\x04\x07\x02\x0c\x01\ + \x12\x04\xd7\x01\x13\x1a\n\r\n\x05\x04\x07\x02\x0c\x03\x12\x04\xd7\x01\ + \x1d\x20\n\xbe\x01\n\x02\x04\x08\x12\x06\xdc\x01\0\xe2\x01\x01\x1a\xaf\ + \x01\x20Message\x20type\x20used\x20as\x20the\x20request\x20body\x20when\ + \x20registering\x20via\x20the\x20HTTP\x20API.\n\x20This\x20message\x20is\ + \x20assumed\x20to\x20be\x20sent\x20via\x20TLS,\x20meaning\x20that\x20sen\ + ding\x20the\x20secret\x20outright\x20is\x20acceptable.\n\n\x0b\n\x03\x04\ + \x08\x01\x12\x04\xdc\x01\x08\x13\nN\n\x04\x04\x08\x02\0\x12\x04\xde\x01\ + \x04\x1e\x1a@\x20The\x20secret\x20that\x20will\x20be\x20used\x20when\x20\ + forming\x20phantom\x20connections.\n\n\r\n\x05\x04\x08\x02\0\x04\x12\x04\ + \xde\x01\x04\x0c\n\r\n\x05\x04\x08\x02\0\x05\x12\x04\xde\x01\r\x12\n\r\n\ + \x05\x04\x08\x02\0\x01\x12\x04\xde\x01\x13\x19\n\r\n\x05\x04\x08\x02\0\ + \x03\x12\x04\xde\x01\x1c\x1d\nU\n\x04\x04\x08\x02\x01\x12\x04\xe1\x01\ + \x046\x1aG\x20The\x20ClientToStation\x20payload;\x20the\x20same\x20as\ + \x20used\x20in\x20decoy\x20registrations.\n\n\r\n\x05\x04\x08\x02\x01\ + \x04\x12\x04\xe1\x01\x04\x0c\n\r\n\x05\x04\x08\x02\x01\x06\x12\x04\xe1\ + \x01\r\x1c\n\r\n\x05\x04\x08\x02\x01\x01\x12\x04\xe1\x01\x1d1\n\r\n\x05\ + \x04\x08\x02\x01\x03\x12\x04\xe1\x0145\n\x0c\n\x02\x04\t\x12\x06\xe4\x01\ + \0\xe7\x01\x01\n\x0b\n\x03\x04\t\x01\x12\x04\xe4\x01\x08\x12\n\x0c\n\x04\ + \x04\t\x02\0\x12\x04\xe5\x01\x08)\n\r\n\x05\x04\t\x02\0\x04\x12\x04\xe5\ + \x01\x08\x10\n\r\n\x05\x04\t\x02\0\x05\x12\x04\xe5\x01\x11\x16\n\r\n\x05\ + \x04\t\x02\0\x01\x12\x04\xe5\x01\x17$\n\r\n\x05\x04\t\x02\0\x03\x12\x04\ + \xe5\x01'(\n\x0c\n\x04\x04\t\x02\x01\x12\x04\xe6\x01\x08:\n\r\n\x05\x04\ + \t\x02\x01\x04\x12\x04\xe6\x01\x08\x10\n\r\n\x05\x04\t\x02\x01\x06\x12\ + \x04\xe6\x01\x11\x20\n\r\n\x05\x04\t\x02\x01\x01\x12\x04\xe6\x01!5\n\r\n\ + \x05\x04\t\x02\x01\x03\x12\x04\xe6\x0189\n\x0c\n\x02\x04\n\x12\x06\xe9\ + \x01\0\xf5\x01\x01\n\x0b\n\x03\x04\n\x01\x12\x04\xe9\x01\x08\x14\n9\n\ + \x04\x04\n\x02\0\x12\x04\xea\x01\x04.\"+\x20how\x20many\x20decoys\x20wer\ + e\x20tried\x20before\x20success\n\n\r\n\x05\x04\n\x02\0\x04\x12\x04\xea\ + \x01\x04\x0c\n\r\n\x05\x04\n\x02\0\x05\x12\x04\xea\x01\r\x13\n\r\n\x05\ + \x04\n\x02\0\x01\x12\x04\xea\x01\x14(\n\r\n\x05\x04\n\x02\0\x03\x12\x04\ + \xea\x01+-\nm\n\x04\x04\n\x02\x01\x12\x04\xef\x01\x04/\x1a\x1e\x20Applic\ + able\x20to\x20whole\x20session:\n\"\x1a\x20includes\x20failed\x20attempt\ + s\n2#\x20Timings\x20below\x20are\x20in\x20milliseconds\n\n\r\n\x05\x04\n\ + \x02\x01\x04\x12\x04\xef\x01\x04\x0c\n\r\n\x05\x04\n\x02\x01\x05\x12\x04\ + \xef\x01\r\x13\n\r\n\x05\x04\n\x02\x01\x01\x12\x04\xef\x01\x14)\n\r\n\ + \x05\x04\n\x02\x01\x03\x12\x04\xef\x01,.\nR\n\x04\x04\n\x02\x02\x12\x04\ + \xf2\x01\x04(\x1a\x1f\x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20\ + measured\x20during\x20initial\x20handshake\n\n\r\n\x05\x04\n\x02\x02\x04\ + \x12\x04\xf2\x01\x04\x0c\n\r\n\x05\x04\n\x02\x02\x05\x12\x04\xf2\x01\r\ + \x13\n\r\n\x05\x04\n\x02\x02\x01\x12\x04\xf2\x01\x14\"\n\r\n\x05\x04\n\ + \x02\x02\x03\x12\x04\xf2\x01%'\n%\n\x04\x04\n\x02\x03\x12\x04\xf3\x01\ + \x04&\"\x17\x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\n\x02\x03\ + \x04\x12\x04\xf3\x01\x04\x0c\n\r\n\x05\x04\n\x02\x03\x05\x12\x04\xf3\x01\ + \r\x13\n\r\n\x05\x04\n\x02\x03\x01\x12\x04\xf3\x01\x14\x20\n\r\n\x05\x04\ + \n\x02\x03\x03\x12\x04\xf3\x01#%\nB\n\x04\x04\n\x02\x04\x12\x04\xf4\x01\ + \x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\x20to\ + \x20decot\n\n\r\n\x05\x04\n\x02\x04\x04\x12\x04\xf4\x01\x04\x0c\n\r\n\ + \x05\x04\n\x02\x04\x05\x12\x04\xf4\x01\r\x13\n\r\n\x05\x04\n\x02\x04\x01\ + \x12\x04\xf4\x01\x14\x20\n\r\n\x05\x04\n\x02\x04\x03\x12\x04\xf4\x01#%\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto, -}; +static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + file_descriptor_proto_lazy.get(|| { + parse_descriptor_proto() + }) } diff --git a/registration-api/Caddyfile.example b/registration-api/Caddyfile.example new file mode 100644 index 00000000..37d2d4f2 --- /dev/null +++ b/registration-api/Caddyfile.example @@ -0,0 +1,9 @@ +# This establishes our domain as registration.refraction.network, which lets Caddy take care of all of the TLS completely automatically (it fetches the certificate on first run and keeps it renewed with no intervention) +registration.refraction.network + +# All requests of the form https://domain/api/a/b/c will be routed to http://localhost:8080/a/b/c +route /api/* { + # Strip the /api portion of the URL when proxying + uri strip_prefix /api + reverse_proxy localhost:8080 +} diff --git a/registration-api/Makefile b/registration-api/Makefile new file mode 100644 index 00000000..e9fb1888 --- /dev/null +++ b/registration-api/Makefile @@ -0,0 +1,2 @@ +all: + go build . diff --git a/registration-api/README.md b/registration-api/README.md new file mode 100644 index 00000000..a67150c8 --- /dev/null +++ b/registration-api/README.md @@ -0,0 +1,9 @@ +# Conjure Registration API + +The registration API is an HTTP API intended to support faster registrations for capable clients and potentially provide a registration mechanism for partners on behalf of their users. It hosts the HTTP API on a local port, and exposes a ZeroMQ socket where it publishes registrations on another port; these ports can be configured in `config.toml`. + +## Setup + +Set the `privkey_path` field in `config.toml` to the absolute path to the private key used for the station; this can be the same key as the one used for the detctor, although any Curve25519 key (32 bytes, or 64 if the public key is appended to the private key portion) will suffice. A list of accepted public keys should be set up in the `pubkeys` field; these are the public keys of each station you'd like to connect to the API. These are Z85-encoded, and thus should be 40 characters long. For easy retrieval of this encoding from clients' public keys, consider [z85](https://github.com/CarsonHoffman/z85). + +Once those fields are set up, that's about all you need to do in the config unless you'd like to change the API or ZMQ ports. Set the `CJ_API_CONFIG` environment variable to the absolute path of `config.toml` when running it; using an `EnvironmentFile` in the systemd service definition is a great way to do this. Use an HTTP server (e.g. Caddy or Nginx) to terminate TLS connections and proxy requests to the local API (an example Caddyfile is included in this directory), and make sure that the chosen ZMQ port is open to the world. diff --git a/registration-api/api_test.go b/registration-api/api_test.go new file mode 100644 index 00000000..0ee42d92 --- /dev/null +++ b/registration-api/api_test.go @@ -0,0 +1,206 @@ +package main + +import ( + "bytes" + "encoding/hex" + "fmt" + "io/ioutil" + "log" + "net/http" + "net/http/httptest" + "os" + "testing" + "time" + + "github.com/golang/protobuf/proto" + zmq "github.com/pebbe/zmq4" + pb "github.com/refraction-networking/gotapdance/protobuf" +) + +var ( + secretHex = []byte(`1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef`) + secret []byte + + logger = log.New(os.Stdout, "[API] ", log.Ldate|log.Lmicroseconds) +) + +func init() { + secret = make([]byte, SecretLength) + hex.Decode(secret, secretHex) +} + +func generateClientToAPIPayload() (c2API *pb.ClientToAPI, marshaledc2API []byte) { + generation := uint32(0) + covert := "1.2.3.4:1234" + + // We need pointers to bools. This is nasty D: + true_bool := true + false_bool := false + + c2s := pb.ClientToStation{ + DecoyListGeneration: &generation, + CovertAddress: &covert, + V4Support: &true_bool, + V6Support: &false_bool, + Flags: &pb.RegistrationFlags{ + ProxyHeader: &true_bool, + Use_TIL: &true_bool, + UploadOnly: &false_bool, + }, + } + + c2API = &pb.ClientToAPI{ + Secret: secret, + RegistrationPayload: &c2s, + } + + marshaledc2API, _ = proto.Marshal(c2API) + + return +} + +func TestZMQPayloadGeneration(t *testing.T) { + c2API, _ := generateClientToAPIPayload() + + zmqPayload, err := generateZMQPayload(c2API) + if err != nil { + t.Fatalf("failed to generate ZMQ payload: expected nil, got %v", err) + } + + var retrievedPayload pb.ZMQPayload + err = proto.Unmarshal(zmqPayload, &retrievedPayload) + if err != nil { + t.Fatalf("failed to unmarshal ClientToStation from ZMQ payload: expected nil, got %v", err) + } + + if retrievedPayload.RegistrationPayload.GetDecoyListGeneration() != c2API.RegistrationPayload.GetDecoyListGeneration() { + t.Fatalf("decoy list generation in retrieved ClientToStation doesn't match: expected %d, got %d", c2API.RegistrationPayload.GetDecoyListGeneration(), retrievedPayload.RegistrationPayload.GetDecoyListGeneration()) + } + + if retrievedPayload.RegistrationPayload.GetCovertAddress() != c2API.RegistrationPayload.GetCovertAddress() { + t.Fatalf("covert address in retrieved ClientToStation doesn't match: expected %s, got %s", c2API.RegistrationPayload.GetCovertAddress(), retrievedPayload.RegistrationPayload.GetCovertAddress()) + } + + if retrievedPayload.RegistrationPayload.GetV4Support() != c2API.RegistrationPayload.GetV4Support() { + t.Fatalf("v4 support in retrieved ClientToStation doesn't match: expected %v, got %v", c2API.RegistrationPayload.GetV4Support(), retrievedPayload.RegistrationPayload.GetV4Support()) + } + + if retrievedPayload.RegistrationPayload.GetV6Support() != c2API.RegistrationPayload.GetV6Support() { + t.Fatalf("v6 support in retrieved ClientToStation doesn't match: expected %v, got %v", c2API.RegistrationPayload.GetV6Support(), retrievedPayload.RegistrationPayload.GetV6Support()) + } +} + +func TestCorrectRegistration(t *testing.T) { + messageChan := make(chan []byte, 1) + accepter := func(m []byte) error { + messageChan <- m + return nil + } + + s := server{ + messageAccepter: accepter, + logger: logger, + } + + _, body := generateClientToAPIPayload() + r := httptest.NewRequest("POST", "/register", bytes.NewReader(body)) + w := httptest.NewRecorder() + + s.register(w, r) + + select { + case <-messageChan: + // We already tested the payload generation above, so here we're just confirming it arrives + case <-time.After(100 * time.Millisecond): + t.Fatalf("timed out waiting for message from endpoint") + } + + if w.Code != http.StatusNoContent { + t.Fatalf("response code mismatch: expected %d, got %d", http.StatusNoContent, w.Code) + } +} + +func TestIncorrectMethod(t *testing.T) { + s := server{ + messageAccepter: nil, + logger: logger, + } + + r := httptest.NewRequest("GET", "/register", nil) + w := httptest.NewRecorder() + + s.register(w, r) + + if w.Code != http.StatusMethodNotAllowed { + t.Fatalf("response code mismatch: expected %d, got %d", http.StatusMethodNotAllowed, w.Code) + } +} + +func TestEmptyBody(t *testing.T) { + s := server{ + messageAccepter: nil, + logger: logger, + } + + r := httptest.NewRequest("POST", "/register", nil) + w := httptest.NewRecorder() + + s.register(w, r) + + if w.Code != http.StatusBadRequest { + t.Fatalf("response code mismatch: expected %d, got %d", http.StatusBadRequest, w.Code) + } +} + +// Simulating a situation where ZMQ isn't functioning. +func TestBadAccepter(t *testing.T) { + accepter := func(m []byte) error { + return fmt.Errorf("simulated error") + } + + s := server{ + messageAccepter: accepter, + logger: logger, + } + + _, body := generateClientToAPIPayload() + r := httptest.NewRequest("POST", "/register", bytes.NewReader(body)) + w := httptest.NewRecorder() + + s.register(w, r) + + if w.Code != http.StatusInternalServerError { + t.Fatalf("response code mismatch: expected %d, got %d", http.StatusInternalServerError, w.Code) + } +} + +// Basic benchmark of registration capacity. Note that this **does** purposely +// include a dependency on ZMQ since we'll be blocking on the library calls +// during the handler, so while it doesn't represent only our code it represents +// a realistic situation. +func BenchmarkRegistration(b *testing.B) { + sock, err := zmq.NewSocket(zmq.PUB) + if err != nil { + log.Fatalln("failed to set up ZMQ socket:", err) + } + + err = sock.Bind("tcp://*:5599") + if err != nil { + log.Fatalln("failed to bind ZMQ socket:", err) + } + + s := server{ + logger: log.New(ioutil.Discard, "", 0), + sock: sock, + } + s.messageAccepter = s.sendToZMQ + + _, body := generateClientToAPIPayload() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + r := httptest.NewRequest("POST", "/register", bytes.NewReader(body)) + w := httptest.NewRecorder() + s.register(w, r) + } +} diff --git a/registration-api/config.toml b/registration-api/config.toml new file mode 100644 index 00000000..407ed5a6 --- /dev/null +++ b/registration-api/config.toml @@ -0,0 +1,24 @@ +# The port on which to host the API +api_port = 8080 + +# The port on which to bind the ZMQ port +zmq_port = 5591 + +# The path on disk to the private key used for the ZMQ socket +privkey_path = "" + +# The type of authentication to use on the ZMQ socket. +# Can be set to "NULL" which allows all connections, or "CURVE" +# which only allows clients presenting public keys listed in +# station_pubkeys below. +auth_type = "CURVE" + +# Whether ZMQ should emit verbose logs pertaining to auth (successful connections, failed connections, etc.) +auth_verbose = true + +# The public keys used to authorize ZMQ connections in the CURVE type. +# These should be the Z85-encoded versions of the 32-byte public keys, +# giving 40-character strings. +station_pubkeys = [ + "", +] diff --git a/registration-api/main.go b/registration-api/main.go new file mode 100644 index 00000000..887d7ebe --- /dev/null +++ b/registration-api/main.go @@ -0,0 +1,168 @@ +package main + +import ( + "fmt" + "io/ioutil" + "log" + "net/http" + "os" + "sync" + + "github.com/BurntSushi/toml" + "github.com/golang/protobuf/proto" + zmq "github.com/pebbe/zmq4" + pb "github.com/refraction-networking/gotapdance/protobuf" +) + +const ( + // The length of the shared secret sent by the client in bytes. + SecretLength = 32 +) + +type config struct { + APIPort uint16 `toml:"api_port"` + ZMQPort uint16 `toml:"zmq_port"` + PrivateKeyPath string `toml:"privkey_path"` + AuthType string `toml:"auth_type"` + AuthVerbose bool `toml:"auth_verbose"` + StationPublicKeys []string `toml:"station_pubkeys"` +} + +type server struct { + sync.Mutex + config + + // Function to accept message into processing queue. Abstracted + // to allow mocking of ZMQ send flow + messageAccepter func([]byte) error + + logger *log.Logger + sock *zmq.Socket +} + +func (s *server) register(w http.ResponseWriter, r *http.Request) { + requestIP := r.RemoteAddr + if r.Header.Get("X-Forwarded-For") != "" { + requestIP = r.Header.Get("X-Forwarded-For") + } + + s.logger.Printf("received %s request from IP %v with content-length %d\n", r.Method, requestIP, r.ContentLength) + + const MinimumRequestLength = SecretLength + 1 // shared_secret + VSP + if r.Method != "POST" { + s.logger.Printf("rejecting request due to incorrect method %s\n", r.Method) + w.WriteHeader(http.StatusMethodNotAllowed) + return + } + + if r.ContentLength < MinimumRequestLength { + s.logger.Printf("rejecting request due to short content-length of %d, expecting at least %d\n", r.ContentLength, MinimumRequestLength) + http.Error(w, "Payload too small", http.StatusBadRequest) + return + } + + in, err := ioutil.ReadAll(r.Body) + if err != nil { + s.logger.Println("failed to read request body:", err) + http.Error(w, "Failed to read request body", http.StatusBadRequest) + return + } + + payload := &pb.ClientToAPI{} + if err = proto.Unmarshal(in, payload); err != nil { + s.logger.Println("failed to decode protobuf body:", err) + http.Error(w, "Failed to decode protobuf body", http.StatusBadRequest) + return + } + + s.logger.Printf("received successful registration for covert address %s\n", payload.RegistrationPayload.GetCovertAddress()) + + zmqPayload, err := generateZMQPayload(payload) + if err != nil { + s.logger.Println("failed to marshal ClientToStation into VSP:", err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + err = s.messageAccepter(zmqPayload) + if err != nil { + s.logger.Println("failed to publish registration:", err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + // We could send an HTTP response earlier to avoid waiting + // while the zmq socket is locked, but this ensures that + // a 204 truly indicates registration success. + w.WriteHeader(http.StatusNoContent) +} + +func (s *server) sendToZMQ(message []byte) error { + s.Lock() + _, err := s.sock.SendBytes(message, zmq.DONTWAIT) + s.Unlock() + + return err +} + +func generateZMQPayload(clientToAPIProto *pb.ClientToAPI) ([]byte, error) { + payload := &pb.ZMQPayload{} + + payload.SharedSecret = clientToAPIProto.Secret + payload.RegistrationPayload = clientToAPIProto.RegistrationPayload + + return proto.Marshal(payload) +} + +func main() { + var s server + s.logger = log.New(os.Stdout, "[API] ", log.Ldate|log.Lmicroseconds) + s.messageAccepter = s.sendToZMQ + + _, err := toml.DecodeFile(os.Getenv("CJ_API_CONFIG"), &s) + if err != nil { + s.logger.Fatalln("failed to load config:", err) + } + + sock, err := zmq.NewSocket(zmq.PUB) + if err != nil { + s.logger.Fatalln("failed to create zmq socket:", err) + } + + if s.AuthType == "CURVE" { + privkeyBytes, err := ioutil.ReadFile(s.PrivateKeyPath) + if err != nil { + s.logger.Fatalln("failed to get private key:", err) + } + + privkey := zmq.Z85encode(string(privkeyBytes[:32])) + + zmq.AuthSetVerbose(s.AuthVerbose) + err = zmq.AuthStart() + if err != nil { + s.logger.Fatalln("failed to start zmq auth:", err) + } + + zmq.AuthAllow("*") + zmq.AuthCurveAdd("*", s.StationPublicKeys...) + + err = sock.ServerAuthCurve("*", privkey) + if err != nil { + s.logger.Fatalln("failed to set up auth on zmq socket:", err) + } + } + + err = sock.Bind(fmt.Sprintf("tcp://*:%d", s.ZMQPort)) + if err != nil { + s.logger.Fatalln("failed to bind zmq socket:", err) + } + s.sock = sock + + s.logger.Println("bound zmq socket") + + s.logger.Printf("starting HTTP API on port %d\n", s.APIPort) + // TODO: possibly use router with more complex features? + // For now net/http does the job + http.HandleFunc("/register", s.register) + s.logger.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", s.APIPort), nil)) +} diff --git a/rust_foreign_interface.h b/rust_foreign_interface.h index 069cf885..a5128d4b 100644 --- a/rust_foreign_interface.h +++ b/rust_foreign_interface.h @@ -1,23 +1,22 @@ #ifndef _INCLGUARD_CLONERING_RUST_INTERFACE_H_ #define _INCLGUARD_CLONERING_RUST_INTERFACE_H_ -struct RustGlobalsStruct -{ - void* global; +struct RustGlobalsStruct { + void *global; }; -// We specifically name this something different to avoid accidentally linking against -// the otherwise compatible rust_tapdance -struct RustGlobalsStruct rust_detect_init(int32_t cur_lcore_id, uint8_t* station_key); -uint8_t rust_update_cli_conf(void* conf_ptr); -uint8_t rust_process_packet(void* rust_global, void* c_raw_ethframe, - size_t c_frame_len); -uint8_t rust_event_loop_tick(void* rust_global); -//uint8_t rust_update_overloaded_decoys(void* rust_global); -uint8_t rust_periodic_report(void* rust_global); -uint8_t rust_periodic_cleanup(void* rust_global); +// We specifically name this something different to avoid accidentally linking +// against the otherwise compatible rust_tapdance +struct RustGlobalsStruct rust_detect_init( + int32_t cur_lcore_id, uint8_t *station_key, char *workers_socket_addr); +uint8_t rust_update_cli_conf(void *conf_ptr); +uint8_t rust_process_packet( + void *rust_global, void *c_raw_ethframe, size_t c_frame_len); +uint8_t rust_event_loop_tick(void *rust_global); +// uint8_t rust_update_overloaded_decoys(void* rust_global); +uint8_t rust_periodic_report(void *rust_global); +uint8_t rust_periodic_cleanup(void *rust_global); int send_packet_to_proxy(uint8_t id, uint8_t *pkt, size_t len); #endif //_INCLGUARD_CLONERING_RUST_INTERFACE_H_ - diff --git a/src/elligator.rs b/src/elligator.rs index 1c5870bc..e01b4642 100644 --- a/src/elligator.rs +++ b/src/elligator.rs @@ -9,6 +9,8 @@ use util::{HKDFKeys, FSP}; use elligator::crypto::aes_gcm::AesGcm; use elligator::crypto::aead::AeadDecryptor; use elligator::crypto::aes; +use signalling::ClientToStation; +use protobuf::parse_from_bytes; //pub mod rust_tapdance; @@ -40,7 +42,7 @@ fn extract_stego_bytes(in_buf: &[u8], out_buf: &mut [u8]) // Returns either (Shared Secret, Fixed Size Payload, Variable Size Payload) or Box // Boxed error becuase size of return isn't known at compile time -pub fn extract_payloads(secret_key: &[u8], tls_record: &[u8]) -> (Result<([u8; 32], [u8; FSP::LENGTH], Vec), Box>) +pub fn extract_payloads(secret_key: &[u8], tls_record: &[u8]) -> (Result<([u8; 32], [u8; FSP::LENGTH], ClientToStation), Box>) { if tls_record.len() < 112 // (conservatively) smaller than minimum request { @@ -142,7 +144,11 @@ pub fn extract_payloads(secret_key: &[u8], tls_record: &[u8]) -> (Result<([u8; 3 return Err(err); } - Ok((shared_secret, fixed_size_payload.to_bytes(), variable_size_payload.to_vec())) + let c2s = match protobuf::parse_from_bytes::(&variable_size_payload) { + Ok(c2s) => c2s, + Err(err) => return Err(Box::new(err)), + }; + Ok((shared_secret, fixed_size_payload.to_bytes(), c2s)) }); match result { Ok(res) => return res, diff --git a/src/lib.rs b/src/lib.rs index 60f5f6f9..d2fe4363 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,6 +26,9 @@ use std::io::BufReader; use std::io::BufRead; use std::fs::File; +use std::ffi::CStr; +use std::os::raw::c_char; + use tuntap::{IFF_TUN,TunTap}; // Must go before all other modules so that the report! macro will be visible. @@ -105,7 +108,7 @@ const IP_LIST_PATH: &'static str = "/var/lib/dark-decoy.prefixes"; impl PerCoreGlobal { - fn new(priv_key: [u8; 32], the_lcore: i32) -> PerCoreGlobal + fn new(priv_key: [u8; 32], the_lcore: i32, workers_socket_addr: &str) -> PerCoreGlobal { let mut tun = TunTap::new(IFF_TUN, &format!("tun{}", the_lcore)).unwrap(); @@ -114,7 +117,7 @@ impl PerCoreGlobal // Setup ZMQ let zmq_ctx = zmq::Context::new(); let zmq_sock = zmq_ctx.socket(zmq::PUB).unwrap(); - zmq_sock.connect("tcp://localhost:5591").expect("failed connecting to ZMQ"); + zmq_sock.connect(workers_socket_addr).expect("failed connecting to ZMQ"); PerCoreGlobal { priv_key: priv_key, @@ -252,7 +255,7 @@ pub struct RustGlobalsStruct } #[no_mangle] -pub extern "C" fn rust_detect_init(lcore_id: i32, ckey: *const u8) +pub extern "C" fn rust_detect_init(lcore_id: i32, ckey: *const u8, workers_socket_addr: *const c_char) -> RustGlobalsStruct { @@ -265,7 +268,9 @@ pub extern "C" fn rust_detect_init(lcore_id: i32, ckey: *const u8) c_api::c_open_reporter(s); report!("reset"); - let mut global = PerCoreGlobal::new(key, lcore_id); + let addr: &CStr = unsafe { CStr::from_ptr(workers_socket_addr) }; + + let mut global = PerCoreGlobal::new(key, lcore_id, addr.to_str().unwrap()); global.read_ip_list(); debug!("Initialized rust core {}", lcore_id); diff --git a/src/process_packet.rs b/src/process_packet.rs index 1ef6cc02..18524fe7 100644 --- a/src/process_packet.rs +++ b/src/process_packet.rs @@ -19,8 +19,8 @@ use dd_selector::DDIpSelector; use PerCoreGlobal; use util::{IpPacket, FSP}; use elligator; -use protobuf; -use signalling::ClientToStation; +use protobuf::{Message, SingularPtrField}; +use signalling::{ClientToStation, ZMQPayload}; const TLS_TYPE_APPLICATION_DATA: u8 = 0x17; @@ -275,22 +275,25 @@ impl PerCoreGlobal // res.2 => variable size payload (c2s) // form message for zmq - let mut zmq_msg: Vec = Vec::new(); + let mut zmq_msg = ZMQPayload::new(); let mut shared_secret = res.0.to_vec(); - zmq_msg.append(&mut shared_secret); + let mut vsp = res.2; + zmq_msg.set_shared_secret(shared_secret); + zmq_msg.registration_payload = SingularPtrField::some(vsp); - let mut fsp = res.1.to_vec(); - zmq_msg.append(&mut fsp); - - // VSP --> ClientToStation - let mut vsp = res.2.to_vec(); - zmq_msg.append(&mut vsp); - let repr_str = hex::encode(res.0); debug!("New registration {}, {}", flow, repr_str); - match self.zmq_sock.send(&zmq_msg, 0){ + let zmq_payload = match zmq_msg.write_to_bytes() { + Ok(b) => b, + Err(e) => { + warn!("Failed to generate ZMQ payload: {}", e); + return false + }, + }; + + match self.zmq_sock.send(&zmq_payload, 0){ Ok(_)=> return true, Err(e) => { warn!("Failed to send registration information over ZMQ: {}", e); diff --git a/src/signalling.rs b/src/signalling.rs index 31bde054..4ec22b3c 100644 --- a/src/signalling.rs +++ b/src/signalling.rs @@ -1,11 +1,12 @@ -// This file is generated by rust-protobuf 2.6.2. Do not edit +// This file is generated by rust-protobuf 2.16.2. Do not edit // @generated -// https://github.com/Manishearth/rust-clippy/issues/702 +// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] -#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_attributes)] +#![rustfmt::skip] #![allow(box_pointers)] #![allow(dead_code)] @@ -14,12 +15,13 @@ #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] -#![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `signalling.proto` -use protobuf::Message as Message_imported_for_functions; -use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_16_2; #[derive(PartialEq,Clone,Default)] pub struct PubKey { @@ -103,7 +105,7 @@ impl ::protobuf::Message for PubKey { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -136,12 +138,12 @@ impl ::protobuf::Message for PubKey { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.key.as_ref() { os.write_bytes(1, &v)?; } if let Some(v) = self.field_type { - os.write_enum(2, v.value())?; + os.write_enum(2, ::protobuf::ProtobufEnum::value(&v))?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) @@ -159,13 +161,13 @@ impl ::protobuf::Message for PubKey { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -178,40 +180,30 @@ impl ::protobuf::Message for PubKey { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "key", - |m: &PubKey| { &m.key }, - |m: &mut PubKey| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "type", - |m: &PubKey| { &m.field_type }, - |m: &mut PubKey| { &mut m.field_type }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "PubKey", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "key", + |m: &PubKey| { &m.key }, + |m: &mut PubKey| { &mut m.key }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "type", + |m: &PubKey| { &m.field_type }, + |m: &mut PubKey| { &mut m.field_type }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "PubKey", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static PubKey { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const PubKey, - }; - unsafe { - instance.get(PubKey::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PubKey::new) } } @@ -224,14 +216,14 @@ impl ::protobuf::Clear for PubKey { } impl ::std::fmt::Debug for PubKey { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for PubKey { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -241,7 +233,7 @@ pub struct TLSDecoySpec { hostname: ::protobuf::SingularField<::std::string::String>, ipv4addr: ::std::option::Option, ipv6addr: ::protobuf::SingularField<::std::vec::Vec>, - pubkey: ::protobuf::SingularPtrField, + pub pubkey: ::protobuf::SingularPtrField, timeout: ::std::option::Option, tcpwin: ::std::option::Option, // special fields @@ -355,7 +347,7 @@ impl TLSDecoySpec { pub fn get_pubkey(&self) -> &PubKey { - self.pubkey.as_ref().unwrap_or_else(|| PubKey::default_instance()) + self.pubkey.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_pubkey(&mut self) { self.pubkey.clear(); @@ -433,7 +425,7 @@ impl ::protobuf::Message for TLSDecoySpec { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -503,7 +495,7 @@ impl ::protobuf::Message for TLSDecoySpec { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.hostname.as_ref() { os.write_string(1, &v)?; } @@ -540,13 +532,13 @@ impl ::protobuf::Message for TLSDecoySpec { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -559,60 +551,50 @@ impl ::protobuf::Message for TLSDecoySpec { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "hostname", - |m: &TLSDecoySpec| { &m.hostname }, - |m: &mut TLSDecoySpec| { &mut m.hostname }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFixed32>( - "ipv4addr", - |m: &TLSDecoySpec| { &m.ipv4addr }, - |m: &mut TLSDecoySpec| { &mut m.ipv4addr }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "ipv6addr", - |m: &TLSDecoySpec| { &m.ipv6addr }, - |m: &mut TLSDecoySpec| { &mut m.ipv6addr }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pubkey", - |m: &TLSDecoySpec| { &m.pubkey }, - |m: &mut TLSDecoySpec| { &mut m.pubkey }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "timeout", - |m: &TLSDecoySpec| { &m.timeout }, - |m: &mut TLSDecoySpec| { &mut m.timeout }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tcpwin", - |m: &TLSDecoySpec| { &m.tcpwin }, - |m: &mut TLSDecoySpec| { &mut m.tcpwin }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "TLSDecoySpec", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "hostname", + |m: &TLSDecoySpec| { &m.hostname }, + |m: &mut TLSDecoySpec| { &mut m.hostname }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFixed32>( + "ipv4addr", + |m: &TLSDecoySpec| { &m.ipv4addr }, + |m: &mut TLSDecoySpec| { &mut m.ipv4addr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "ipv6addr", + |m: &TLSDecoySpec| { &m.ipv6addr }, + |m: &mut TLSDecoySpec| { &mut m.ipv6addr }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "pubkey", + |m: &TLSDecoySpec| { &m.pubkey }, + |m: &mut TLSDecoySpec| { &mut m.pubkey }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "timeout", + |m: &TLSDecoySpec| { &m.timeout }, + |m: &mut TLSDecoySpec| { &mut m.timeout }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tcpwin", + |m: &TLSDecoySpec| { &m.tcpwin }, + |m: &mut TLSDecoySpec| { &mut m.tcpwin }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "TLSDecoySpec", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static TLSDecoySpec { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const TLSDecoySpec, - }; - unsafe { - instance.get(TLSDecoySpec::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(TLSDecoySpec::new) } } @@ -629,24 +611,25 @@ impl ::protobuf::Clear for TLSDecoySpec { } impl ::std::fmt::Debug for TLSDecoySpec { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for TLSDecoySpec { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct ClientConf { // message fields - decoy_list: ::protobuf::SingularPtrField, + pub decoy_list: ::protobuf::SingularPtrField, generation: ::std::option::Option, - default_pubkey: ::protobuf::SingularPtrField, - dark_decoy_blocks: ::protobuf::SingularPtrField, + pub default_pubkey: ::protobuf::SingularPtrField, + pub dark_decoy_blocks: ::protobuf::SingularPtrField, + pub conjure_pubkey: ::protobuf::SingularPtrField, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, @@ -667,7 +650,7 @@ impl ClientConf { pub fn get_decoy_list(&self) -> &DecoyList { - self.decoy_list.as_ref().unwrap_or_else(|| DecoyList::default_instance()) + self.decoy_list.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_decoy_list(&mut self) { self.decoy_list.clear(); @@ -719,7 +702,7 @@ impl ClientConf { pub fn get_default_pubkey(&self) -> &PubKey { - self.default_pubkey.as_ref().unwrap_or_else(|| PubKey::default_instance()) + self.default_pubkey.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_default_pubkey(&mut self) { self.default_pubkey.clear(); @@ -752,7 +735,7 @@ impl ClientConf { pub fn get_dark_decoy_blocks(&self) -> &DarkDecoyBlocks { - self.dark_decoy_blocks.as_ref().unwrap_or_else(|| DarkDecoyBlocks::default_instance()) + self.dark_decoy_blocks.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_dark_decoy_blocks(&mut self) { self.dark_decoy_blocks.clear(); @@ -780,6 +763,39 @@ impl ClientConf { pub fn take_dark_decoy_blocks(&mut self) -> DarkDecoyBlocks { self.dark_decoy_blocks.take().unwrap_or_else(|| DarkDecoyBlocks::new()) } + + // optional .tapdance.PubKey conjure_pubkey = 5; + + + pub fn get_conjure_pubkey(&self) -> &PubKey { + self.conjure_pubkey.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_conjure_pubkey(&mut self) { + self.conjure_pubkey.clear(); + } + + pub fn has_conjure_pubkey(&self) -> bool { + self.conjure_pubkey.is_some() + } + + // Param is passed by value, moved + pub fn set_conjure_pubkey(&mut self, v: PubKey) { + self.conjure_pubkey = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_conjure_pubkey(&mut self) -> &mut PubKey { + if self.conjure_pubkey.is_none() { + self.conjure_pubkey.set_default(); + } + self.conjure_pubkey.as_mut().unwrap() + } + + // Take field + pub fn take_conjure_pubkey(&mut self) -> PubKey { + self.conjure_pubkey.take().unwrap_or_else(|| PubKey::new()) + } } impl ::protobuf::Message for ClientConf { @@ -799,10 +815,15 @@ impl ::protobuf::Message for ClientConf { return false; } }; + for v in &self.conjure_pubkey { + if !v.is_initialized() { + return false; + } + }; true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -822,6 +843,9 @@ impl ::protobuf::Message for ClientConf { 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.dark_decoy_blocks)?; }, + 5 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.conjure_pubkey)?; + }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, @@ -849,12 +873,16 @@ impl ::protobuf::Message for ClientConf { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } + if let Some(ref v) = self.conjure_pubkey.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.decoy_list.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -873,6 +901,11 @@ impl ::protobuf::Message for ClientConf { os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; } + if let Some(ref v) = self.conjure_pubkey.as_ref() { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -889,13 +922,13 @@ impl ::protobuf::Message for ClientConf { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -908,50 +941,45 @@ impl ::protobuf::Message for ClientConf { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "decoy_list", - |m: &ClientConf| { &m.decoy_list }, - |m: &mut ClientConf| { &mut m.decoy_list }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "generation", - |m: &ClientConf| { &m.generation }, - |m: &mut ClientConf| { &mut m.generation }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "default_pubkey", - |m: &ClientConf| { &m.default_pubkey }, - |m: &mut ClientConf| { &mut m.default_pubkey }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "dark_decoy_blocks", - |m: &ClientConf| { &m.dark_decoy_blocks }, - |m: &mut ClientConf| { &mut m.dark_decoy_blocks }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ClientConf", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "decoy_list", + |m: &ClientConf| { &m.decoy_list }, + |m: &mut ClientConf| { &mut m.decoy_list }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "generation", + |m: &ClientConf| { &m.generation }, + |m: &mut ClientConf| { &mut m.generation }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "default_pubkey", + |m: &ClientConf| { &m.default_pubkey }, + |m: &mut ClientConf| { &mut m.default_pubkey }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "dark_decoy_blocks", + |m: &ClientConf| { &m.dark_decoy_blocks }, + |m: &mut ClientConf| { &mut m.dark_decoy_blocks }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "conjure_pubkey", + |m: &ClientConf| { &m.conjure_pubkey }, + |m: &mut ClientConf| { &mut m.conjure_pubkey }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ClientConf", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ClientConf { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ClientConf, - }; - unsafe { - instance.get(ClientConf::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ClientConf::new) } } @@ -961,26 +989,27 @@ impl ::protobuf::Clear for ClientConf { self.generation = ::std::option::Option::None; self.default_pubkey.clear(); self.dark_decoy_blocks.clear(); + self.conjure_pubkey.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for ClientConf { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ClientConf { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct DecoyList { // message fields - tls_decoys: ::protobuf::RepeatedField, + pub tls_decoys: ::protobuf::RepeatedField, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, @@ -1033,7 +1062,7 @@ impl ::protobuf::Message for DecoyList { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1061,7 +1090,7 @@ impl ::protobuf::Message for DecoyList { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { for v in &self.tls_decoys { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1083,13 +1112,13 @@ impl ::protobuf::Message for DecoyList { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -1102,35 +1131,25 @@ impl ::protobuf::Message for DecoyList { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "tls_decoys", - |m: &DecoyList| { &m.tls_decoys }, - |m: &mut DecoyList| { &mut m.tls_decoys }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "DecoyList", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "tls_decoys", + |m: &DecoyList| { &m.tls_decoys }, + |m: &mut DecoyList| { &mut m.tls_decoys }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "DecoyList", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static DecoyList { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const DecoyList, - }; - unsafe { - instance.get(DecoyList::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(DecoyList::new) } } @@ -1142,21 +1161,21 @@ impl ::protobuf::Clear for DecoyList { } impl ::std::fmt::Debug for DecoyList { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DecoyList { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct DarkDecoyBlocks { // message fields - blocks: ::protobuf::RepeatedField<::std::string::String>, + pub blocks: ::protobuf::RepeatedField<::std::string::String>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, @@ -1204,7 +1223,7 @@ impl ::protobuf::Message for DarkDecoyBlocks { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1231,7 +1250,7 @@ impl ::protobuf::Message for DarkDecoyBlocks { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { for v in &self.blocks { os.write_string(1, &v)?; }; @@ -1251,13 +1270,13 @@ impl ::protobuf::Message for DarkDecoyBlocks { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -1270,35 +1289,25 @@ impl ::protobuf::Message for DarkDecoyBlocks { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "blocks", - |m: &DarkDecoyBlocks| { &m.blocks }, - |m: &mut DarkDecoyBlocks| { &mut m.blocks }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "DarkDecoyBlocks", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "blocks", + |m: &DarkDecoyBlocks| { &m.blocks }, + |m: &mut DarkDecoyBlocks| { &mut m.blocks }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "DarkDecoyBlocks", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static DarkDecoyBlocks { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const DarkDecoyBlocks, - }; - unsafe { - instance.get(DarkDecoyBlocks::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(DarkDecoyBlocks::new) } } @@ -1310,14 +1319,14 @@ impl ::protobuf::Clear for DarkDecoyBlocks { } impl ::std::fmt::Debug for DarkDecoyBlocks { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DarkDecoyBlocks { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -1326,7 +1335,7 @@ pub struct StationToClient { // message fields protocol_version: ::std::option::Option, state_transition: ::std::option::Option, - config_info: ::protobuf::SingularPtrField, + pub config_info: ::protobuf::SingularPtrField, err_reason: ::std::option::Option, tmp_backoff: ::std::option::Option, station_id: ::protobuf::SingularField<::std::string::String>, @@ -1389,7 +1398,7 @@ impl StationToClient { pub fn get_config_info(&self) -> &ClientConf { - self.config_info.as_ref().unwrap_or_else(|| ClientConf::default_instance()) + self.config_info.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_config_info(&mut self) { self.config_info.clear(); @@ -1539,7 +1548,7 @@ impl ::protobuf::Message for StationToClient { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1611,12 +1620,12 @@ impl ::protobuf::Message for StationToClient { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.protocol_version { os.write_uint32(1, v)?; } if let Some(v) = self.state_transition { - os.write_enum(2, v.value())?; + os.write_enum(2, ::protobuf::ProtobufEnum::value(&v))?; } if let Some(ref v) = self.config_info.as_ref() { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; @@ -1624,7 +1633,7 @@ impl ::protobuf::Message for StationToClient { v.write_to_with_cached_sizes(os)?; } if let Some(v) = self.err_reason { - os.write_enum(4, v.value())?; + os.write_enum(4, ::protobuf::ProtobufEnum::value(&v))?; } if let Some(v) = self.tmp_backoff { os.write_uint32(5, v)?; @@ -1651,13 +1660,13 @@ impl ::protobuf::Message for StationToClient { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -1670,65 +1679,55 @@ impl ::protobuf::Message for StationToClient { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "protocol_version", - |m: &StationToClient| { &m.protocol_version }, - |m: &mut StationToClient| { &mut m.protocol_version }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "state_transition", - |m: &StationToClient| { &m.state_transition }, - |m: &mut StationToClient| { &mut m.state_transition }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "config_info", - |m: &StationToClient| { &m.config_info }, - |m: &mut StationToClient| { &mut m.config_info }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err_reason", - |m: &StationToClient| { &m.err_reason }, - |m: &mut StationToClient| { &mut m.err_reason }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tmp_backoff", - |m: &StationToClient| { &m.tmp_backoff }, - |m: &mut StationToClient| { &mut m.tmp_backoff }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "station_id", - |m: &StationToClient| { &m.station_id }, - |m: &mut StationToClient| { &mut m.station_id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "padding", - |m: &StationToClient| { &m.padding }, - |m: &mut StationToClient| { &mut m.padding }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "StationToClient", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "protocol_version", + |m: &StationToClient| { &m.protocol_version }, + |m: &mut StationToClient| { &mut m.protocol_version }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "state_transition", + |m: &StationToClient| { &m.state_transition }, + |m: &mut StationToClient| { &mut m.state_transition }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "config_info", + |m: &StationToClient| { &m.config_info }, + |m: &mut StationToClient| { &mut m.config_info }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "err_reason", + |m: &StationToClient| { &m.err_reason }, + |m: &mut StationToClient| { &mut m.err_reason }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tmp_backoff", + |m: &StationToClient| { &m.tmp_backoff }, + |m: &mut StationToClient| { &mut m.tmp_backoff }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "station_id", + |m: &StationToClient| { &m.station_id }, + |m: &mut StationToClient| { &mut m.station_id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "padding", + |m: &StationToClient| { &m.padding }, + |m: &mut StationToClient| { &mut m.padding }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "StationToClient", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static StationToClient { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const StationToClient, - }; - unsafe { - instance.get(StationToClient::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StationToClient::new) } } @@ -1746,14 +1745,287 @@ impl ::protobuf::Clear for StationToClient { } impl ::std::fmt::Debug for StationToClient { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for StationToClient { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct RegistrationFlags { + // message fields + upload_only: ::std::option::Option, + dark_decoy: ::std::option::Option, + proxy_header: ::std::option::Option, + use_TIL: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RegistrationFlags { + fn default() -> &'a RegistrationFlags { + ::default_instance() + } +} + +impl RegistrationFlags { + pub fn new() -> RegistrationFlags { + ::std::default::Default::default() + } + + // optional bool upload_only = 1; + + + pub fn get_upload_only(&self) -> bool { + self.upload_only.unwrap_or(false) + } + pub fn clear_upload_only(&mut self) { + self.upload_only = ::std::option::Option::None; + } + + pub fn has_upload_only(&self) -> bool { + self.upload_only.is_some() + } + + // Param is passed by value, moved + pub fn set_upload_only(&mut self, v: bool) { + self.upload_only = ::std::option::Option::Some(v); + } + + // optional bool dark_decoy = 2; + + + pub fn get_dark_decoy(&self) -> bool { + self.dark_decoy.unwrap_or(false) + } + pub fn clear_dark_decoy(&mut self) { + self.dark_decoy = ::std::option::Option::None; + } + + pub fn has_dark_decoy(&self) -> bool { + self.dark_decoy.is_some() + } + + // Param is passed by value, moved + pub fn set_dark_decoy(&mut self, v: bool) { + self.dark_decoy = ::std::option::Option::Some(v); + } + + // optional bool proxy_header = 3; + + + pub fn get_proxy_header(&self) -> bool { + self.proxy_header.unwrap_or(false) + } + pub fn clear_proxy_header(&mut self) { + self.proxy_header = ::std::option::Option::None; + } + + pub fn has_proxy_header(&self) -> bool { + self.proxy_header.is_some() + } + + // Param is passed by value, moved + pub fn set_proxy_header(&mut self, v: bool) { + self.proxy_header = ::std::option::Option::Some(v); + } + + // optional bool use_TIL = 4; + + + pub fn get_use_TIL(&self) -> bool { + self.use_TIL.unwrap_or(false) + } + pub fn clear_use_TIL(&mut self) { + self.use_TIL = ::std::option::Option::None; + } + + pub fn has_use_TIL(&self) -> bool { + self.use_TIL.is_some() + } + + // Param is passed by value, moved + pub fn set_use_TIL(&mut self, v: bool) { + self.use_TIL = ::std::option::Option::Some(v); + } +} + +impl ::protobuf::Message for RegistrationFlags { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.upload_only = ::std::option::Option::Some(tmp); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.dark_decoy = ::std::option::Option::Some(tmp); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.proxy_header = ::std::option::Option::Some(tmp); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.use_TIL = ::std::option::Option::Some(tmp); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(v) = self.upload_only { + my_size += 2; + } + if let Some(v) = self.dark_decoy { + my_size += 2; + } + if let Some(v) = self.proxy_header { + my_size += 2; + } + if let Some(v) = self.use_TIL { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(v) = self.upload_only { + os.write_bool(1, v)?; + } + if let Some(v) = self.dark_decoy { + os.write_bool(2, v)?; + } + if let Some(v) = self.proxy_header { + os.write_bool(3, v)?; + } + if let Some(v) = self.use_TIL { + os.write_bool(4, v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RegistrationFlags { + RegistrationFlags::new() + } + + fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "upload_only", + |m: &RegistrationFlags| { &m.upload_only }, + |m: &mut RegistrationFlags| { &mut m.upload_only }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "dark_decoy", + |m: &RegistrationFlags| { &m.dark_decoy }, + |m: &mut RegistrationFlags| { &mut m.dark_decoy }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "proxy_header", + |m: &RegistrationFlags| { &m.proxy_header }, + |m: &mut RegistrationFlags| { &mut m.proxy_header }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "use_TIL", + |m: &RegistrationFlags| { &m.use_TIL }, + |m: &mut RegistrationFlags| { &mut m.use_TIL }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RegistrationFlags", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static RegistrationFlags { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RegistrationFlags::new) + } +} + +impl ::protobuf::Clear for RegistrationFlags { + fn clear(&mut self) { + self.upload_only = ::std::option::Option::None; + self.dark_decoy = ::std::option::Option::None; + self.proxy_header = ::std::option::Option::None; + self.use_TIL = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for RegistrationFlags { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for RegistrationFlags { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -1764,13 +2036,14 @@ pub struct ClientToStation { decoy_list_generation: ::std::option::Option, state_transition: ::std::option::Option, upload_sync: ::std::option::Option, - failed_decoys: ::protobuf::RepeatedField<::std::string::String>, - stats: ::protobuf::SingularPtrField, + pub failed_decoys: ::protobuf::RepeatedField<::std::string::String>, + pub stats: ::protobuf::SingularPtrField, + transport: ::std::option::Option, covert_address: ::protobuf::SingularField<::std::string::String>, masked_decoy_server_name: ::protobuf::SingularField<::std::string::String>, v6_support: ::std::option::Option, v4_support: ::std::option::Option, - c2s_transport: ::std::option::Option, + pub flags: ::protobuf::SingularPtrField, padding: ::protobuf::SingularField<::std::vec::Vec>, // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -1893,7 +2166,7 @@ impl ClientToStation { pub fn get_stats(&self) -> &SessionStats { - self.stats.as_ref().unwrap_or_else(|| SessionStats::default_instance()) + self.stats.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_stats(&mut self) { self.stats.clear(); @@ -1922,6 +2195,25 @@ impl ClientToStation { self.stats.take().unwrap_or_else(|| SessionStats::new()) } + // optional .tapdance.TransportType transport = 12; + + + pub fn get_transport(&self) -> TransportType { + self.transport.unwrap_or(TransportType::NullTransport) + } + pub fn clear_transport(&mut self) { + self.transport = ::std::option::Option::None; + } + + pub fn has_transport(&self) -> bool { + self.transport.is_some() + } + + // Param is passed by value, moved + pub fn set_transport(&mut self, v: TransportType) { + self.transport = ::std::option::Option::Some(v); + } + // optional string covert_address = 20; @@ -2032,23 +2324,37 @@ impl ClientToStation { self.v4_support = ::std::option::Option::Some(v); } - // optional uint32 c2s_transport = 24; + // optional .tapdance.RegistrationFlags flags = 24; - pub fn get_c2s_transport(&self) -> u32 { - self.c2s_transport.unwrap_or(0) + pub fn get_flags(&self) -> &RegistrationFlags { + self.flags.as_ref().unwrap_or_else(|| ::default_instance()) } - pub fn clear_c2s_transport(&mut self) { - self.c2s_transport = ::std::option::Option::None; + pub fn clear_flags(&mut self) { + self.flags.clear(); } - pub fn has_c2s_transport(&self) -> bool { - self.c2s_transport.is_some() + pub fn has_flags(&self) -> bool { + self.flags.is_some() } // Param is passed by value, moved - pub fn set_c2s_transport(&mut self, v: u32) { - self.c2s_transport = ::std::option::Option::Some(v); + pub fn set_flags(&mut self, v: RegistrationFlags) { + self.flags = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_flags(&mut self) -> &mut RegistrationFlags { + if self.flags.is_none() { + self.flags.set_default(); + } + self.flags.as_mut().unwrap() + } + + // Take field + pub fn take_flags(&mut self) -> RegistrationFlags { + self.flags.take().unwrap_or_else(|| RegistrationFlags::new()) } // optional bytes padding = 100; @@ -2095,10 +2401,15 @@ impl ::protobuf::Message for ClientToStation { return false; } }; + for v in &self.flags { + if !v.is_initialized() { + return false; + } + }; true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2132,6 +2443,9 @@ impl ::protobuf::Message for ClientToStation { 11 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.stats)?; }, + 12 => { + ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.transport, 12, &mut self.unknown_fields)? + }, 20 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.covert_address)?; }, @@ -2153,11 +2467,7 @@ impl ::protobuf::Message for ClientToStation { self.v4_support = ::std::option::Option::Some(tmp); }, 24 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.c2s_transport = ::std::option::Option::Some(tmp); + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.flags)?; }, 100 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?; @@ -2193,6 +2503,9 @@ impl ::protobuf::Message for ClientToStation { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } + if let Some(v) = self.transport { + my_size += ::protobuf::rt::enum_size(12, v); + } if let Some(ref v) = self.covert_address.as_ref() { my_size += ::protobuf::rt::string_size(20, &v); } @@ -2205,8 +2518,9 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.v4_support { my_size += 3; } - if let Some(v) = self.c2s_transport { - my_size += ::protobuf::rt::value_size(24, v, ::protobuf::wire_format::WireTypeVarint); + if let Some(ref v) = self.flags.as_ref() { + let len = v.compute_size(); + my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } if let Some(ref v) = self.padding.as_ref() { my_size += ::protobuf::rt::bytes_size(100, &v); @@ -2216,7 +2530,7 @@ impl ::protobuf::Message for ClientToStation { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.protocol_version { os.write_uint32(1, v)?; } @@ -2224,7 +2538,7 @@ impl ::protobuf::Message for ClientToStation { os.write_uint32(2, v)?; } if let Some(v) = self.state_transition { - os.write_enum(3, v.value())?; + os.write_enum(3, ::protobuf::ProtobufEnum::value(&v))?; } if let Some(v) = self.upload_sync { os.write_uint64(4, v)?; @@ -2237,6 +2551,9 @@ impl ::protobuf::Message for ClientToStation { os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; } + if let Some(v) = self.transport { + os.write_enum(12, ::protobuf::ProtobufEnum::value(&v))?; + } if let Some(ref v) = self.covert_address.as_ref() { os.write_string(20, &v)?; } @@ -2249,8 +2566,10 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.v4_support { os.write_bool(23, v)?; } - if let Some(v) = self.c2s_transport { - os.write_uint32(24, v)?; + if let Some(ref v) = self.flags.as_ref() { + os.write_tag(24, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; } if let Some(ref v) = self.padding.as_ref() { os.write_bytes(100, &v)?; @@ -2271,13 +2590,13 @@ impl ::protobuf::Message for ClientToStation { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -2290,90 +2609,85 @@ impl ::protobuf::Message for ClientToStation { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "protocol_version", - |m: &ClientToStation| { &m.protocol_version }, - |m: &mut ClientToStation| { &mut m.protocol_version }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "decoy_list_generation", - |m: &ClientToStation| { &m.decoy_list_generation }, - |m: &mut ClientToStation| { &mut m.decoy_list_generation }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "state_transition", - |m: &ClientToStation| { &m.state_transition }, - |m: &mut ClientToStation| { &mut m.state_transition }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "upload_sync", - |m: &ClientToStation| { &m.upload_sync }, - |m: &mut ClientToStation| { &mut m.upload_sync }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "failed_decoys", - |m: &ClientToStation| { &m.failed_decoys }, - |m: &mut ClientToStation| { &mut m.failed_decoys }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "stats", - |m: &ClientToStation| { &m.stats }, - |m: &mut ClientToStation| { &mut m.stats }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "covert_address", - |m: &ClientToStation| { &m.covert_address }, - |m: &mut ClientToStation| { &mut m.covert_address }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "masked_decoy_server_name", - |m: &ClientToStation| { &m.masked_decoy_server_name }, - |m: &mut ClientToStation| { &mut m.masked_decoy_server_name }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "v6_support", - |m: &ClientToStation| { &m.v6_support }, - |m: &mut ClientToStation| { &mut m.v6_support }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "v4_support", - |m: &ClientToStation| { &m.v4_support }, - |m: &mut ClientToStation| { &mut m.v4_support }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "c2s_transport", - |m: &ClientToStation| { &m.c2s_transport }, - |m: &mut ClientToStation| { &mut m.c2s_transport }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "padding", - |m: &ClientToStation| { &m.padding }, - |m: &mut ClientToStation| { &mut m.padding }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ClientToStation", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "protocol_version", + |m: &ClientToStation| { &m.protocol_version }, + |m: &mut ClientToStation| { &mut m.protocol_version }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "decoy_list_generation", + |m: &ClientToStation| { &m.decoy_list_generation }, + |m: &mut ClientToStation| { &mut m.decoy_list_generation }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "state_transition", + |m: &ClientToStation| { &m.state_transition }, + |m: &mut ClientToStation| { &mut m.state_transition }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "upload_sync", + |m: &ClientToStation| { &m.upload_sync }, + |m: &mut ClientToStation| { &mut m.upload_sync }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "failed_decoys", + |m: &ClientToStation| { &m.failed_decoys }, + |m: &mut ClientToStation| { &mut m.failed_decoys }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "stats", + |m: &ClientToStation| { &m.stats }, + |m: &mut ClientToStation| { &mut m.stats }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "transport", + |m: &ClientToStation| { &m.transport }, + |m: &mut ClientToStation| { &mut m.transport }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "covert_address", + |m: &ClientToStation| { &m.covert_address }, + |m: &mut ClientToStation| { &mut m.covert_address }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "masked_decoy_server_name", + |m: &ClientToStation| { &m.masked_decoy_server_name }, + |m: &mut ClientToStation| { &mut m.masked_decoy_server_name }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "v6_support", + |m: &ClientToStation| { &m.v6_support }, + |m: &mut ClientToStation| { &mut m.v6_support }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "v4_support", + |m: &ClientToStation| { &m.v4_support }, + |m: &mut ClientToStation| { &mut m.v4_support }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "flags", + |m: &ClientToStation| { &m.flags }, + |m: &mut ClientToStation| { &mut m.flags }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "padding", + |m: &ClientToStation| { &m.padding }, + |m: &mut ClientToStation| { &mut m.padding }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ClientToStation", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ClientToStation { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ClientToStation, - }; - unsafe { - instance.get(ClientToStation::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ClientToStation::new) } } @@ -2385,33 +2699,486 @@ impl ::protobuf::Clear for ClientToStation { self.upload_sync = ::std::option::Option::None; self.failed_decoys.clear(); self.stats.clear(); + self.transport = ::std::option::Option::None; self.covert_address.clear(); self.masked_decoy_server_name.clear(); self.v6_support = ::std::option::Option::None; self.v4_support = ::std::option::Option::None; - self.c2s_transport = ::std::option::Option::None; + self.flags.clear(); self.padding.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for ClientToStation { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ClientToStation { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] -pub struct SessionStats { +pub struct ClientToAPI { // message fields - failed_decoys_amount: ::std::option::Option, - total_time_to_connect: ::std::option::Option, + secret: ::protobuf::SingularField<::std::vec::Vec>, + pub registration_payload: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientToAPI { + fn default() -> &'a ClientToAPI { + ::default_instance() + } +} + +impl ClientToAPI { + pub fn new() -> ClientToAPI { + ::std::default::Default::default() + } + + // optional bytes secret = 1; + + + pub fn get_secret(&self) -> &[u8] { + match self.secret.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_secret(&mut self) { + self.secret.clear(); + } + + pub fn has_secret(&self) -> bool { + self.secret.is_some() + } + + // Param is passed by value, moved + pub fn set_secret(&mut self, v: ::std::vec::Vec) { + self.secret = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_secret(&mut self) -> &mut ::std::vec::Vec { + if self.secret.is_none() { + self.secret.set_default(); + } + self.secret.as_mut().unwrap() + } + + // Take field + pub fn take_secret(&mut self) -> ::std::vec::Vec { + self.secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional .tapdance.ClientToStation registration_payload = 2; + + + pub fn get_registration_payload(&self) -> &ClientToStation { + self.registration_payload.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_registration_payload(&mut self) { + self.registration_payload.clear(); + } + + pub fn has_registration_payload(&self) -> bool { + self.registration_payload.is_some() + } + + // Param is passed by value, moved + pub fn set_registration_payload(&mut self, v: ClientToStation) { + self.registration_payload = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_registration_payload(&mut self) -> &mut ClientToStation { + if self.registration_payload.is_none() { + self.registration_payload.set_default(); + } + self.registration_payload.as_mut().unwrap() + } + + // Take field + pub fn take_registration_payload(&mut self) -> ClientToStation { + self.registration_payload.take().unwrap_or_else(|| ClientToStation::new()) + } +} + +impl ::protobuf::Message for ClientToAPI { + fn is_initialized(&self) -> bool { + for v in &self.registration_payload { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.secret)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.registration_payload)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.secret.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(ref v) = self.registration_payload.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.secret.as_ref() { + os.write_bytes(1, &v)?; + } + if let Some(ref v) = self.registration_payload.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ClientToAPI { + ClientToAPI::new() + } + + fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "secret", + |m: &ClientToAPI| { &m.secret }, + |m: &mut ClientToAPI| { &mut m.secret }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "registration_payload", + |m: &ClientToAPI| { &m.registration_payload }, + |m: &mut ClientToAPI| { &mut m.registration_payload }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ClientToAPI", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static ClientToAPI { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ClientToAPI::new) + } +} + +impl ::protobuf::Clear for ClientToAPI { + fn clear(&mut self) { + self.secret.clear(); + self.registration_payload.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for ClientToAPI { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ClientToAPI { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct ZMQPayload { + // message fields + shared_secret: ::protobuf::SingularField<::std::vec::Vec>, + pub registration_payload: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ZMQPayload { + fn default() -> &'a ZMQPayload { + ::default_instance() + } +} + +impl ZMQPayload { + pub fn new() -> ZMQPayload { + ::std::default::Default::default() + } + + // optional bytes shared_secret = 1; + + + pub fn get_shared_secret(&self) -> &[u8] { + match self.shared_secret.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_shared_secret(&mut self) { + self.shared_secret.clear(); + } + + pub fn has_shared_secret(&self) -> bool { + self.shared_secret.is_some() + } + + // Param is passed by value, moved + pub fn set_shared_secret(&mut self, v: ::std::vec::Vec) { + self.shared_secret = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_shared_secret(&mut self) -> &mut ::std::vec::Vec { + if self.shared_secret.is_none() { + self.shared_secret.set_default(); + } + self.shared_secret.as_mut().unwrap() + } + + // Take field + pub fn take_shared_secret(&mut self) -> ::std::vec::Vec { + self.shared_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional .tapdance.ClientToStation registration_payload = 3; + + + pub fn get_registration_payload(&self) -> &ClientToStation { + self.registration_payload.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_registration_payload(&mut self) { + self.registration_payload.clear(); + } + + pub fn has_registration_payload(&self) -> bool { + self.registration_payload.is_some() + } + + // Param is passed by value, moved + pub fn set_registration_payload(&mut self, v: ClientToStation) { + self.registration_payload = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_registration_payload(&mut self) -> &mut ClientToStation { + if self.registration_payload.is_none() { + self.registration_payload.set_default(); + } + self.registration_payload.as_mut().unwrap() + } + + // Take field + pub fn take_registration_payload(&mut self) -> ClientToStation { + self.registration_payload.take().unwrap_or_else(|| ClientToStation::new()) + } +} + +impl ::protobuf::Message for ZMQPayload { + fn is_initialized(&self) -> bool { + for v in &self.registration_payload { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.shared_secret)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.registration_payload)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.shared_secret.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(ref v) = self.registration_payload.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.shared_secret.as_ref() { + os.write_bytes(1, &v)?; + } + if let Some(ref v) = self.registration_payload.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ZMQPayload { + ZMQPayload::new() + } + + fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "shared_secret", + |m: &ZMQPayload| { &m.shared_secret }, + |m: &mut ZMQPayload| { &mut m.shared_secret }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "registration_payload", + |m: &ZMQPayload| { &m.registration_payload }, + |m: &mut ZMQPayload| { &mut m.registration_payload }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ZMQPayload", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static ZMQPayload { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ZMQPayload::new) + } +} + +impl ::protobuf::Clear for ZMQPayload { + fn clear(&mut self) { + self.shared_secret.clear(); + self.registration_payload.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for ZMQPayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ZMQPayload { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct SessionStats { + // message fields + failed_decoys_amount: ::std::option::Option, + total_time_to_connect: ::std::option::Option, rtt_to_station: ::std::option::Option, tls_to_decoy: ::std::option::Option, tcp_to_decoy: ::std::option::Option, @@ -2532,7 +3299,7 @@ impl ::protobuf::Message for SessionStats { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2603,7 +3370,7 @@ impl ::protobuf::Message for SessionStats { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.failed_decoys_amount { os.write_uint32(20, v)?; } @@ -2635,13 +3402,13 @@ impl ::protobuf::Message for SessionStats { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { self } @@ -2654,55 +3421,45 @@ impl ::protobuf::Message for SessionStats { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "failed_decoys_amount", - |m: &SessionStats| { &m.failed_decoys_amount }, - |m: &mut SessionStats| { &mut m.failed_decoys_amount }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "total_time_to_connect", - |m: &SessionStats| { &m.total_time_to_connect }, - |m: &mut SessionStats| { &mut m.total_time_to_connect }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "rtt_to_station", - |m: &SessionStats| { &m.rtt_to_station }, - |m: &mut SessionStats| { &mut m.rtt_to_station }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tls_to_decoy", - |m: &SessionStats| { &m.tls_to_decoy }, - |m: &mut SessionStats| { &mut m.tls_to_decoy }, - )); - fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "tcp_to_decoy", - |m: &SessionStats| { &m.tcp_to_decoy }, - |m: &mut SessionStats| { &mut m.tcp_to_decoy }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "SessionStats", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "failed_decoys_amount", + |m: &SessionStats| { &m.failed_decoys_amount }, + |m: &mut SessionStats| { &mut m.failed_decoys_amount }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "total_time_to_connect", + |m: &SessionStats| { &m.total_time_to_connect }, + |m: &mut SessionStats| { &mut m.total_time_to_connect }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "rtt_to_station", + |m: &SessionStats| { &m.rtt_to_station }, + |m: &mut SessionStats| { &mut m.rtt_to_station }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tls_to_decoy", + |m: &SessionStats| { &m.tls_to_decoy }, + |m: &mut SessionStats| { &mut m.tls_to_decoy }, + )); + fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "tcp_to_decoy", + |m: &SessionStats| { &m.tcp_to_decoy }, + |m: &mut SessionStats| { &mut m.tcp_to_decoy }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "SessionStats", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static SessionStats { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const SessionStats, - }; - unsafe { - instance.get(SessionStats::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SessionStats::new) } } @@ -2718,14 +3475,14 @@ impl ::protobuf::Clear for SessionStats { } impl ::std::fmt::Debug for SessionStats { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SessionStats { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) } } @@ -2757,15 +3514,10 @@ impl ::protobuf::ProtobufEnum for KeyType { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("KeyType", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("KeyType", file_descriptor_proto()) + }) } } @@ -2780,8 +3532,8 @@ impl ::std::default::Default for KeyType { } impl ::protobuf::reflect::ProtobufValue for KeyType { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -2834,15 +3586,10 @@ impl ::protobuf::ProtobufEnum for C2S_Transition { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("C2S_Transition", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("C2S_Transition", file_descriptor_proto()) + }) } } @@ -2856,8 +3603,8 @@ impl ::std::default::Default for C2S_Transition { } impl ::protobuf::reflect::ProtobufValue for C2S_Transition { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -2901,15 +3648,10 @@ impl ::protobuf::ProtobufEnum for S2C_Transition { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("S2C_Transition", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("S2C_Transition", file_descriptor_proto()) + }) } } @@ -2923,8 +3665,8 @@ impl ::std::default::Default for S2C_Transition { } impl ::protobuf::reflect::ProtobufValue for S2C_Transition { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -2974,15 +3716,10 @@ impl ::protobuf::ProtobufEnum for ErrorReasonS2C { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("ErrorReasonS2C", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("ErrorReasonS2C", file_descriptor_proto()) + }) } } @@ -2996,8 +3733,61 @@ impl ::std::default::Default for ErrorReasonS2C { } impl ::protobuf::reflect::ProtobufValue for ErrorReasonS2C { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum TransportType { + NullTransport = 0, + MinTransport = 1, + Obfs4Transport = 2, +} + +impl ::protobuf::ProtobufEnum for TransportType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(TransportType::NullTransport), + 1 => ::std::option::Option::Some(TransportType::MinTransport), + 2 => ::std::option::Option::Some(TransportType::Obfs4Transport), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [TransportType] = &[ + TransportType::NullTransport, + TransportType::MinTransport, + TransportType::Obfs4Transport, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("TransportType", file_descriptor_proto()) + }) + } +} + +impl ::std::marker::Copy for TransportType { +} + +impl ::std::default::Default for TransportType { + fn default() -> Self { + TransportType::NullTransport + } +} + +impl ::protobuf::reflect::ProtobufValue for TransportType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -3009,369 +3799,434 @@ static file_descriptor_proto_data: &'static [u8] = b"\ (\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\x18\x06\x20\x01(\x0cR\x08ipv6ad\ dr\x12(\n\x06pubkey\x18\x03\x20\x01(\x0b2\x10.tapdance.PubKeyR\x06pubkey\ \x12\x18\n\x07timeout\x18\x04\x20\x01(\rR\x07timeout\x12\x16\n\x06tcpwin\ - \x18\x05\x20\x01(\rR\x06tcpwin\"\xe0\x01\n\nClientConf\x122\n\ndecoy_lis\ + \x18\x05\x20\x01(\rR\x06tcpwin\"\x99\x02\n\nClientConf\x122\n\ndecoy_lis\ t\x18\x01\x20\x01(\x0b2\x13.tapdance.DecoyListR\tdecoyList\x12\x1e\n\nge\ neration\x18\x02\x20\x01(\rR\ngeneration\x127\n\x0edefault_pubkey\x18\ \x03\x20\x01(\x0b2\x10.tapdance.PubKeyR\rdefaultPubkey\x12E\n\x11dark_de\ coy_blocks\x18\x04\x20\x01(\x0b2\x19.tapdance.DarkDecoyBlocksR\x0fdarkDe\ - coyBlocks\"B\n\tDecoyList\x125\n\ntls_decoys\x18\x01\x20\x03(\x0b2\x16.t\ - apdance.TLSDecoySpecR\ttlsDecoys\")\n\x0fDarkDecoyBlocks\x12\x16\n\x06bl\ - ocks\x18\x01\x20\x03(\tR\x06blocks\"\xcb\x02\n\x0fStationToClient\x12)\n\ - \x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x12C\n\x10st\ - ate_transition\x18\x02\x20\x01(\x0e2\x18.tapdance.S2C_TransitionR\x0fsta\ - teTransition\x125\n\x0bconfig_info\x18\x03\x20\x01(\x0b2\x14.tapdance.Cl\ - ientConfR\nconfigInfo\x127\n\nerr_reason\x18\x04\x20\x01(\x0e2\x18.tapda\ - nce.ErrorReasonS2CR\terrReason\x12\x1f\n\x0btmp_backoff\x18\x05\x20\x01(\ - \rR\ntmpBackoff\x12\x1d\n\nstation_id\x18\x06\x20\x01(\tR\tstationId\x12\ - \x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"\x86\x04\n\x0fClientToS\ - tation\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\ - \x122\n\x15decoy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGenerat\ - ion\x12C\n\x10state_transition\x18\x03\x20\x01(\x0e2\x18.tapdance.C2S_Tr\ - ansitionR\x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\ - \x04R\nuploadSync\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoy\ - s\x12,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.tapdance.SessionStatsR\x05st\ - ats\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\rcovertAddress\x127\n\ - \x18masked_decoy_server_name\x18\x15\x20\x01(\tR\x15maskedDecoyServerNam\ - e\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv6Support\x12\x1d\n\nv4_s\ - upport\x18\x17\x20\x01(\x08R\tv4Support\x12#\n\rc2s_transport\x18\x18\ - \x20\x01(\rR\x0cc2sTransport\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07\ - padding\"\xdd\x01\n\x0cSessionStats\x120\n\x14failed_decoys_amount\x18\ - \x14\x20\x01(\rR\x12failedDecoysAmount\x121\n\x15total_time_to_connect\ - \x18\x1f\x20\x01(\rR\x12totalTimeToConnect\x12$\n\x0ertt_to_station\x18!\ - \x20\x01(\rR\x0crttToStation\x12\x20\n\x0ctls_to_decoy\x18&\x20\x01(\rR\ - \ntlsToDecoy\x12\x20\n\x0ctcp_to_decoy\x18'\x20\x01(\rR\ntcpToDecoy*+\n\ - \x07KeyType\x12\x0f\n\x0bAES_GCM_128\x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*\ - \xe7\x01\n\x0eC2S_Transition\x12\x11\n\rC2S_NO_CHANGE\x10\0\x12\x14\n\ - \x10C2S_SESSION_INIT\x10\x01\x12\x1b\n\x17C2S_SESSION_COVERT_INIT\x10\ - \x0b\x12\x18\n\x14C2S_EXPECT_RECONNECT\x10\x02\x12\x15\n\x11C2S_SESSION_\ - CLOSE\x10\x03\x12\x14\n\x10C2S_YIELD_UPLOAD\x10\x04\x12\x16\n\x12C2S_ACQ\ - UIRE_UPLOAD\x10\x05\x12\x20\n\x1cC2S_EXPECT_UPLOADONLY_RECONN\x10\x06\ - \x12\x0e\n\tC2S_ERROR\x10\xff\x01*\x98\x01\n\x0eS2C_Transition\x12\x11\n\ - \rS2C_NO_CHANGE\x10\0\x12\x14\n\x10S2C_SESSION_INIT\x10\x01\x12\x1b\n\ - \x17S2C_SESSION_COVERT_INIT\x10\x0b\x12\x19\n\x15S2C_CONFIRM_RECONNECT\ - \x10\x02\x12\x15\n\x11S2C_SESSION_CLOSE\x10\x03\x12\x0e\n\tS2C_ERROR\x10\ - \xff\x01*\xac\x01\n\x0eErrorReasonS2C\x12\x0c\n\x08NO_ERROR\x10\0\x12\ - \x11\n\rCOVERT_STREAM\x10\x01\x12\x13\n\x0fCLIENT_REPORTED\x10\x02\x12\ - \x13\n\x0fCLIENT_PROTOCOL\x10\x03\x12\x14\n\x10STATION_INTERNAL\x10\x04\ - \x12\x12\n\x0eDECOY_OVERLOAD\x10\x05\x12\x11\n\rCLIENT_STREAM\x10d\x12\ - \x12\n\x0eCLIENT_TIMEOUT\x10eJ\x88F\n\x07\x12\x05\0\0\xd5\x01\x01\n\x08\ - \n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\n\x01\x02\x12\x03\x06\0\x112\xa5\ - \x01\x20TODO:\x20We're\x20using\x20proto2\x20because\x20it's\x20the\x20d\ - efault\x20on\x20Ubuntu\x2016.04.\n\x20At\x20some\x20point\x20we\x20will\ - \x20want\x20to\x20migrate\x20to\x20proto3,\x20but\x20we\x20are\x20not\n\ - \x20using\x20any\x20proto3\x20features\x20yet.\n\n\n\n\x02\x05\0\x12\x04\ - \x08\0\x0b\x01\n\n\n\x03\x05\0\x01\x12\x03\x08\x05\x0c\n\x0b\n\x04\x05\0\ - \x02\0\x12\x03\t\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\t\x04\x0f\n\ - \x0c\n\x05\x05\0\x02\0\x02\x12\x03\t\x12\x14\n\x20\n\x04\x05\0\x02\x01\ - \x12\x03\n\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\ - \x02\x01\x01\x12\x03\n\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\n\ - \x12\x14\n\n\n\x02\x04\0\x12\x04\r\0\x12\x01\n\n\n\x03\x04\0\x01\x12\x03\ - \r\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x0f\x04\x1b\x1a'\x20A\x20public\ - \x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\x04\0\x02\ - \0\x04\x12\x03\x0f\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x0f\r\x12\ - \n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x0f\x13\x16\n\x0c\n\x05\x04\0\x02\0\ - \x03\x12\x03\x0f\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x11\x04\x1e\n\ - \x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\0\x02\ - \x01\x06\x12\x03\x11\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x11\x15\ - \x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x11\x1c\x1d\n\n\n\x02\x04\x01\ - \x12\x04\x14\0:\x01\n\n\n\x03\x04\x01\x01\x12\x03\x14\x08\x14\n\xa1\x01\ - \n\x04\x04\x01\x02\0\x12\x03\x19\x04!\x1a\x93\x01\x20The\x20hostname/SNI\ - \x20to\x20use\x20for\x20this\x20host\n\n\x20The\x20hostname\x20is\x20the\ - \x20only\x20required\x20field,\x20although\x20other\n\x20fields\x20are\ - \x20expected\x20to\x20be\x20present\x20in\x20most\x20cases.\n\n\x0c\n\ - \x05\x04\x01\x02\0\x04\x12\x03\x19\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x05\ - \x12\x03\x19\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x19\x14\x1c\n\ - \x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x19\x1f\x20\n\xf7\x01\n\x04\x04\x01\ - \x02\x01\x12\x03\x20\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20ipv4\x20addre\ - ss,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\x20IPv4\x20addres\ - s\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resolved\x20via\n\x20DN\ - S\x20by\x20the\x20client,\x20or\x20the\x20client\x20may\x20discard\x20th\ - is\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20untrusted,\x20or\ - \x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\x05\x04\x01\x02\ - \x01\x04\x12\x03\x20\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x20\ - \r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x15\x1d\n\x0c\n\x05\ - \x04\x01\x02\x01\x03\x12\x03\x20\x20!\n>\n\x04\x04\x01\x02\x02\x12\x03#\ - \x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20network\x20\ - byte\x20order\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03#\x04\x0c\n\x0c\n\ - \x05\x04\x01\x02\x02\x05\x12\x03#\r\x12\n\x0c\n\x05\x04\x01\x02\x02\x01\ - \x12\x03#\x13\x1b\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03#\x1e\x1f\n\x91\ - \x01\n\x04\x04\x01\x02\x03\x12\x03)\x04\x1f\x1a\x83\x01\x20The\x20Tapdan\ - ce\x20station\x20public\x20key\x20to\x20use\x20when\x20contacting\x20thi\ - s\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20default\x20station\x20publi\ - c\x20key\x20(if\x20any)\x20is\x20used.\n\n\x0c\n\x05\x04\x01\x02\x03\x04\ - \x12\x03)\x04\x0c\n\x0c\n\x05\x04\x01\x02\x03\x06\x12\x03)\r\x13\n\x0c\n\ - \x05\x04\x01\x02\x03\x01\x12\x03)\x14\x1a\n\x0c\n\x05\x04\x01\x02\x03\ - \x03\x12\x03)\x1d\x1e\n\xee\x01\n\x04\x04\x01\x02\x04\x12\x030\x04\x20\ - \x1a\xe0\x01\x20The\x20maximum\x20duration,\x20in\x20milliseconds,\x20to\ - \x20maintain\x20an\x20open\n\x20connection\x20to\x20this\x20decoy\x20(be\ - cause\x20the\x20decoy\x20may\x20close\x20the\n\x20connection\x20itself\ - \x20after\x20this\x20length\x20of\x20time)\n\n\x20If\x20omitted,\x20a\ - \x20default\x20of\x2030,000\x20milliseconds\x20is\x20assumed.\n\n\x0c\n\ - \x05\x04\x01\x02\x04\x04\x12\x030\x04\x0c\n\x0c\n\x05\x04\x01\x02\x04\ - \x05\x12\x030\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x030\x14\x1b\n\ - \x0c\n\x05\x04\x01\x02\x04\x03\x12\x030\x1e\x1f\n\xb0\x02\n\x04\x04\x01\ - \x02\x05\x12\x039\x04\x1f\x1a\xa2\x02\x20The\x20maximum\x20TCP\x20window\ - \x20size\x20to\x20attempt\x20to\x20use\x20for\x20this\x20decoy.\n\n\x20I\ - f\x20omitted,\x20a\x20default\x20of\x2015360\x20is\x20assumed.\n\n\x20TO\ - DO:\x20the\x20default\x20is\x20based\x20on\x20the\x20current\x20heuristi\ - c\x20of\x20only\n\x20using\x20decoys\x20that\x20permit\x20windows\x20of\ - \x2015KB\x20or\x20larger.\x20\x20If\x20this\n\x20heuristic\x20changes,\ - \x20then\x20this\x20default\x20doesn't\x20make\x20sense.\n\n\x0c\n\x05\ - \x04\x01\x02\x05\x04\x12\x039\x04\x0c\n\x0c\n\x05\x04\x01\x02\x05\x05\ - \x12\x039\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x039\x14\x1a\n\x0c\n\ - \x05\x04\x01\x02\x05\x03\x12\x039\x1d\x1e\n\x83\x08\n\x02\x04\x02\x12\ - \x04Q\0V\x012\xf6\x07\x20In\x20version\x201,\x20the\x20request\x20is\x20\ - very\x20simple:\x20when\n\x20the\x20client\x20sends\x20a\x20MSG_PROTO\ - \x20to\x20the\x20station,\x20if\x20the\n\x20generation\x20number\x20is\ - \x20present,\x20then\x20this\x20request\x20includes\n\x20(in\x20addition\ - \x20to\x20whatever\x20other\x20operations\x20are\x20part\x20of\x20the\n\ - \x20request)\x20a\x20request\x20for\x20the\x20station\x20to\x20send\x20a\ - \x20copy\x20of\n\x20the\x20current\x20decoy\x20set\x20that\x20has\x20a\ - \x20generation\x20number\x20greater\n\x20than\x20the\x20generation\x20nu\ - mber\x20in\x20its\x20request.\n\n\x20If\x20the\x20response\x20contains\ - \x20a\x20DecoyListUpdate\x20with\x20a\x20generation\x20number\x20equal\n\ - \x20to\x20that\x20which\x20the\x20client\x20sent,\x20then\x20the\x20clie\ - nt\x20is\x20\"caught\x20up\"\x20with\n\x20the\x20station\x20and\x20the\ - \x20response\x20contains\x20no\x20new\x20information\n\x20(and\x20all\ - \x20other\x20fields\x20may\x20be\x20omitted\x20or\x20empty).\x20\x20Othe\ - rwise,\n\x20the\x20station\x20will\x20send\x20the\x20latest\x20configura\ - tion\x20information,\n\x20along\x20with\x20its\x20generation\x20number.\ - \n\n\x20The\x20station\x20can\x20also\x20send\x20ClientConf\x20messages\ - \n\x20(as\x20part\x20of\x20Station2Client\x20messages)\x20whenever\x20it\ - \x20wants.\n\x20The\x20client\x20is\x20expected\x20to\x20react\x20as\x20\ - if\x20it\x20had\x20requested\n\x20such\x20messages\x20--\x20possibly\x20\ - by\x20ignoring\x20them,\x20if\x20the\x20client\n\x20is\x20already\x20up-\ - to-date\x20according\x20to\x20the\x20generation\x20number.\n\n\n\n\x03\ - \x04\x02\x01\x12\x03Q\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\x03R\x04&\n\ - \x0c\n\x05\x04\x02\x02\0\x04\x12\x03R\x04\x0c\n\x0c\n\x05\x04\x02\x02\0\ - \x06\x12\x03R\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03R\x17!\n\x0c\n\ - \x05\x04\x02\x02\0\x03\x12\x03R$%\n\x0b\n\x04\x04\x02\x02\x01\x12\x03S\ - \x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03S\x04\x0c\n\x0c\n\x05\x04\ - \x02\x02\x01\x05\x12\x03S\r\x13\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03S\ - \x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03S!\"\n\x0b\n\x04\x04\x02\ - \x02\x02\x12\x03T\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03T\x04\x0c\ - \n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03T\r\x13\n\x0c\n\x05\x04\x02\x02\ - \x02\x01\x12\x03T\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03T%&\n\x0b\ - \n\x04\x04\x02\x02\x03\x12\x03U\x043\n\x0c\n\x05\x04\x02\x02\x03\x04\x12\ - \x03U\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03U\r\x1c\n\x0c\n\x05\ - \x04\x02\x02\x03\x01\x12\x03U\x1d.\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\ - \x03U12\n\n\n\x02\x04\x03\x12\x04X\0Z\x01\n\n\n\x03\x04\x03\x01\x12\x03X\ - \x08\x11\n\x0b\n\x04\x04\x03\x02\0\x12\x03Y\x04)\n\x0c\n\x05\x04\x03\x02\ - \0\x04\x12\x03Y\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03Y\r\x19\n\ - \x0c\n\x05\x04\x03\x02\0\x01\x12\x03Y\x1a$\n\x0c\n\x05\x04\x03\x02\0\x03\ - \x12\x03Y'(\n\n\n\x02\x04\x04\x12\x04\\\0^\x01\n\n\n\x03\x04\x04\x01\x12\ - \x03\\\x08\x17\n\x0b\n\x04\x04\x04\x02\0\x12\x03]\x04\x1f\n\x0c\n\x05\ - \x04\x04\x02\0\x04\x12\x03]\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x05\x12\ - \x03]\r\x13\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03]\x14\x1a\n\x0c\n\x05\ - \x04\x04\x02\0\x03\x12\x03]\x1d\x1e\n-\n\x02\x05\x01\x12\x04a\0k\x01\x1a\ - !\x20State\x20transitions\x20of\x20the\x20client\n\n\n\n\x03\x05\x01\x01\ - \x12\x03a\x05\x13\n\x0b\n\x04\x05\x01\x02\0\x12\x03b\x04\x16\n\x0c\n\x05\ - \x05\x01\x02\0\x01\x12\x03b\x04\x11\n\x0c\n\x05\x05\x01\x02\0\x02\x12\ - \x03b\x14\x15\n\"\n\x04\x05\x01\x02\x01\x12\x03c\x04\x19\"\x15\x20connec\ - t\x20me\x20to\x20squid\n\n\x0c\n\x05\x05\x01\x02\x01\x01\x12\x03c\x04\ - \x14\n\x0c\n\x05\x05\x01\x02\x01\x02\x12\x03c\x17\x18\n,\n\x04\x05\x01\ - \x02\x02\x12\x03d\x04!\"\x1f\x20connect\x20me\x20to\x20provided\x20cover\ - t\n\n\x0c\n\x05\x05\x01\x02\x02\x01\x12\x03d\x04\x1b\n\x0c\n\x05\x05\x01\ - \x02\x02\x02\x12\x03d\x1e\x20\n\x0b\n\x04\x05\x01\x02\x03\x12\x03e\x04\ - \x1d\n\x0c\n\x05\x05\x01\x02\x03\x01\x12\x03e\x04\x18\n\x0c\n\x05\x05\ - \x01\x02\x03\x02\x12\x03e\x1b\x1c\n\x0b\n\x04\x05\x01\x02\x04\x12\x03f\ - \x04\x1a\n\x0c\n\x05\x05\x01\x02\x04\x01\x12\x03f\x04\x15\n\x0c\n\x05\ - \x05\x01\x02\x04\x02\x12\x03f\x18\x19\n\x0b\n\x04\x05\x01\x02\x05\x12\ - \x03g\x04\x19\n\x0c\n\x05\x05\x01\x02\x05\x01\x12\x03g\x04\x14\n\x0c\n\ - \x05\x05\x01\x02\x05\x02\x12\x03g\x17\x18\n\x0b\n\x04\x05\x01\x02\x06\ - \x12\x03h\x04\x1b\n\x0c\n\x05\x05\x01\x02\x06\x01\x12\x03h\x04\x16\n\x0c\ - \n\x05\x05\x01\x02\x06\x02\x12\x03h\x19\x1a\n\x0b\n\x04\x05\x01\x02\x07\ - \x12\x03i\x04%\n\x0c\n\x05\x05\x01\x02\x07\x01\x12\x03i\x04\x20\n\x0c\n\ - \x05\x05\x01\x02\x07\x02\x12\x03i#$\n\x0b\n\x04\x05\x01\x02\x08\x12\x03j\ - \x04\x14\n\x0c\n\x05\x05\x01\x02\x08\x01\x12\x03j\x04\r\n\x0c\n\x05\x05\ - \x01\x02\x08\x02\x12\x03j\x10\x13\n-\n\x02\x05\x02\x12\x04n\0v\x01\x1a!\ - \x20State\x20transitions\x20of\x20the\x20server\n\n\n\n\x03\x05\x02\x01\ - \x12\x03n\x05\x13\n\x0b\n\x04\x05\x02\x02\0\x12\x03o\x04\x16\n\x0c\n\x05\ - \x05\x02\x02\0\x01\x12\x03o\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\ - \x03o\x14\x15\n!\n\x04\x05\x02\x02\x01\x12\x03p\x04\x19\"\x14\x20connect\ - ed\x20to\x20squid\n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03p\x04\x14\n\ - \x0c\n\x05\x05\x02\x02\x01\x02\x12\x03p\x17\x18\n'\n\x04\x05\x02\x02\x02\ - \x12\x03q\x04!\"\x1a\x20connected\x20to\x20covert\x20host\n\n\x0c\n\x05\ - \x05\x02\x02\x02\x01\x12\x03q\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\ - \x12\x03q\x1e\x20\n\x0b\n\x04\x05\x02\x02\x03\x12\x03r\x04\x1e\n\x0c\n\ - \x05\x05\x02\x02\x03\x01\x12\x03r\x04\x19\n\x0c\n\x05\x05\x02\x02\x03\ - \x02\x12\x03r\x1c\x1d\n\x0b\n\x04\x05\x02\x02\x04\x12\x03s\x04\x1a\n\x0c\ - \n\x05\x05\x02\x02\x04\x01\x12\x03s\x04\x15\n\x0c\n\x05\x05\x02\x02\x04\ - \x02\x12\x03s\x18\x19\nR\n\x04\x05\x02\x02\x05\x12\x03u\x04\x14\x1aE\x20\ - TODO\x20should\x20probably\x20also\x20allow\x20EXPECT_RECONNECT\x20here,\ - \x20for\x20DittoTap\n\n\x0c\n\x05\x05\x02\x02\x05\x01\x12\x03u\x04\r\n\ - \x0c\n\x05\x05\x02\x02\x05\x02\x12\x03u\x10\x13\n7\n\x02\x05\x03\x12\x05\ - y\0\x83\x01\x01\x1a*\x20Should\x20accompany\x20all\x20S2C_ERROR\x20messa\ - ges.\n\n\n\n\x03\x05\x03\x01\x12\x03y\x05\x13\n\x0b\n\x04\x05\x03\x02\0\ - \x12\x03z\x04\x11\n\x0c\n\x05\x05\x03\x02\0\x01\x12\x03z\x04\x0c\n\x0c\n\ - \x05\x05\x03\x02\0\x02\x12\x03z\x0f\x10\n)\n\x04\x05\x03\x02\x01\x12\x03\ - {\x04\x16\"\x1c\x20Squid\x20TCP\x20connection\x20broke\n\n\x0c\n\x05\x05\ - \x03\x02\x01\x01\x12\x03{\x04\x11\n\x0c\n\x05\x05\x03\x02\x01\x02\x12\ - \x03{\x14\x15\n6\n\x04\x05\x03\x02\x02\x12\x03|\x04\x18\")\x20You\x20tol\ - d\x20me\x20something\x20was\x20wrong,\x20client\n\n\x0c\n\x05\x05\x03\ - \x02\x02\x01\x12\x03|\x04\x13\n\x0c\n\x05\x05\x03\x02\x02\x02\x12\x03|\ - \x16\x17\n?\n\x04\x05\x03\x02\x03\x12\x03}\x04\x18\"2\x20You\x20messed\ - \x20up,\x20client\x20(e.g.\x20sent\x20a\x20bad\x20protobuf)\n\n\x0c\n\ - \x05\x05\x03\x02\x03\x01\x12\x03}\x04\x13\n\x0c\n\x05\x05\x03\x02\x03\ - \x02\x12\x03}\x16\x17\n\x16\n\x04\x05\x03\x02\x04\x12\x03~\x04\x19\"\t\ - \x20I\x20broke\n\n\x0c\n\x05\x05\x03\x02\x04\x01\x12\x03~\x04\x14\n\x0c\ - \n\x05\x05\x03\x02\x04\x02\x12\x03~\x17\x18\nD\n\x04\x05\x03\x02\x05\x12\ - \x03\x7f\x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\x20use\x20t\ - his\x20decoy\x20right\x20now\n\n\x0c\n\x05\x05\x03\x02\x05\x01\x12\x03\ - \x7f\x04\x12\n\x0c\n\x05\x05\x03\x02\x05\x02\x12\x03\x7f\x15\x16\nD\n\ - \x04\x05\x03\x02\x06\x12\x04\x81\x01\x04\x18\"6\x20My\x20stream\x20to\ - \x20you\x20broke.\x20(This\x20is\x20impossible\x20to\x20send)\n\n\r\n\ - \x05\x05\x03\x02\x06\x01\x12\x04\x81\x01\x04\x11\n\r\n\x05\x05\x03\x02\ - \x06\x02\x12\x04\x81\x01\x14\x17\nA\n\x04\x05\x03\x02\x07\x12\x04\x82\ - \x01\x04\x19\"3\x20You\x20never\x20came\x20back.\x20(This\x20is\x20impos\ - sible\x20to\x20send)\n\n\r\n\x05\x05\x03\x02\x07\x01\x12\x04\x82\x01\x04\ - \x12\n\r\n\x05\x05\x03\x02\x07\x02\x12\x04\x82\x01\x15\x18\n\x0c\n\x02\ - \x04\x05\x12\x06\x85\x01\0\x9c\x01\x01\n\x0b\n\x03\x04\x05\x01\x12\x04\ - \x85\x01\x08\x17\nO\n\x04\x04\x05\x02\0\x12\x04\x87\x01\x04)\x1aA\x20Sho\ - uld\x20accompany\x20(at\x20least)\x20SESSION_INIT\x20and\x20CONFIRM_RECO\ - NNECT.\n\n\r\n\x05\x04\x05\x02\0\x04\x12\x04\x87\x01\x04\x0c\n\r\n\x05\ - \x04\x05\x02\0\x05\x12\x04\x87\x01\r\x13\n\r\n\x05\x04\x05\x02\0\x01\x12\ - \x04\x87\x01\x14$\n\r\n\x05\x04\x05\x02\0\x03\x12\x04\x87\x01'(\nv\n\x04\ - \x04\x05\x02\x01\x12\x04\x8b\x01\x041\x1ah\x20There\x20might\x20be\x20a\ - \x20state\x20transition.\x20May\x20be\x20absent;\x20absence\x20should\ - \x20be\n\x20treated\x20identically\x20to\x20NO_CHANGE.\n\n\r\n\x05\x04\ - \x05\x02\x01\x04\x12\x04\x8b\x01\x04\x0c\n\r\n\x05\x04\x05\x02\x01\x06\ - \x12\x04\x8b\x01\r\x1b\n\r\n\x05\x04\x05\x02\x01\x01\x12\x04\x8b\x01\x1c\ - ,\n\r\n\x05\x04\x05\x02\x01\x03\x12\x04\x8b\x01/0\nc\n\x04\x04\x05\x02\ - \x02\x12\x04\x8f\x01\x04(\x1aU\x20The\x20station\x20can\x20send\x20clien\ - t\x20config\x20info\x20piggybacked\n\x20on\x20any\x20message,\x20as\x20i\ - t\x20sees\x20fit\n\n\r\n\x05\x04\x05\x02\x02\x04\x12\x04\x8f\x01\x04\x0c\ - \n\r\n\x05\x04\x05\x02\x02\x06\x12\x04\x8f\x01\r\x17\n\r\n\x05\x04\x05\ - \x02\x02\x01\x12\x04\x8f\x01\x18#\n\r\n\x05\x04\x05\x02\x02\x03\x12\x04\ - \x8f\x01&'\nP\n\x04\x04\x05\x02\x03\x12\x04\x92\x01\x04+\x1aB\x20If\x20s\ - tate_transition\x20==\x20S2C_ERROR,\x20this\x20field\x20is\x20the\x20exp\ - lanation.\n\n\r\n\x05\x04\x05\x02\x03\x04\x12\x04\x92\x01\x04\x0c\n\r\n\ - \x05\x04\x05\x02\x03\x06\x12\x04\x92\x01\r\x1b\n\r\n\x05\x04\x05\x02\x03\ - \x01\x12\x04\x92\x01\x1c&\n\r\n\x05\x04\x05\x02\x03\x03\x12\x04\x92\x01)\ - *\nQ\n\x04\x04\x05\x02\x04\x12\x04\x95\x01\x04$\x1aC\x20Signals\x20clien\ - t\x20to\x20stop\x20connecting\x20for\x20following\x20amount\x20of\x20sec\ - onds\n\n\r\n\x05\x04\x05\x02\x04\x04\x12\x04\x95\x01\x04\x0c\n\r\n\x05\ - \x04\x05\x02\x04\x05\x12\x04\x95\x01\r\x13\n\r\n\x05\x04\x05\x02\x04\x01\ - \x12\x04\x95\x01\x14\x1f\n\r\n\x05\x04\x05\x02\x04\x03\x12\x04\x95\x01\"\ - #\nK\n\x04\x04\x05\x02\x05\x12\x04\x98\x01\x04#\x1a=\x20Sent\x20in\x20SE\ - SSION_INIT,\x20identifies\x20the\x20station\x20that\x20picked\x20up\n\n\ - \r\n\x05\x04\x05\x02\x05\x04\x12\x04\x98\x01\x04\x0c\n\r\n\x05\x04\x05\ - \x02\x05\x05\x12\x04\x98\x01\r\x13\n\r\n\x05\x04\x05\x02\x05\x01\x12\x04\ - \x98\x01\x14\x1e\n\r\n\x05\x04\x05\x02\x05\x03\x12\x04\x98\x01!\"\nG\n\ - \x04\x04\x05\x02\x06\x12\x04\x9b\x01\x04!\x1a9\x20Random-sized\x20junk\ - \x20to\x20defeat\x20packet\x20size\x20fingerprinting.\n\n\r\n\x05\x04\ - \x05\x02\x06\x04\x12\x04\x9b\x01\x04\x0c\n\r\n\x05\x04\x05\x02\x06\x05\ - \x12\x04\x9b\x01\r\x12\n\r\n\x05\x04\x05\x02\x06\x01\x12\x04\x9b\x01\x13\ - \x1a\n\r\n\x05\x04\x05\x02\x06\x03\x12\x04\x9b\x01\x1d\x20\n\x0c\n\x02\ - \x04\x06\x12\x06\x9e\x01\0\xc7\x01\x01\n\x0b\n\x03\x04\x06\x01\x12\x04\ - \x9e\x01\x08\x17\n\x0c\n\x04\x04\x06\x02\0\x12\x04\x9f\x01\x04)\n\r\n\ - \x05\x04\x06\x02\0\x04\x12\x04\x9f\x01\x04\x0c\n\r\n\x05\x04\x06\x02\0\ - \x05\x12\x04\x9f\x01\r\x13\n\r\n\x05\x04\x06\x02\0\x01\x12\x04\x9f\x01\ - \x14$\n\r\n\x05\x04\x06\x02\0\x03\x12\x04\x9f\x01'(\n\xd0\x01\n\x04\x04\ - \x06\x02\x01\x12\x04\xa4\x01\x04.\x1a\xc1\x01\x20The\x20client\x20report\ - s\x20its\x20decoy\x20list's\x20version\x20number\x20here,\x20which\x20th\ - e\n\x20station\x20can\x20use\x20to\x20decide\x20whether\x20to\x20send\ - \x20an\x20updated\x20one.\x20The\x20station\n\x20should\x20always\x20sen\ - d\x20a\x20list\x20if\x20this\x20field\x20is\x20set\x20to\x200.\n\n\r\n\ - \x05\x04\x06\x02\x01\x04\x12\x04\xa4\x01\x04\x0c\n\r\n\x05\x04\x06\x02\ - \x01\x05\x12\x04\xa4\x01\r\x13\n\r\n\x05\x04\x06\x02\x01\x01\x12\x04\xa4\ - \x01\x14)\n\r\n\x05\x04\x06\x02\x01\x03\x12\x04\xa4\x01,-\n\x0c\n\x04\ - \x04\x06\x02\x02\x12\x04\xa6\x01\x041\n\r\n\x05\x04\x06\x02\x02\x04\x12\ - \x04\xa6\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x02\x06\x12\x04\xa6\x01\r\x1b\ - \n\r\n\x05\x04\x06\x02\x02\x01\x12\x04\xa6\x01\x1c,\n\r\n\x05\x04\x06\ - \x02\x02\x03\x12\x04\xa6\x01/0\n\x80\x01\n\x04\x04\x06\x02\x03\x12\x04\ - \xaa\x01\x04$\x1ar\x20The\x20position\x20in\x20the\x20overall\x20session\ + coyBlocks\x127\n\x0econjure_pubkey\x18\x05\x20\x01(\x0b2\x10.tapdance.Pu\ + bKeyR\rconjurePubkey\"B\n\tDecoyList\x125\n\ntls_decoys\x18\x01\x20\x03(\ + \x0b2\x16.tapdance.TLSDecoySpecR\ttlsDecoys\")\n\x0fDarkDecoyBlocks\x12\ + \x16\n\x06blocks\x18\x01\x20\x03(\tR\x06blocks\"\xcb\x02\n\x0fStationToC\ + lient\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\ + \x12C\n\x10state_transition\x18\x02\x20\x01(\x0e2\x18.tapdance.S2C_Trans\ + itionR\x0fstateTransition\x125\n\x0bconfig_info\x18\x03\x20\x01(\x0b2\ + \x14.tapdance.ClientConfR\nconfigInfo\x127\n\nerr_reason\x18\x04\x20\x01\ + (\x0e2\x18.tapdance.ErrorReasonS2CR\terrReason\x12\x1f\n\x0btmp_backoff\ + \x18\x05\x20\x01(\rR\ntmpBackoff\x12\x1d\n\nstation_id\x18\x06\x20\x01(\ + \tR\tstationId\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"\x8f\ + \x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_only\x18\x01\x20\x01(\ + \x08R\nuploadOnly\x12\x1d\n\ndark_decoy\x18\x02\x20\x01(\x08R\tdarkDecoy\ + \x12!\n\x0cproxy_header\x18\x03\x20\x01(\x08R\x0bproxyHeader\x12\x17\n\ + \x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\"\xcb\x04\n\x0fClientToStati\ + on\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x12\ + 2\n\x15decoy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGeneration\ + \x12C\n\x10state_transition\x18\x03\x20\x01(\x0e2\x18.tapdance.C2S_Trans\ + itionR\x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\x04R\ + \nuploadSync\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoys\x12\ + ,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.tapdance.SessionStatsR\x05stats\ + \x125\n\ttransport\x18\x0c\x20\x01(\x0e2\x17.tapdance.TransportTypeR\ttr\ + ansport\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\rcovertAddress\x127\ + \n\x18masked_decoy_server_name\x18\x15\x20\x01(\tR\x15maskedDecoyServerN\ + ame\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv6Support\x12\x1d\n\nv4\ + _support\x18\x17\x20\x01(\x08R\tv4Support\x121\n\x05flags\x18\x18\x20\ + \x01(\x0b2\x1b.tapdance.RegistrationFlagsR\x05flags\x12\x18\n\x07padding\ + \x18d\x20\x01(\x0cR\x07padding\"s\n\x0bClientToAPI\x12\x16\n\x06secret\ + \x18\x01\x20\x01(\x0cR\x06secret\x12L\n\x14registration_payload\x18\x02\ + \x20\x01(\x0b2\x19.tapdance.ClientToStationR\x13registrationPayload\"\ + \x7f\n\nZMQPayload\x12#\n\rshared_secret\x18\x01\x20\x01(\x0cR\x0cshared\ + Secret\x12L\n\x14registration_payload\x18\x03\x20\x01(\x0b2\x19.tapdance\ + .ClientToStationR\x13registrationPayload\"\xdd\x01\n\x0cSessionStats\x12\ + 0\n\x14failed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAmount\ + \x121\n\x15total_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToConne\ + ct\x12$\n\x0ertt_to_station\x18!\x20\x01(\rR\x0crttToStation\x12\x20\n\ + \x0ctls_to_decoy\x18&\x20\x01(\rR\ntlsToDecoy\x12\x20\n\x0ctcp_to_decoy\ + \x18'\x20\x01(\rR\ntcpToDecoy*+\n\x07KeyType\x12\x0f\n\x0bAES_GCM_128\ + \x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*\xe7\x01\n\x0eC2S_Transition\x12\x11\ + \n\rC2S_NO_CHANGE\x10\0\x12\x14\n\x10C2S_SESSION_INIT\x10\x01\x12\x1b\n\ + \x17C2S_SESSION_COVERT_INIT\x10\x0b\x12\x18\n\x14C2S_EXPECT_RECONNECT\ + \x10\x02\x12\x15\n\x11C2S_SESSION_CLOSE\x10\x03\x12\x14\n\x10C2S_YIELD_U\ + PLOAD\x10\x04\x12\x16\n\x12C2S_ACQUIRE_UPLOAD\x10\x05\x12\x20\n\x1cC2S_E\ + XPECT_UPLOADONLY_RECONN\x10\x06\x12\x0e\n\tC2S_ERROR\x10\xff\x01*\x98\ + \x01\n\x0eS2C_Transition\x12\x11\n\rS2C_NO_CHANGE\x10\0\x12\x14\n\x10S2C\ + _SESSION_INIT\x10\x01\x12\x1b\n\x17S2C_SESSION_COVERT_INIT\x10\x0b\x12\ + \x19\n\x15S2C_CONFIRM_RECONNECT\x10\x02\x12\x15\n\x11S2C_SESSION_CLOSE\ + \x10\x03\x12\x0e\n\tS2C_ERROR\x10\xff\x01*\xac\x01\n\x0eErrorReasonS2C\ + \x12\x0c\n\x08NO_ERROR\x10\0\x12\x11\n\rCOVERT_STREAM\x10\x01\x12\x13\n\ + \x0fCLIENT_REPORTED\x10\x02\x12\x13\n\x0fCLIENT_PROTOCOL\x10\x03\x12\x14\ + \n\x10STATION_INTERNAL\x10\x04\x12\x12\n\x0eDECOY_OVERLOAD\x10\x05\x12\ + \x11\n\rCLIENT_STREAM\x10d\x12\x12\n\x0eCLIENT_TIMEOUT\x10e*H\n\rTranspo\ + rtType\x12\x11\n\rNullTransport\x10\0\x12\x10\n\x0cMinTransport\x10\x01\ + \x12\x12\n\x0eObfs4Transport\x10\x02J\xdeQ\n\x07\x12\x05\0\0\xf5\x01\x01\ + \n\x08\n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\n\x01\x02\x12\x03\x06\0\x112\ + \xa5\x01\x20TODO:\x20We're\x20using\x20proto2\x20because\x20it's\x20the\ + \x20default\x20on\x20Ubuntu\x2016.04.\n\x20At\x20some\x20point\x20we\x20\ + will\x20want\x20to\x20migrate\x20to\x20proto3,\x20but\x20we\x20are\x20no\ + t\n\x20using\x20any\x20proto3\x20features\x20yet.\n\n\n\n\x02\x05\0\x12\ + \x04\x08\0\x0b\x01\n\n\n\x03\x05\0\x01\x12\x03\x08\x05\x0c\n\x0b\n\x04\ + \x05\0\x02\0\x12\x03\t\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\t\x04\ + \x0f\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\t\x12\x14\n\x20\n\x04\x05\0\x02\ + \x01\x12\x03\n\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\ + \x05\0\x02\x01\x01\x12\x03\n\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\ + \x03\n\x12\x14\n\n\n\x02\x04\0\x12\x04\r\0\x12\x01\n\n\n\x03\x04\0\x01\ + \x12\x03\r\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x0f\x04\x1b\x1a'\x20A\ + \x20public\x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\ + \x04\0\x02\0\x04\x12\x03\x0f\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ + \x0f\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x0f\x13\x16\n\x0c\n\x05\ + \x04\0\x02\0\x03\x12\x03\x0f\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\ + \x11\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x11\x04\x0c\n\x0c\n\ + \x05\x04\0\x02\x01\x06\x12\x03\x11\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\ + \x12\x03\x11\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x11\x1c\x1d\n\ + \n\n\x02\x04\x01\x12\x04\x14\0:\x01\n\n\n\x03\x04\x01\x01\x12\x03\x14\ + \x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x19\x04!\x1a\x93\x01\x20T\ + he\x20hostname/SNI\x20to\x20use\x20for\x20this\x20host\n\n\x20The\x20hos\ + tname\x20is\x20the\x20only\x20required\x20field,\x20although\x20other\n\ + \x20fields\x20are\x20expected\x20to\x20be\x20present\x20in\x20most\x20ca\ + ses.\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x19\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\0\x05\x12\x03\x19\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\ + \x19\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x19\x1f\x20\n\xf7\x01\ + \n\x04\x04\x01\x02\x01\x12\x03\x20\x04\"\x1a\xe9\x01\x20The\x2032-bit\ + \x20ipv4\x20address,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\ + \x20IPv4\x20address\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resol\ + ved\x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20the\x20client\x20ma\ + y\x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20u\ + ntrusted,\x20or\x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\ + \x05\x04\x01\x02\x01\x04\x12\x03\x20\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\ + \x05\x12\x03\x20\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x20\x15\ + \x1d\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x20\x20!\n>\n\x04\x04\x01\ + \x02\x02\x12\x03#\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20\ + in\x20network\x20byte\x20order\n\n\x0c\n\x05\x04\x01\x02\x02\x04\x12\x03\ + #\x04\x0c\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03#\r\x12\n\x0c\n\x05\x04\ + \x01\x02\x02\x01\x12\x03#\x13\x1b\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\ + \x03#\x1e\x1f\n\x91\x01\n\x04\x04\x01\x02\x03\x12\x03)\x04\x1f\x1a\x83\ + \x01\x20The\x20Tapdance\x20station\x20public\x20key\x20to\x20use\x20when\ + \x20contacting\x20this\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20defaul\ + t\x20station\x20public\x20key\x20(if\x20any)\x20is\x20used.\n\n\x0c\n\ + \x05\x04\x01\x02\x03\x04\x12\x03)\x04\x0c\n\x0c\n\x05\x04\x01\x02\x03\ + \x06\x12\x03)\r\x13\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03)\x14\x1a\n\ + \x0c\n\x05\x04\x01\x02\x03\x03\x12\x03)\x1d\x1e\n\xee\x01\n\x04\x04\x01\ + \x02\x04\x12\x030\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20duration,\x20\ + in\x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connection\x20t\ + o\x20this\x20decoy\x20(because\x20the\x20decoy\x20may\x20close\x20the\n\ + \x20connection\x20itself\x20after\x20this\x20length\x20of\x20time)\n\n\ + \x20If\x20omitted,\x20a\x20default\x20of\x2030,000\x20milliseconds\x20is\ + \x20assumed.\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x030\x04\x0c\n\x0c\n\ + \x05\x04\x01\x02\x04\x05\x12\x030\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\ + \x12\x030\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x030\x1e\x1f\n\xb0\ + \x02\n\x04\x04\x01\x02\x05\x12\x039\x04\x1f\x1a\xa2\x02\x20The\x20maximu\ + m\x20TCP\x20window\x20size\x20to\x20attempt\x20to\x20use\x20for\x20this\ + \x20decoy.\n\n\x20If\x20omitted,\x20a\x20default\x20of\x2015360\x20is\ + \x20assumed.\n\n\x20TODO:\x20the\x20default\x20is\x20based\x20on\x20the\ + \x20current\x20heuristic\x20of\x20only\n\x20using\x20decoys\x20that\x20p\ + ermit\x20windows\x20of\x2015KB\x20or\x20larger.\x20\x20If\x20this\n\x20h\ + euristic\x20changes,\x20then\x20this\x20default\x20doesn't\x20make\x20se\ + nse.\n\n\x0c\n\x05\x04\x01\x02\x05\x04\x12\x039\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\x05\x05\x12\x039\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x039\ + \x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x039\x1d\x1e\n\x83\x08\n\ + \x02\x04\x02\x12\x04Q\0W\x012\xf6\x07\x20In\x20version\x201,\x20the\x20r\ + equest\x20is\x20very\x20simple:\x20when\n\x20the\x20client\x20sends\x20a\ + \x20MSG_PROTO\x20to\x20the\x20station,\x20if\x20the\n\x20generation\x20n\ + umber\x20is\x20present,\x20then\x20this\x20request\x20includes\n\x20(in\ + \x20addition\x20to\x20whatever\x20other\x20operations\x20are\x20part\x20\ + of\x20the\n\x20request)\x20a\x20request\x20for\x20the\x20station\x20to\ + \x20send\x20a\x20copy\x20of\n\x20the\x20current\x20decoy\x20set\x20that\ + \x20has\x20a\x20generation\x20number\x20greater\n\x20than\x20the\x20gene\ + ration\x20number\x20in\x20its\x20request.\n\n\x20If\x20the\x20response\ + \x20contains\x20a\x20DecoyListUpdate\x20with\x20a\x20generation\x20numbe\ + r\x20equal\n\x20to\x20that\x20which\x20the\x20client\x20sent,\x20then\ + \x20the\x20client\x20is\x20\"caught\x20up\"\x20with\n\x20the\x20station\ + \x20and\x20the\x20response\x20contains\x20no\x20new\x20information\n\x20\ + (and\x20all\x20other\x20fields\x20may\x20be\x20omitted\x20or\x20empty).\ + \x20\x20Otherwise,\n\x20the\x20station\x20will\x20send\x20the\x20latest\ + \x20configuration\x20information,\n\x20along\x20with\x20its\x20generatio\ + n\x20number.\n\n\x20The\x20station\x20can\x20also\x20send\x20ClientConf\ + \x20messages\n\x20(as\x20part\x20of\x20Station2Client\x20messages)\x20wh\ + enever\x20it\x20wants.\n\x20The\x20client\x20is\x20expected\x20to\x20rea\ + ct\x20as\x20if\x20it\x20had\x20requested\n\x20such\x20messages\x20--\x20\ + possibly\x20by\x20ignoring\x20them,\x20if\x20the\x20client\n\x20is\x20al\ + ready\x20up-to-date\x20according\x20to\x20the\x20generation\x20number.\n\ + \n\n\n\x03\x04\x02\x01\x12\x03Q\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\ + \x03R\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03R\x04\x0c\n\x0c\n\x05\ + \x04\x02\x02\0\x06\x12\x03R\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03R\ + \x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03R$%\n\x0b\n\x04\x04\x02\x02\ + \x01\x12\x03S\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03S\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\x01\x05\x12\x03S\r\x13\n\x0c\n\x05\x04\x02\x02\ + \x01\x01\x12\x03S\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03S!\"\n\ + \x0b\n\x04\x04\x02\x02\x02\x12\x03T\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\ + \x12\x03T\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03T\r\x13\n\x0c\n\ + \x05\x04\x02\x02\x02\x01\x12\x03T\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\ + \x12\x03T%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03U\x043\n\x0c\n\x05\x04\ + \x02\x02\x03\x04\x12\x03U\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\ + \x03U\r\x1c\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03U\x1d.\n\x0c\n\x05\ + \x04\x02\x02\x03\x03\x12\x03U12\n\x0b\n\x04\x04\x02\x02\x04\x12\x03V\x04\ + '\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\ + \x02\x04\x06\x12\x03V\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03V\x14\ + \"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03V%&\n\n\n\x02\x04\x03\x12\x04Y\ + \0[\x01\n\n\n\x03\x04\x03\x01\x12\x03Y\x08\x11\n\x0b\n\x04\x04\x03\x02\0\ + \x12\x03Z\x04)\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03Z\x04\x0c\n\x0c\n\ + \x05\x04\x03\x02\0\x06\x12\x03Z\r\x19\n\x0c\n\x05\x04\x03\x02\0\x01\x12\ + \x03Z\x1a$\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03Z'(\n\n\n\x02\x04\x04\ + \x12\x04]\0_\x01\n\n\n\x03\x04\x04\x01\x12\x03]\x08\x17\n\x0b\n\x04\x04\ + \x04\x02\0\x12\x03^\x04\x1f\n\x0c\n\x05\x04\x04\x02\0\x04\x12\x03^\x04\ + \x0c\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03^\r\x13\n\x0c\n\x05\x04\x04\ + \x02\0\x01\x12\x03^\x14\x1a\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03^\x1d\ + \x1e\n-\n\x02\x05\x01\x12\x04b\0l\x01\x1a!\x20State\x20transitions\x20of\ + \x20the\x20client\n\n\n\n\x03\x05\x01\x01\x12\x03b\x05\x13\n\x0b\n\x04\ + \x05\x01\x02\0\x12\x03c\x04\x16\n\x0c\n\x05\x05\x01\x02\0\x01\x12\x03c\ + \x04\x11\n\x0c\n\x05\x05\x01\x02\0\x02\x12\x03c\x14\x15\n\"\n\x04\x05\ + \x01\x02\x01\x12\x03d\x04\x19\"\x15\x20connect\x20me\x20to\x20squid\n\n\ + \x0c\n\x05\x05\x01\x02\x01\x01\x12\x03d\x04\x14\n\x0c\n\x05\x05\x01\x02\ + \x01\x02\x12\x03d\x17\x18\n,\n\x04\x05\x01\x02\x02\x12\x03e\x04!\"\x1f\ + \x20connect\x20me\x20to\x20provided\x20covert\n\n\x0c\n\x05\x05\x01\x02\ + \x02\x01\x12\x03e\x04\x1b\n\x0c\n\x05\x05\x01\x02\x02\x02\x12\x03e\x1e\ + \x20\n\x0b\n\x04\x05\x01\x02\x03\x12\x03f\x04\x1d\n\x0c\n\x05\x05\x01\ + \x02\x03\x01\x12\x03f\x04\x18\n\x0c\n\x05\x05\x01\x02\x03\x02\x12\x03f\ + \x1b\x1c\n\x0b\n\x04\x05\x01\x02\x04\x12\x03g\x04\x1a\n\x0c\n\x05\x05\ + \x01\x02\x04\x01\x12\x03g\x04\x15\n\x0c\n\x05\x05\x01\x02\x04\x02\x12\ + \x03g\x18\x19\n\x0b\n\x04\x05\x01\x02\x05\x12\x03h\x04\x19\n\x0c\n\x05\ + \x05\x01\x02\x05\x01\x12\x03h\x04\x14\n\x0c\n\x05\x05\x01\x02\x05\x02\ + \x12\x03h\x17\x18\n\x0b\n\x04\x05\x01\x02\x06\x12\x03i\x04\x1b\n\x0c\n\ + \x05\x05\x01\x02\x06\x01\x12\x03i\x04\x16\n\x0c\n\x05\x05\x01\x02\x06\ + \x02\x12\x03i\x19\x1a\n\x0b\n\x04\x05\x01\x02\x07\x12\x03j\x04%\n\x0c\n\ + \x05\x05\x01\x02\x07\x01\x12\x03j\x04\x20\n\x0c\n\x05\x05\x01\x02\x07\ + \x02\x12\x03j#$\n\x0b\n\x04\x05\x01\x02\x08\x12\x03k\x04\x14\n\x0c\n\x05\ + \x05\x01\x02\x08\x01\x12\x03k\x04\r\n\x0c\n\x05\x05\x01\x02\x08\x02\x12\ + \x03k\x10\x13\n-\n\x02\x05\x02\x12\x04o\0w\x01\x1a!\x20State\x20transiti\ + ons\x20of\x20the\x20server\n\n\n\n\x03\x05\x02\x01\x12\x03o\x05\x13\n\ + \x0b\n\x04\x05\x02\x02\0\x12\x03p\x04\x16\n\x0c\n\x05\x05\x02\x02\0\x01\ + \x12\x03p\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\x03p\x14\x15\n!\n\ + \x04\x05\x02\x02\x01\x12\x03q\x04\x19\"\x14\x20connected\x20to\x20squid\ + \n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03q\x04\x14\n\x0c\n\x05\x05\x02\ + \x02\x01\x02\x12\x03q\x17\x18\n'\n\x04\x05\x02\x02\x02\x12\x03r\x04!\"\ + \x1a\x20connected\x20to\x20covert\x20host\n\n\x0c\n\x05\x05\x02\x02\x02\ + \x01\x12\x03r\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\x12\x03r\x1e\x20\n\ + \x0b\n\x04\x05\x02\x02\x03\x12\x03s\x04\x1e\n\x0c\n\x05\x05\x02\x02\x03\ + \x01\x12\x03s\x04\x19\n\x0c\n\x05\x05\x02\x02\x03\x02\x12\x03s\x1c\x1d\n\ + \x0b\n\x04\x05\x02\x02\x04\x12\x03t\x04\x1a\n\x0c\n\x05\x05\x02\x02\x04\ + \x01\x12\x03t\x04\x15\n\x0c\n\x05\x05\x02\x02\x04\x02\x12\x03t\x18\x19\n\ + R\n\x04\x05\x02\x02\x05\x12\x03v\x04\x14\x1aE\x20TODO\x20should\x20proba\ + bly\x20also\x20allow\x20EXPECT_RECONNECT\x20here,\x20for\x20DittoTap\n\n\ + \x0c\n\x05\x05\x02\x02\x05\x01\x12\x03v\x04\r\n\x0c\n\x05\x05\x02\x02\ + \x05\x02\x12\x03v\x10\x13\n7\n\x02\x05\x03\x12\x05z\0\x84\x01\x01\x1a*\ + \x20Should\x20accompany\x20all\x20S2C_ERROR\x20messages.\n\n\n\n\x03\x05\ + \x03\x01\x12\x03z\x05\x13\n\x0b\n\x04\x05\x03\x02\0\x12\x03{\x04\x11\n\ + \x0c\n\x05\x05\x03\x02\0\x01\x12\x03{\x04\x0c\n\x0c\n\x05\x05\x03\x02\0\ + \x02\x12\x03{\x0f\x10\n)\n\x04\x05\x03\x02\x01\x12\x03|\x04\x16\"\x1c\ + \x20Squid\x20TCP\x20connection\x20broke\n\n\x0c\n\x05\x05\x03\x02\x01\ + \x01\x12\x03|\x04\x11\n\x0c\n\x05\x05\x03\x02\x01\x02\x12\x03|\x14\x15\n\ + 6\n\x04\x05\x03\x02\x02\x12\x03}\x04\x18\")\x20You\x20told\x20me\x20some\ + thing\x20was\x20wrong,\x20client\n\n\x0c\n\x05\x05\x03\x02\x02\x01\x12\ + \x03}\x04\x13\n\x0c\n\x05\x05\x03\x02\x02\x02\x12\x03}\x16\x17\n?\n\x04\ + \x05\x03\x02\x03\x12\x03~\x04\x18\"2\x20You\x20messed\x20up,\x20client\ + \x20(e.g.\x20sent\x20a\x20bad\x20protobuf)\n\n\x0c\n\x05\x05\x03\x02\x03\ + \x01\x12\x03~\x04\x13\n\x0c\n\x05\x05\x03\x02\x03\x02\x12\x03~\x16\x17\n\ + \x16\n\x04\x05\x03\x02\x04\x12\x03\x7f\x04\x19\"\t\x20I\x20broke\n\n\x0c\ + \n\x05\x05\x03\x02\x04\x01\x12\x03\x7f\x04\x14\n\x0c\n\x05\x05\x03\x02\ + \x04\x02\x12\x03\x7f\x17\x18\nE\n\x04\x05\x03\x02\x05\x12\x04\x80\x01\ + \x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\x20use\x20this\x20d\ + ecoy\x20right\x20now\n\n\r\n\x05\x05\x03\x02\x05\x01\x12\x04\x80\x01\x04\ + \x12\n\r\n\x05\x05\x03\x02\x05\x02\x12\x04\x80\x01\x15\x16\nD\n\x04\x05\ + \x03\x02\x06\x12\x04\x82\x01\x04\x18\"6\x20My\x20stream\x20to\x20you\x20\ + broke.\x20(This\x20is\x20impossible\x20to\x20send)\n\n\r\n\x05\x05\x03\ + \x02\x06\x01\x12\x04\x82\x01\x04\x11\n\r\n\x05\x05\x03\x02\x06\x02\x12\ + \x04\x82\x01\x14\x17\nA\n\x04\x05\x03\x02\x07\x12\x04\x83\x01\x04\x19\"3\ + \x20You\x20never\x20came\x20back.\x20(This\x20is\x20impossible\x20to\x20\ + send)\n\n\r\n\x05\x05\x03\x02\x07\x01\x12\x04\x83\x01\x04\x12\n\r\n\x05\ + \x05\x03\x02\x07\x02\x12\x04\x83\x01\x15\x18\n\x0c\n\x02\x05\x04\x12\x06\ + \x86\x01\0\x8a\x01\x01\n\x0b\n\x03\x05\x04\x01\x12\x04\x86\x01\x05\x12\n\ + \x0c\n\x04\x05\x04\x02\0\x12\x04\x87\x01\x04\x16\n\r\n\x05\x05\x04\x02\0\ + \x01\x12\x04\x87\x01\x04\x11\n\r\n\x05\x05\x04\x02\0\x02\x12\x04\x87\x01\ + \x14\x15\n`\n\x04\x05\x04\x02\x01\x12\x04\x88\x01\x04\x15\"R\x20Send\x20\ + a\x2032-byte\x20HMAC\x20id\x20to\x20let\x20the\x20station\x20distinguish\ + \x20registrations\x20to\x20same\x20host\n\n\r\n\x05\x05\x04\x02\x01\x01\ + \x12\x04\x88\x01\x04\x10\n\r\n\x05\x05\x04\x02\x01\x02\x12\x04\x88\x01\ + \x13\x14\n$\n\x04\x05\x04\x02\x02\x12\x04\x89\x01\x04\x17\"\x16\x20Not\ + \x20implemented\x20yet?\n\n\r\n\x05\x05\x04\x02\x02\x01\x12\x04\x89\x01\ + \x04\x12\n\r\n\x05\x05\x04\x02\x02\x02\x12\x04\x89\x01\x15\x16\n\x0c\n\ + \x02\x04\x05\x12\x06\x8c\x01\0\xa3\x01\x01\n\x0b\n\x03\x04\x05\x01\x12\ + \x04\x8c\x01\x08\x17\nO\n\x04\x04\x05\x02\0\x12\x04\x8e\x01\x04)\x1aA\ + \x20Should\x20accompany\x20(at\x20least)\x20SESSION_INIT\x20and\x20CONFI\ + RM_RECONNECT.\n\n\r\n\x05\x04\x05\x02\0\x04\x12\x04\x8e\x01\x04\x0c\n\r\ + \n\x05\x04\x05\x02\0\x05\x12\x04\x8e\x01\r\x13\n\r\n\x05\x04\x05\x02\0\ + \x01\x12\x04\x8e\x01\x14$\n\r\n\x05\x04\x05\x02\0\x03\x12\x04\x8e\x01'(\ + \nv\n\x04\x04\x05\x02\x01\x12\x04\x92\x01\x041\x1ah\x20There\x20might\ + \x20be\x20a\x20state\x20transition.\x20May\x20be\x20absent;\x20absence\ + \x20should\x20be\n\x20treated\x20identically\x20to\x20NO_CHANGE.\n\n\r\n\ + \x05\x04\x05\x02\x01\x04\x12\x04\x92\x01\x04\x0c\n\r\n\x05\x04\x05\x02\ + \x01\x06\x12\x04\x92\x01\r\x1b\n\r\n\x05\x04\x05\x02\x01\x01\x12\x04\x92\ + \x01\x1c,\n\r\n\x05\x04\x05\x02\x01\x03\x12\x04\x92\x01/0\nc\n\x04\x04\ + \x05\x02\x02\x12\x04\x96\x01\x04(\x1aU\x20The\x20station\x20can\x20send\ + \x20client\x20config\x20info\x20piggybacked\n\x20on\x20any\x20message,\ + \x20as\x20it\x20sees\x20fit\n\n\r\n\x05\x04\x05\x02\x02\x04\x12\x04\x96\ + \x01\x04\x0c\n\r\n\x05\x04\x05\x02\x02\x06\x12\x04\x96\x01\r\x17\n\r\n\ + \x05\x04\x05\x02\x02\x01\x12\x04\x96\x01\x18#\n\r\n\x05\x04\x05\x02\x02\ + \x03\x12\x04\x96\x01&'\nP\n\x04\x04\x05\x02\x03\x12\x04\x99\x01\x04+\x1a\ + B\x20If\x20state_transition\x20==\x20S2C_ERROR,\x20this\x20field\x20is\ + \x20the\x20explanation.\n\n\r\n\x05\x04\x05\x02\x03\x04\x12\x04\x99\x01\ + \x04\x0c\n\r\n\x05\x04\x05\x02\x03\x06\x12\x04\x99\x01\r\x1b\n\r\n\x05\ + \x04\x05\x02\x03\x01\x12\x04\x99\x01\x1c&\n\r\n\x05\x04\x05\x02\x03\x03\ + \x12\x04\x99\x01)*\nQ\n\x04\x04\x05\x02\x04\x12\x04\x9c\x01\x04$\x1aC\ + \x20Signals\x20client\x20to\x20stop\x20connecting\x20for\x20following\ + \x20amount\x20of\x20seconds\n\n\r\n\x05\x04\x05\x02\x04\x04\x12\x04\x9c\ + \x01\x04\x0c\n\r\n\x05\x04\x05\x02\x04\x05\x12\x04\x9c\x01\r\x13\n\r\n\ + \x05\x04\x05\x02\x04\x01\x12\x04\x9c\x01\x14\x1f\n\r\n\x05\x04\x05\x02\ + \x04\x03\x12\x04\x9c\x01\"#\nK\n\x04\x04\x05\x02\x05\x12\x04\x9f\x01\x04\ + #\x1a=\x20Sent\x20in\x20SESSION_INIT,\x20identifies\x20the\x20station\ + \x20that\x20picked\x20up\n\n\r\n\x05\x04\x05\x02\x05\x04\x12\x04\x9f\x01\ + \x04\x0c\n\r\n\x05\x04\x05\x02\x05\x05\x12\x04\x9f\x01\r\x13\n\r\n\x05\ + \x04\x05\x02\x05\x01\x12\x04\x9f\x01\x14\x1e\n\r\n\x05\x04\x05\x02\x05\ + \x03\x12\x04\x9f\x01!\"\nG\n\x04\x04\x05\x02\x06\x12\x04\xa2\x01\x04!\ + \x1a9\x20Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20finge\ + rprinting.\n\n\r\n\x05\x04\x05\x02\x06\x04\x12\x04\xa2\x01\x04\x0c\n\r\n\ + \x05\x04\x05\x02\x06\x05\x12\x04\xa2\x01\r\x12\n\r\n\x05\x04\x05\x02\x06\ + \x01\x12\x04\xa2\x01\x13\x1a\n\r\n\x05\x04\x05\x02\x06\x03\x12\x04\xa2\ + \x01\x1d\x20\n\x0c\n\x02\x04\x06\x12\x06\xa5\x01\0\xaa\x01\x01\n\x0b\n\ + \x03\x04\x06\x01\x12\x04\xa5\x01\x08\x19\n\x0c\n\x04\x04\x06\x02\0\x12\ + \x04\xa6\x01\x08&\n\r\n\x05\x04\x06\x02\0\x04\x12\x04\xa6\x01\x08\x10\n\ + \r\n\x05\x04\x06\x02\0\x05\x12\x04\xa6\x01\x11\x15\n\r\n\x05\x04\x06\x02\ + \0\x01\x12\x04\xa6\x01\x16!\n\r\n\x05\x04\x06\x02\0\x03\x12\x04\xa6\x01$\ + %\n\x0c\n\x04\x04\x06\x02\x01\x12\x04\xa7\x01\x08%\n\r\n\x05\x04\x06\x02\ + \x01\x04\x12\x04\xa7\x01\x08\x10\n\r\n\x05\x04\x06\x02\x01\x05\x12\x04\ + \xa7\x01\x11\x15\n\r\n\x05\x04\x06\x02\x01\x01\x12\x04\xa7\x01\x16\x20\n\ + \r\n\x05\x04\x06\x02\x01\x03\x12\x04\xa7\x01#$\n\x0c\n\x04\x04\x06\x02\ + \x02\x12\x04\xa8\x01\x08'\n\r\n\x05\x04\x06\x02\x02\x04\x12\x04\xa8\x01\ + \x08\x10\n\r\n\x05\x04\x06\x02\x02\x05\x12\x04\xa8\x01\x11\x15\n\r\n\x05\ + \x04\x06\x02\x02\x01\x12\x04\xa8\x01\x16\"\n\r\n\x05\x04\x06\x02\x02\x03\ + \x12\x04\xa8\x01%&\n\x0c\n\x04\x04\x06\x02\x03\x12\x04\xa9\x01\x08\"\n\r\ + \n\x05\x04\x06\x02\x03\x04\x12\x04\xa9\x01\x08\x10\n\r\n\x05\x04\x06\x02\ + \x03\x05\x12\x04\xa9\x01\x11\x15\n\r\n\x05\x04\x06\x02\x03\x01\x12\x04\ + \xa9\x01\x16\x1d\n\r\n\x05\x04\x06\x02\x03\x03\x12\x04\xa9\x01\x20!\n\ + \x0c\n\x02\x04\x07\x12\x06\xac\x01\0\xd8\x01\x01\n\x0b\n\x03\x04\x07\x01\ + \x12\x04\xac\x01\x08\x17\n\x0c\n\x04\x04\x07\x02\0\x12\x04\xad\x01\x04)\ + \n\r\n\x05\x04\x07\x02\0\x04\x12\x04\xad\x01\x04\x0c\n\r\n\x05\x04\x07\ + \x02\0\x05\x12\x04\xad\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xad\ + \x01\x14$\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xad\x01'(\n\xd0\x01\n\x04\ + \x04\x07\x02\x01\x12\x04\xb2\x01\x04.\x1a\xc1\x01\x20The\x20client\x20re\ + ports\x20its\x20decoy\x20list's\x20version\x20number\x20here,\x20which\ + \x20the\n\x20station\x20can\x20use\x20to\x20decide\x20whether\x20to\x20s\ + end\x20an\x20updated\x20one.\x20The\x20station\n\x20should\x20always\x20\ + send\x20a\x20list\x20if\x20this\x20field\x20is\x20set\x20to\x200.\n\n\r\ + \n\x05\x04\x07\x02\x01\x04\x12\x04\xb2\x01\x04\x0c\n\r\n\x05\x04\x07\x02\ + \x01\x05\x12\x04\xb2\x01\r\x13\n\r\n\x05\x04\x07\x02\x01\x01\x12\x04\xb2\ + \x01\x14)\n\r\n\x05\x04\x07\x02\x01\x03\x12\x04\xb2\x01,-\n\x0c\n\x04\ + \x04\x07\x02\x02\x12\x04\xb4\x01\x041\n\r\n\x05\x04\x07\x02\x02\x04\x12\ + \x04\xb4\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x02\x06\x12\x04\xb4\x01\r\x1b\ + \n\r\n\x05\x04\x07\x02\x02\x01\x12\x04\xb4\x01\x1c,\n\r\n\x05\x04\x07\ + \x02\x02\x03\x12\x04\xb4\x01/0\n\x80\x01\n\x04\x04\x07\x02\x03\x12\x04\ + \xb8\x01\x04$\x1ar\x20The\x20position\x20in\x20the\x20overall\x20session\ 's\x20upload\x20sequence\x20where\x20the\x20current\n\x20YIELD=>ACQUIRE\ - \x20switchover\x20is\x20happening.\n\n\r\n\x05\x04\x06\x02\x03\x04\x12\ - \x04\xaa\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x03\x05\x12\x04\xaa\x01\r\x13\ - \n\r\n\x05\x04\x06\x02\x03\x01\x12\x04\xaa\x01\x14\x1f\n\r\n\x05\x04\x06\ - \x02\x03\x03\x12\x04\xaa\x01\"#\nq\n\x04\x04\x06\x02\x04\x12\x04\xaf\x01\ + \x20switchover\x20is\x20happening.\n\n\r\n\x05\x04\x07\x02\x03\x04\x12\ + \x04\xb8\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x03\x05\x12\x04\xb8\x01\r\x13\ + \n\r\n\x05\x04\x07\x02\x03\x01\x12\x04\xb8\x01\x14\x1f\n\r\n\x05\x04\x07\ + \x02\x03\x03\x12\x04\xb8\x01\"#\nq\n\x04\x04\x07\x02\x04\x12\x04\xbd\x01\ \x04'\x1ac\x20List\x20of\x20decoys\x20that\x20client\x20have\x20unsucces\ sfully\x20tried\x20in\x20current\x20session.\n\x20Could\x20be\x20sent\ - \x20in\x20chunks\n\n\r\n\x05\x04\x06\x02\x04\x04\x12\x04\xaf\x01\x04\x0c\ - \n\r\n\x05\x04\x06\x02\x04\x05\x12\x04\xaf\x01\r\x13\n\r\n\x05\x04\x06\ - \x02\x04\x01\x12\x04\xaf\x01\x14!\n\r\n\x05\x04\x06\x02\x04\x03\x12\x04\ - \xaf\x01$&\n\x0c\n\x04\x04\x06\x02\x05\x12\x04\xb1\x01\x04%\n\r\n\x05\ - \x04\x06\x02\x05\x04\x12\x04\xb1\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x05\ - \x06\x12\x04\xb1\x01\r\x19\n\r\n\x05\x04\x06\x02\x05\x01\x12\x04\xb1\x01\ - \x1a\x1f\n\r\n\x05\x04\x06\x02\x05\x03\x12\x04\xb1\x01\"$\n\xc8\x03\n\ - \x04\x04\x06\x02\x06\x12\x04\xb9\x01\x04(\x1a\xb9\x03\x20Station\x20is\ - \x20only\x20required\x20to\x20check\x20this\x20variable\x20during\x20ses\ - sion\x20initialization.\n\x20If\x20set,\x20station\x20must\x20facilitate\ - \x20connection\x20to\x20said\x20target\x20by\x20itself,\x20i.e.\x20write\ - \x20into\x20squid\n\x20socket\x20an\x20HTTP/SOCKS/any\x20other\x20connec\ - tion\x20request.\n\x20covert_address\x20must\x20have\x20exactly\x20one\ - \x20':'\x20colon,\x20that\x20separates\x20host\x20(literal\x20IP\x20addr\ - ess\x20or\n\x20resolvable\x20hostname)\x20and\x20port\n\x20TODO:\x20make\ - \x20it\x20required\x20for\x20initialization,\x20and\x20stop\x20connectin\ - g\x20any\x20client\x20straight\x20to\x20squid?\n\n\r\n\x05\x04\x06\x02\ - \x06\x04\x12\x04\xb9\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x06\x05\x12\x04\ - \xb9\x01\r\x13\n\r\n\x05\x04\x06\x02\x06\x01\x12\x04\xb9\x01\x14\"\n\r\n\ - \x05\x04\x06\x02\x06\x03\x12\x04\xb9\x01%'\nR\n\x04\x04\x06\x02\x07\x12\ - \x04\xbc\x01\x042\x1aD\x20Used\x20in\x20dark\x20decoys\x20to\x20signal\ - \x20which\x20dark\x20decoy\x20it\x20will\x20connect\x20to.\n\n\r\n\x05\ - \x04\x06\x02\x07\x04\x12\x04\xbc\x01\x04\x0c\n\r\n\x05\x04\x06\x02\x07\ - \x05\x12\x04\xbc\x01\r\x13\n\r\n\x05\x04\x06\x02\x07\x01\x12\x04\xbc\x01\ - \x14,\n\r\n\x05\x04\x06\x02\x07\x03\x12\x04\xbc\x01/1\nR\n\x04\x04\x06\ - \x02\x08\x12\x04\xbf\x01\x04\"\x1aD\x20Used\x20to\x20indicate\x20to\x20s\ - erver\x20if\x20client\x20is\x20registering\x20v4,\x20v6\x20or\x20both\n\ - \n\r\n\x05\x04\x06\x02\x08\x04\x12\x04\xbf\x01\x04\x0c\n\r\n\x05\x04\x06\ - \x02\x08\x05\x12\x04\xbf\x01\r\x11\n\r\n\x05\x04\x06\x02\x08\x01\x12\x04\ - \xbf\x01\x12\x1c\n\r\n\x05\x04\x06\x02\x08\x03\x12\x04\xbf\x01\x1f!\n\ - \x0c\n\x04\x04\x06\x02\t\x12\x04\xc0\x01\x04\"\n\r\n\x05\x04\x06\x02\t\ - \x04\x12\x04\xc0\x01\x04\x0c\n\r\n\x05\x04\x06\x02\t\x05\x12\x04\xc0\x01\ - \r\x11\n\r\n\x05\x04\x06\x02\t\x01\x12\x04\xc0\x01\x12\x1c\n\r\n\x05\x04\ - \x06\x02\t\x03\x12\x04\xc0\x01\x1f!\nI\n\x04\x04\x06\x02\n\x12\x04\xc3\ - \x01\x04'\x1a;\x20Protocol\x20Type\x20->\x20protocol\x20used\x20in\x20cl\ - ient\x20to\x20proxy\x20station\n\n\r\n\x05\x04\x06\x02\n\x04\x12\x04\xc3\ - \x01\x04\x0c\n\r\n\x05\x04\x06\x02\n\x05\x12\x04\xc3\x01\r\x13\n\r\n\x05\ - \x04\x06\x02\n\x01\x12\x04\xc3\x01\x14!\n\r\n\x05\x04\x06\x02\n\x03\x12\ - \x04\xc3\x01$&\nG\n\x04\x04\x06\x02\x0b\x12\x04\xc6\x01\x04!\x1a9\x20Ran\ - dom-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprinting.\n\ - \n\r\n\x05\x04\x06\x02\x0b\x04\x12\x04\xc6\x01\x04\x0c\n\r\n\x05\x04\x06\ - \x02\x0b\x05\x12\x04\xc6\x01\r\x12\n\r\n\x05\x04\x06\x02\x0b\x01\x12\x04\ - \xc6\x01\x13\x1a\n\r\n\x05\x04\x06\x02\x0b\x03\x12\x04\xc6\x01\x1d\x20\n\ - \x0c\n\x02\x04\x07\x12\x06\xc9\x01\0\xd5\x01\x01\n\x0b\n\x03\x04\x07\x01\ - \x12\x04\xc9\x01\x08\x14\n9\n\x04\x04\x07\x02\0\x12\x04\xca\x01\x04.\"+\ - \x20how\x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\ - \x05\x04\x07\x02\0\x04\x12\x04\xca\x01\x04\x0c\n\r\n\x05\x04\x07\x02\0\ - \x05\x12\x04\xca\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xca\x01\ - \x14(\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xca\x01+-\nm\n\x04\x04\x07\x02\ - \x01\x12\x04\xcf\x01\x04/\x1a\x1e\x20Applicable\x20to\x20whole\x20sessio\ - n:\n\"\x1a\x20includes\x20failed\x20attempts\n2#\x20Timings\x20below\x20\ - are\x20in\x20milliseconds\n\n\r\n\x05\x04\x07\x02\x01\x04\x12\x04\xcf\ - \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x01\x05\x12\x04\xcf\x01\r\x13\n\r\n\ - \x05\x04\x07\x02\x01\x01\x12\x04\xcf\x01\x14)\n\r\n\x05\x04\x07\x02\x01\ - \x03\x12\x04\xcf\x01,.\nR\n\x04\x04\x07\x02\x02\x12\x04\xd2\x01\x04(\x1a\ - \x1f\x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20durin\ - g\x20initial\x20handshake\n\n\r\n\x05\x04\x07\x02\x02\x04\x12\x04\xd2\ - \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x02\x05\x12\x04\xd2\x01\r\x13\n\r\n\ - \x05\x04\x07\x02\x02\x01\x12\x04\xd2\x01\x14\"\n\r\n\x05\x04\x07\x02\x02\ - \x03\x12\x04\xd2\x01%'\n%\n\x04\x04\x07\x02\x03\x12\x04\xd3\x01\x04&\"\ - \x17\x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x07\x02\x03\x04\ - \x12\x04\xd3\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x03\x05\x12\x04\xd3\x01\r\ - \x13\n\r\n\x05\x04\x07\x02\x03\x01\x12\x04\xd3\x01\x14\x20\n\r\n\x05\x04\ - \x07\x02\x03\x03\x12\x04\xd3\x01#%\nB\n\x04\x04\x07\x02\x04\x12\x04\xd4\ - \x01\x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\ - \x20to\x20decot\n\n\r\n\x05\x04\x07\x02\x04\x04\x12\x04\xd4\x01\x04\x0c\ - \n\r\n\x05\x04\x07\x02\x04\x05\x12\x04\xd4\x01\r\x13\n\r\n\x05\x04\x07\ - \x02\x04\x01\x12\x04\xd4\x01\x14\x20\n\r\n\x05\x04\x07\x02\x04\x03\x12\ - \x04\xd4\x01#%\ + \x20in\x20chunks\n\n\r\n\x05\x04\x07\x02\x04\x04\x12\x04\xbd\x01\x04\x0c\ + \n\r\n\x05\x04\x07\x02\x04\x05\x12\x04\xbd\x01\r\x13\n\r\n\x05\x04\x07\ + \x02\x04\x01\x12\x04\xbd\x01\x14!\n\r\n\x05\x04\x07\x02\x04\x03\x12\x04\ + \xbd\x01$&\n\x0c\n\x04\x04\x07\x02\x05\x12\x04\xbf\x01\x04%\n\r\n\x05\ + \x04\x07\x02\x05\x04\x12\x04\xbf\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x05\ + \x06\x12\x04\xbf\x01\r\x19\n\r\n\x05\x04\x07\x02\x05\x01\x12\x04\xbf\x01\ + \x1a\x1f\n\r\n\x05\x04\x07\x02\x05\x03\x12\x04\xbf\x01\"$\nk\n\x04\x04\ + \x07\x02\x06\x12\x04\xc2\x01\x04*\x1a]\x20NullTransport,\x20MinTransport\ + ,\x20Obfs4Transport,\x20etc.\x20Transport\x20type\x20we\x20want\x20from\ + \x20phantom\x20proxy\n\n\r\n\x05\x04\x07\x02\x06\x04\x12\x04\xc2\x01\x04\ + \x0c\n\r\n\x05\x04\x07\x02\x06\x06\x12\x04\xc2\x01\r\x1a\n\r\n\x05\x04\ + \x07\x02\x06\x01\x12\x04\xc2\x01\x1b$\n\r\n\x05\x04\x07\x02\x06\x03\x12\ + \x04\xc2\x01')\n\xc8\x03\n\x04\x04\x07\x02\x07\x12\x04\xca\x01\x04(\x1a\ + \xb9\x03\x20Station\x20is\x20only\x20required\x20to\x20check\x20this\x20\ + variable\x20during\x20session\x20initialization.\n\x20If\x20set,\x20stat\ + ion\x20must\x20facilitate\x20connection\x20to\x20said\x20target\x20by\ + \x20itself,\x20i.e.\x20write\x20into\x20squid\n\x20socket\x20an\x20HTTP/\ + SOCKS/any\x20other\x20connection\x20request.\n\x20covert_address\x20must\ + \x20have\x20exactly\x20one\x20':'\x20colon,\x20that\x20separates\x20host\ + \x20(literal\x20IP\x20address\x20or\n\x20resolvable\x20hostname)\x20and\ + \x20port\n\x20TODO:\x20make\x20it\x20required\x20for\x20initialization,\ + \x20and\x20stop\x20connecting\x20any\x20client\x20straight\x20to\x20squi\ + d?\n\n\r\n\x05\x04\x07\x02\x07\x04\x12\x04\xca\x01\x04\x0c\n\r\n\x05\x04\ + \x07\x02\x07\x05\x12\x04\xca\x01\r\x13\n\r\n\x05\x04\x07\x02\x07\x01\x12\ + \x04\xca\x01\x14\"\n\r\n\x05\x04\x07\x02\x07\x03\x12\x04\xca\x01%'\nR\n\ + \x04\x04\x07\x02\x08\x12\x04\xcd\x01\x042\x1aD\x20Used\x20in\x20dark\x20\ + decoys\x20to\x20signal\x20which\x20dark\x20decoy\x20it\x20will\x20connec\ + t\x20to.\n\n\r\n\x05\x04\x07\x02\x08\x04\x12\x04\xcd\x01\x04\x0c\n\r\n\ + \x05\x04\x07\x02\x08\x05\x12\x04\xcd\x01\r\x13\n\r\n\x05\x04\x07\x02\x08\ + \x01\x12\x04\xcd\x01\x14,\n\r\n\x05\x04\x07\x02\x08\x03\x12\x04\xcd\x01/\ + 1\nR\n\x04\x04\x07\x02\t\x12\x04\xd0\x01\x04\"\x1aD\x20Used\x20to\x20ind\ + icate\x20to\x20server\x20if\x20client\x20is\x20registering\x20v4,\x20v6\ + \x20or\x20both\n\n\r\n\x05\x04\x07\x02\t\x04\x12\x04\xd0\x01\x04\x0c\n\r\ + \n\x05\x04\x07\x02\t\x05\x12\x04\xd0\x01\r\x11\n\r\n\x05\x04\x07\x02\t\ + \x01\x12\x04\xd0\x01\x12\x1c\n\r\n\x05\x04\x07\x02\t\x03\x12\x04\xd0\x01\ + \x1f!\n\x0c\n\x04\x04\x07\x02\n\x12\x04\xd1\x01\x04\"\n\r\n\x05\x04\x07\ + \x02\n\x04\x12\x04\xd1\x01\x04\x0c\n\r\n\x05\x04\x07\x02\n\x05\x12\x04\ + \xd1\x01\r\x11\n\r\n\x05\x04\x07\x02\n\x01\x12\x04\xd1\x01\x12\x1c\n\r\n\ + \x05\x04\x07\x02\n\x03\x12\x04\xd1\x01\x1f!\nD\n\x04\x04\x07\x02\x0b\x12\ + \x04\xd4\x01\x08.\x1a6\x20A\x20collection\x20of\x20optional\x20flags\x20\ + for\x20the\x20registration.\n\n\r\n\x05\x04\x07\x02\x0b\x04\x12\x04\xd4\ + \x01\x08\x10\n\r\n\x05\x04\x07\x02\x0b\x06\x12\x04\xd4\x01\x11\"\n\r\n\ + \x05\x04\x07\x02\x0b\x01\x12\x04\xd4\x01#(\n\r\n\x05\x04\x07\x02\x0b\x03\ + \x12\x04\xd4\x01+-\nG\n\x04\x04\x07\x02\x0c\x12\x04\xd7\x01\x04!\x1a9\ + \x20Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprin\ + ting.\n\n\r\n\x05\x04\x07\x02\x0c\x04\x12\x04\xd7\x01\x04\x0c\n\r\n\x05\ + \x04\x07\x02\x0c\x05\x12\x04\xd7\x01\r\x12\n\r\n\x05\x04\x07\x02\x0c\x01\ + \x12\x04\xd7\x01\x13\x1a\n\r\n\x05\x04\x07\x02\x0c\x03\x12\x04\xd7\x01\ + \x1d\x20\n\xbe\x01\n\x02\x04\x08\x12\x06\xdc\x01\0\xe2\x01\x01\x1a\xaf\ + \x01\x20Message\x20type\x20used\x20as\x20the\x20request\x20body\x20when\ + \x20registering\x20via\x20the\x20HTTP\x20API.\n\x20This\x20message\x20is\ + \x20assumed\x20to\x20be\x20sent\x20via\x20TLS,\x20meaning\x20that\x20sen\ + ding\x20the\x20secret\x20outright\x20is\x20acceptable.\n\n\x0b\n\x03\x04\ + \x08\x01\x12\x04\xdc\x01\x08\x13\nN\n\x04\x04\x08\x02\0\x12\x04\xde\x01\ + \x04\x1e\x1a@\x20The\x20secret\x20that\x20will\x20be\x20used\x20when\x20\ + forming\x20phantom\x20connections.\n\n\r\n\x05\x04\x08\x02\0\x04\x12\x04\ + \xde\x01\x04\x0c\n\r\n\x05\x04\x08\x02\0\x05\x12\x04\xde\x01\r\x12\n\r\n\ + \x05\x04\x08\x02\0\x01\x12\x04\xde\x01\x13\x19\n\r\n\x05\x04\x08\x02\0\ + \x03\x12\x04\xde\x01\x1c\x1d\nU\n\x04\x04\x08\x02\x01\x12\x04\xe1\x01\ + \x046\x1aG\x20The\x20ClientToStation\x20payload;\x20the\x20same\x20as\ + \x20used\x20in\x20decoy\x20registrations.\n\n\r\n\x05\x04\x08\x02\x01\ + \x04\x12\x04\xe1\x01\x04\x0c\n\r\n\x05\x04\x08\x02\x01\x06\x12\x04\xe1\ + \x01\r\x1c\n\r\n\x05\x04\x08\x02\x01\x01\x12\x04\xe1\x01\x1d1\n\r\n\x05\ + \x04\x08\x02\x01\x03\x12\x04\xe1\x0145\n\x0c\n\x02\x04\t\x12\x06\xe4\x01\ + \0\xe7\x01\x01\n\x0b\n\x03\x04\t\x01\x12\x04\xe4\x01\x08\x12\n\x0c\n\x04\ + \x04\t\x02\0\x12\x04\xe5\x01\x08)\n\r\n\x05\x04\t\x02\0\x04\x12\x04\xe5\ + \x01\x08\x10\n\r\n\x05\x04\t\x02\0\x05\x12\x04\xe5\x01\x11\x16\n\r\n\x05\ + \x04\t\x02\0\x01\x12\x04\xe5\x01\x17$\n\r\n\x05\x04\t\x02\0\x03\x12\x04\ + \xe5\x01'(\n\x0c\n\x04\x04\t\x02\x01\x12\x04\xe6\x01\x08:\n\r\n\x05\x04\ + \t\x02\x01\x04\x12\x04\xe6\x01\x08\x10\n\r\n\x05\x04\t\x02\x01\x06\x12\ + \x04\xe6\x01\x11\x20\n\r\n\x05\x04\t\x02\x01\x01\x12\x04\xe6\x01!5\n\r\n\ + \x05\x04\t\x02\x01\x03\x12\x04\xe6\x0189\n\x0c\n\x02\x04\n\x12\x06\xe9\ + \x01\0\xf5\x01\x01\n\x0b\n\x03\x04\n\x01\x12\x04\xe9\x01\x08\x14\n9\n\ + \x04\x04\n\x02\0\x12\x04\xea\x01\x04.\"+\x20how\x20many\x20decoys\x20wer\ + e\x20tried\x20before\x20success\n\n\r\n\x05\x04\n\x02\0\x04\x12\x04\xea\ + \x01\x04\x0c\n\r\n\x05\x04\n\x02\0\x05\x12\x04\xea\x01\r\x13\n\r\n\x05\ + \x04\n\x02\0\x01\x12\x04\xea\x01\x14(\n\r\n\x05\x04\n\x02\0\x03\x12\x04\ + \xea\x01+-\nm\n\x04\x04\n\x02\x01\x12\x04\xef\x01\x04/\x1a\x1e\x20Applic\ + able\x20to\x20whole\x20session:\n\"\x1a\x20includes\x20failed\x20attempt\ + s\n2#\x20Timings\x20below\x20are\x20in\x20milliseconds\n\n\r\n\x05\x04\n\ + \x02\x01\x04\x12\x04\xef\x01\x04\x0c\n\r\n\x05\x04\n\x02\x01\x05\x12\x04\ + \xef\x01\r\x13\n\r\n\x05\x04\n\x02\x01\x01\x12\x04\xef\x01\x14)\n\r\n\ + \x05\x04\n\x02\x01\x03\x12\x04\xef\x01,.\nR\n\x04\x04\n\x02\x02\x12\x04\ + \xf2\x01\x04(\x1a\x1f\x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20\ + measured\x20during\x20initial\x20handshake\n\n\r\n\x05\x04\n\x02\x02\x04\ + \x12\x04\xf2\x01\x04\x0c\n\r\n\x05\x04\n\x02\x02\x05\x12\x04\xf2\x01\r\ + \x13\n\r\n\x05\x04\n\x02\x02\x01\x12\x04\xf2\x01\x14\"\n\r\n\x05\x04\n\ + \x02\x02\x03\x12\x04\xf2\x01%'\n%\n\x04\x04\n\x02\x03\x12\x04\xf3\x01\ + \x04&\"\x17\x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\n\x02\x03\ + \x04\x12\x04\xf3\x01\x04\x0c\n\r\n\x05\x04\n\x02\x03\x05\x12\x04\xf3\x01\ + \r\x13\n\r\n\x05\x04\n\x02\x03\x01\x12\x04\xf3\x01\x14\x20\n\r\n\x05\x04\ + \n\x02\x03\x03\x12\x04\xf3\x01#%\nB\n\x04\x04\n\x02\x04\x12\x04\xf4\x01\ + \x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\x20to\ + \x20decot\n\n\r\n\x05\x04\n\x02\x04\x04\x12\x04\xf4\x01\x04\x0c\n\r\n\ + \x05\x04\n\x02\x04\x05\x12\x04\xf4\x01\r\x13\n\r\n\x05\x04\n\x02\x04\x01\ + \x12\x04\xf4\x01\x14\x20\n\r\n\x05\x04\n\x02\x04\x03\x12\x04\xf4\x01#%\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto, -}; +static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } + file_descriptor_proto_lazy.get(|| { + parse_descriptor_proto() + }) } diff --git a/zmq-proxy/Makefile b/zmq-proxy/Makefile new file mode 100644 index 00000000..e9fb1888 --- /dev/null +++ b/zmq-proxy/Makefile @@ -0,0 +1,2 @@ +all: + go build . diff --git a/zmq-proxy/README.md b/zmq-proxy/README.md new file mode 100644 index 00000000..b5e143d4 --- /dev/null +++ b/zmq-proxy/README.md @@ -0,0 +1,7 @@ +# Conjure ZeroMQ Proxy + +This utility combines multiple sources of registrations, such as the local detector and the HTTP registration API, into one ZeroMQ socket for consumption by the application. This means that the application need only know about this proxy, and each registration source need know nothing about its consumers; the proxy is the "stable" point of the architecture. + +## Setup + +The only setup required for most stations is to set the path to the station's private key in the `privkey_path` field of `config.toml`, and set the path to the `config.toml` file using the `CJ_PROXY_CONFIG` environment variable. The config already contains entries for two registration sources: the registration API (with its public key), as well as the detector's IPC socket. The config also contains basic parameters for heartbeating; you may consider lowering the heartbeat interval if the proxy is missing many registrations. By default a heartbeat is sent every 30 seconds, though if there is a regular message sent in that interval it can serve as a heartbeat, meaning that the heartbeat procedure has no potential for extra congestion. diff --git a/zmq-proxy/config.toml b/zmq-proxy/config.toml new file mode 100644 index 00000000..f8603d47 --- /dev/null +++ b/zmq-proxy/config.toml @@ -0,0 +1,42 @@ +# Name of abstract socket to bind proxy to +socket_name = "zmq-proxy" + +# Absolute path to private key to use when authenticating with servers. +# Can be either privkey or privkey || pubkey; only first 32 bytes will +# be used. +privkey_path = "" + +# Time in milliseconds to wait between sending heartbeats. +# Heartbeats are only sent when other traffic doesn't come through; +# i.e. normal messages can "act" as a heartbeat by confirming +# that the connection is alive. +heartbeat_interval = 30000 + +# Time in milliseconds after sending a heartbeat to wait for +# a response before the connection is assumed to be dead. +heartbeat_timeout = 1000 + +### ZMQ sockets to connect to and subscribe + +## Registration API +[[connect_sockets]] + +# Address of the socket to connect to +address = "tcp://registration.refraction.network:5591" + +# Type of authenticaton method to use when connecting. Can be NULL for no +# authentication or CURVE for public key-based authentication. +type = "CURVE" + +# Public key of socket to use if using CURVE authentication +# The default value is the public key for the API hosted at registration.refraction.network +pubkey = "s5gkB.U$dl]gO=F{Qo3=4Api-T$5#tpwaT/bSOr@" + +# ZMQ subscription prefix for this socket. Leave as "" or omit to receive all messages +subscription = "" + +## Detector +[[connect_sockets]] + +address = "ipc://@detector" +type = "NULL" diff --git a/zmq-proxy/main.go b/zmq-proxy/main.go new file mode 100644 index 00000000..b1082e5c --- /dev/null +++ b/zmq-proxy/main.go @@ -0,0 +1,131 @@ +// Proxy used to channel multiple registration sources into +// one PUB socket for consumption by the application. +// Specify the absolute location of the config file with +// the CJ_PROXY_CONFIG environment variable. + +package main + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "sync" + "time" + + "github.com/BurntSushi/toml" + zmq "github.com/pebbe/zmq4" +) + +type config struct { + SocketName string `toml:"socket_name"` + ConnectSockets []socketConfig `toml:"connect_sockets"` + PrivateKeyPath string `toml:"privkey_path"` + HeartbeatInterval int `toml:"heartbeat_interval"` + HeartbeatTimeout int `toml:"heartbeat_timeout"` +} + +type socketConfig struct { + Address string `toml:"address"` + AuthenticationType string `toml:"type"` + PublicKey string `toml:"pubkey"` + SubscriptionPrefix string `toml:"subscription"` +} + +type proxy struct { + logger *log.Logger +} + +func main() { + var p proxy + p.logger = log.New(os.Stdout, "[ZMQ_PROXY] ", log.Ldate|log.Lmicroseconds) + configFile, err := ioutil.ReadFile(os.Getenv("CJ_PROXY_CONFIG")) + if err != nil { + p.logger.Fatalln("failed to open config file:", err) + } + + var c config + err = toml.Unmarshal(configFile, &c) + if err != nil { + p.logger.Fatalln("failed to parse config file:", err) + } + + privkey, err := ioutil.ReadFile(c.PrivateKeyPath) + if err != nil { + p.logger.Fatalln("failed to load private key:", err) + } + + // Only use first 32 bytes of key (some keys store + // public key after private key) + privkey_z85 := zmq.Z85encode(string(privkey[:32])) + pubkey_z85, err := zmq.AuthCurvePublic(privkey_z85) + if err != nil { + p.logger.Fatalln("failed to generate client public key from private key:", err) + } + + pubSock, err := zmq.NewSocket(zmq.PUB) + if err != nil { + p.logger.Fatalln("failed to create binding zmq socket:", err) + } + + err = pubSock.Bind(fmt.Sprintf("ipc://@%s", c.SocketName)) + if err != nil { + p.logger.Fatalln("failed to bind zmq socket:", err) + } + + wg := sync.WaitGroup{} + + // Create a socket for each socket we're connecting to. I would've + // liked to use a single socket for all connections, and ZMQ actually + // does support connecting to multiple sockets from a single socket, + // but it appears that it doesn't support setting different auth + // parameters for each connection. + for _, connectSocket := range c.ConnectSockets { + sock, err := zmq.NewSocket(zmq.SUB) + if err != nil { + p.logger.Printf("failed to create subscriber zmq socket for %s: %v\n", connectSocket.Address, err) + } + + err = sock.SetHeartbeatIvl(time.Duration(c.HeartbeatInterval) * time.Millisecond) + if err != nil { + p.logger.Printf("failed to set heartbeat interval of %v for %s: %v\n", c.HeartbeatInterval, connectSocket.Address, err) + } + + err = sock.SetHeartbeatTimeout(time.Duration(c.HeartbeatTimeout) * time.Millisecond) + if err != nil { + p.logger.Printf("failed to set heartbeat timeout of %v for %s: %v\n", c.HeartbeatTimeout, connectSocket.Address, err) + } + + if connectSocket.AuthenticationType == "CURVE" { + err = sock.ClientAuthCurve(connectSocket.PublicKey, pubkey_z85, privkey_z85) + if err != nil { + p.logger.Printf("failed to set up CURVE authentication for %s: %v\n", connectSocket.Address, err) + continue + } + } + + err = sock.SetSubscribe(connectSocket.SubscriptionPrefix) + if err != nil { + p.logger.Printf("failed to set subscription prefix for %s: %v\n", connectSocket.Address, err) + continue + } + + err = sock.Connect(connectSocket.Address) + if err != nil { + p.logger.Printf("failed to connect to %s: %v\n", connectSocket.Address, err) + continue + } + + wg.Add(1) + + go func(frontend *zmq.Socket, config socketConfig) { + p.logger.Printf("proxying for %s\n", config.Address) + e := zmq.Proxy(frontend, pubSock, nil) + if e != nil { + p.logger.Printf("proxy for %s failed: %v\n", config.Address, e) + } + }(sock, connectSocket) + } + + wg.Wait() +}