From ea429f83d7a17d725b4253f57d4f87931ba28266 Mon Sep 17 00:00:00 2001 From: marshall Date: Fri, 9 Jun 2023 21:09:37 -0400 Subject: [PATCH 01/26] min transport: add Connect() functionality --- application/transports/wrapping/min/client.go | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/application/transports/wrapping/min/client.go b/application/transports/wrapping/min/client.go index d15050e1..4baadeda 100644 --- a/application/transports/wrapping/min/client.go +++ b/application/transports/wrapping/min/client.go @@ -2,8 +2,11 @@ package min import ( "fmt" + "io" + "net" "github.com/refraction-networking/conjure/application/transports" + core "github.com/refraction-networking/conjure/pkg/core" pb "github.com/refraction-networking/gotapdance/protobuf" "google.golang.org/protobuf/proto" ) @@ -14,7 +17,7 @@ import ( type ClientTransport struct { // Parameters are fields that will be shared with the station in the registration Parameters *pb.GenericTransportParams - + connectTag []byte // // state tracks fields internal to the registrar that survive for the lifetime // // of the transport session without being shared - i.e. local derived keys. // state any @@ -63,17 +66,15 @@ func (t *ClientTransport) GetDstPort(seed []byte, params any) (uint16, error) { return transports.PortSelectorRange(portRangeMin, portRangeMax, seed) } -// // Connect creates the connection to the phantom address negotiated in the registration phase of -// // Conjure connection establishment. -// func (t *ClientTransport) Connect(ctx context.Context, reg *cj.ConjureReg) (net.Conn, error) { -// // conn, err := reg.getFirstConnection(ctx, reg.TcpDialer, phantoms) -// // if err != nil { -// // return nil, err -// // } +// Connect creates the connection to the phantom address negotiated in the registration phase of +// Conjure connection establishment. +func (t *ClientTransport) Connect(conn net.Conn) (net.Conn, error) { + // Send hmac(seed, str) bytes to indicate to station (min transport) generated during Prepare(...) + conn.Write(t.connectTag) + return conn, nil +} -// // // Send hmac(seed, str) bytes to indicate to station (min transport) -// // connectTag := conjureHMAC(reg.keys.SharedSecret, "MinTrasportHMACString") -// // conn.Write(connectTag) -// // return conn, nil -// return nil, nil -// } +func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { + t.connectTag = core.ConjureHMAC(sharedSecret, "MinTransportHMACString") + return nil +} From c5459d3ef8b3e340470212d0e24fd0c032629728 Mon Sep 17 00:00:00 2001 From: marshall Date: Fri, 9 Jun 2023 21:24:24 -0400 Subject: [PATCH 02/26] obfs4 transport: add Connect() and Prepare() --- .../transports/wrapping/obfs4/obfs4.go | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/application/transports/wrapping/obfs4/obfs4.go b/application/transports/wrapping/obfs4/obfs4.go index 8bc0e96e..9ec28375 100644 --- a/application/transports/wrapping/obfs4/obfs4.go +++ b/application/transports/wrapping/obfs4/obfs4.go @@ -3,11 +3,13 @@ package obfs4 import ( "bytes" "fmt" + "io" "net" pt "git.torproject.org/pluggable-transports/goptlib.git" dd "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" + "github.com/refraction-networking/conjure/pkg/core" pb "github.com/refraction-networking/gotapdance/protobuf" "gitlab.com/yawning/obfs4.git/common/drbg" "gitlab.com/yawning/obfs4.git/common/ntor" @@ -155,3 +157,37 @@ func (Transport) GetDstPort(libVersion uint, seed []byte, params any) (uint16, e return 443, nil } + +// Connect creates the connection to the phantom address negotiated in the registration phase of +// Conjure connection establishment. +func (t ClientTransport) Connect(conn net.Conn) (net.Conn, error) { + obfsTransport := obfs4.Transport{} + args := pt.Args{} + + args.Add("node-id", obfsTransport.Obfs4Keys.NodeID.Hex()) + args.Add("public-key", obfsTransport.Obfs4Keys.PublicKey.Hex()) + args.Add("iat-mode", "1") + + c, err := obfsTransport.ClientFactory("") + if err != nil { + fmt.Errorf("failed to create client factory") + return nil, err + } + + parsedArgs, err := c.ParseArgs(&args) + if err != nil { + fmt.Errorf("failed to parse obfs4 args") + return nil, err + } + + d := func(network, address string) (net.Conn, error) { + return conn, nil + } + + return c.Dial("tcp", "", d, parsedArgs) +} + +func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { + t.connectTag = core.ConjureHMAC(sharedSecret, "obfs4TransportHMACString") + return nil +} From a3a7e9db6ec665b4a3383bf9be0ad48f7ee3cfbc Mon Sep 17 00:00:00 2001 From: marshall Date: Fri, 9 Jun 2023 21:25:09 -0400 Subject: [PATCH 03/26] pkg/core: add core.go for ConjureHMAC function --- pkg/core/core.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pkg/core/core.go diff --git a/pkg/core/core.go b/pkg/core/core.go new file mode 100644 index 00000000..16d6d4a1 --- /dev/null +++ b/pkg/core/core.go @@ -0,0 +1,13 @@ +package core + +import ( + "crypto/hmac" + "crypto/sha256" +) + +// ConjureHMAC implements the hmak that can then be used for further hkdf key generation +func ConjureHMAC(key []byte, str string) []byte { + hash := hmac.New(sha256.New, key) + hash.Write([]byte(str)) + return hash.Sum(nil) +} From 6ff12f19a345a13d7b73de78bd07343380efb805 Mon Sep 17 00:00:00 2001 From: marshall Date: Mon, 12 Jun 2023 21:38:32 -0400 Subject: [PATCH 04/26] transport (obfs4): generate shared keys in station --- application/transports/wrapping/obfs4/obfs4.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/application/transports/wrapping/obfs4/obfs4.go b/application/transports/wrapping/obfs4/obfs4.go index 9ec28375..b7922251 100644 --- a/application/transports/wrapping/obfs4/obfs4.go +++ b/application/transports/wrapping/obfs4/obfs4.go @@ -164,20 +164,18 @@ func (t ClientTransport) Connect(conn net.Conn) (net.Conn, error) { obfsTransport := obfs4.Transport{} args := pt.Args{} - args.Add("node-id", obfsTransport.Obfs4Keys.NodeID.Hex()) - args.Add("public-key", obfsTransport.Obfs4Keys.PublicKey.Hex()) + args.Add("node-id", t.keys.Obfs4Keys.NodeID.Hex()) + args.Add("public-key", t.keys.Obfs4Keys.PublicKey.Hex()) args.Add("iat-mode", "1") c, err := obfsTransport.ClientFactory("") if err != nil { - fmt.Errorf("failed to create client factory") - return nil, err + return nil, fmt.Errorf("failed to create client factory") } parsedArgs, err := c.ParseArgs(&args) if err != nil { - fmt.Errorf("failed to parse obfs4 args") - return nil, err + return nil, fmt.Errorf("failed to parse obfs4 args") } d := func(network, address string) (net.Conn, error) { @@ -189,5 +187,11 @@ func (t ClientTransport) Connect(conn net.Conn) (net.Conn, error) { func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { t.connectTag = core.ConjureHMAC(sharedSecret, "obfs4TransportHMACString") + // Generate shared keys + var err error + t.keys, err = dd.GenSharedKeys(sharedSecret, pb.TransportType_Obfs4) + if err != nil { + return fmt.Errorf("failed to generate shared keys") + } return nil } From 3de7b6ba29958bb1ddd32881db99f47b828c9483 Mon Sep 17 00:00:00 2001 From: marshall Date: Mon, 12 Jun 2023 21:39:35 -0400 Subject: [PATCH 05/26] transport client: add keys to ClientTransport --- application/transports/wrapping/obfs4/client.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/application/transports/wrapping/obfs4/client.go b/application/transports/wrapping/obfs4/client.go index 90a778a9..0c830c13 100644 --- a/application/transports/wrapping/obfs4/client.go +++ b/application/transports/wrapping/obfs4/client.go @@ -3,6 +3,7 @@ package obfs4 import ( "fmt" + dd "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" pb "github.com/refraction-networking/gotapdance/protobuf" @@ -14,6 +15,8 @@ import ( // the station side Transport struct has one instance to be re-used for all sessions. type ClientTransport struct { Parameters *pb.GenericTransportParams + connectTag []byte + keys dd.ConjureSharedKeys } // Name returns a string identifier for the Transport for logging @@ -58,9 +61,3 @@ func (t *ClientTransport) GetDstPort(seed []byte, params any) (uint16, error) { return transports.PortSelectorRange(portRangeMin, portRangeMax, seed) } - -// // Connect creates the connection to the phantom address negotiated in the registration phase of -// // Conjure connection establishment. -// func (*ClientTransport) Connect(ctx context.Context, reg *cj.ConjureReg) (net.Conn, error) { -// return nil, nil -// } From 1069e241df78949ecf7e7625bfd0c3b733420410 Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 14 Jun 2023 11:02:08 -0400 Subject: [PATCH 06/26] transports (obfs4): move ClientTransport functions to client.go --- Cargo.lock | 1112 +++++++++++++++++ .../transports/wrapping/obfs4/client.go | 43 + 2 files changed, 1155 insertions(+) create mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..69370988 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1112 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "time", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "error-chain" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnetwork" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" +dependencies = [ + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "js-sys" +version = "0.3.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.144" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" + +[[package]] +name = "log" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +dependencies = [ + "log 0.4.18", +] + +[[package]] +name = "log" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "metadeps" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b122901b3a675fac8cecf68dcb2f0d3036193bc861d1ac0e1c337f7d5254c2" +dependencies = [ + "error-chain", + "pkg-config", + "toml 0.2.1", +] + +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "pnet" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd959a8268165518e2bf5546ba84c7b3222744435616381df3c456fe8d983576" +dependencies = [ + "ipnetwork", + "pnet_base", + "pnet_datalink", + "pnet_packet", + "pnet_sys", + "pnet_transport", +] + +[[package]] +name = "pnet_base" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872e46346144ebf35219ccaa64b1dffacd9c6f188cd7d012bd6977a2a838f42e" +dependencies = [ + "no-std-net", +] + +[[package]] +name = "pnet_datalink" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c302da22118d2793c312a35fb3da6846cb0fab6c3ad53fd67e37809b06cdafce" +dependencies = [ + "ipnetwork", + "libc", + "pnet_base", + "pnet_sys", + "winapi", +] + +[[package]] +name = "pnet_macros" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a780e80005c2e463ec25a6e9f928630049a10b43945fea83207207d4a7606f4" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "pnet_macros_support" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d932134f32efd7834eb8b16d42418dac87086347d1bc7d142370ef078582bc" +dependencies = [ + "pnet_base", +] + +[[package]] +name = "pnet_packet" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bde678bbd85cb1c2d99dc9fc596e57f03aa725f84f3168b0eaf33eeccb41706" +dependencies = [ + "glob", + "pnet_base", + "pnet_macros", + "pnet_macros_support", +] + +[[package]] +name = "pnet_sys" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf7a58b2803d818a374be9278a1fe8f88fce14b936afbe225000cfcd9c73f16" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "pnet_transport" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "813d1c0e4defbe7ee22f6fe1755f122b77bfb5abe77145b1b5baaf463cab9249" +dependencies = [ + "libc", + "pnet_base", + "pnet_packet", + "pnet_sys", +] + +[[package]] +name = "polyval" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "protobuf" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror", +] + +[[package]] +name = "protobuf-support" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372" +dependencies = [ + "thiserror", +] + +[[package]] +name = "quote" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redis" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea8c51b5dc1d8e5fd3350ec8167f464ec0995e79f2e90a075b63371500d557f" +dependencies = [ + "combine", + "itoa", + "percent-encoding", + "ryu", + "sha1_smol", + "url", +] + +[[package]] +name = "regex" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" + +[[package]] +name = "rust_dark_decoy" +version = "0.0.1" +dependencies = [ + "aes-gcm", + "arrayref", + "cc", + "chrono", + "digest", + "errno", + "hex", + "hkdf", + "ipnetwork", + "libc", + "log 0.4.18", + "pnet", + "protobuf", + "rand", + "redis", + "serde", + "serde_derive", + "sha2", + "toml 0.7.4", + "tuntap", + "zmq", +] + +[[package]] +name = "ryu" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + +[[package]] +name = "serde" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" + +[[package]] +name = "serde_derive" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "serde_spanned" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +dependencies = [ + "serde", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4" + +[[package]] +name = "toml" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tuntap" +version = "0.0.1" +source = "git+https://github.com/ewust/tuntap.rs#470550b5c891808f99f5b69a7203756fdff0f3ca" +dependencies = [ + "bitflags 0.7.0", + "libc", + "log 0.3.9", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +dependencies = [ + "bumpalo", + "log 0.4.18", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.18", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +dependencies = [ + "memchr", +] + +[[package]] +name = "zmq" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aad98a7a617d608cd9e1127147f630d24af07c7cd95ba1533246d96cbdd76c66" +dependencies = [ + "bitflags 1.3.2", + "libc", + "log 0.4.18", + "zmq-sys", +] + +[[package]] +name = "zmq-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d33a2c51dde24d5b451a2ed4b488266df221a5eaee2ee519933dc46b9a9b3648" +dependencies = [ + "libc", + "metadeps", +] diff --git a/application/transports/wrapping/obfs4/client.go b/application/transports/wrapping/obfs4/client.go index 0c830c13..1a1a3806 100644 --- a/application/transports/wrapping/obfs4/client.go +++ b/application/transports/wrapping/obfs4/client.go @@ -2,10 +2,15 @@ package obfs4 import ( "fmt" + "io" + "net" + pt "git.torproject.org/pluggable-transports/goptlib.git" dd "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" + "github.com/refraction-networking/conjure/pkg/core" pb "github.com/refraction-networking/gotapdance/protobuf" + "gitlab.com/yawning/obfs4.git/transports/obfs4" "google.golang.org/protobuf/proto" ) @@ -61,3 +66,41 @@ func (t *ClientTransport) GetDstPort(seed []byte, params any) (uint16, error) { return transports.PortSelectorRange(portRangeMin, portRangeMax, seed) } + +// Connect creates the connection to the phantom address negotiated in the registration phase of +// Conjure connection establishment. +func (t ClientTransport) Connect(conn net.Conn) (net.Conn, error) { + obfsTransport := obfs4.Transport{} + args := pt.Args{} + + args.Add("node-id", t.keys.Obfs4Keys.NodeID.Hex()) + args.Add("public-key", t.keys.Obfs4Keys.PublicKey.Hex()) + args.Add("iat-mode", "1") + + c, err := obfsTransport.ClientFactory("") + if err != nil { + return nil, fmt.Errorf("failed to create client factory") + } + + parsedArgs, err := c.ParseArgs(&args) + if err != nil { + return nil, fmt.Errorf("failed to parse obfs4 args") + } + + d := func(network, address string) (net.Conn, error) { + return conn, nil + } + + return c.Dial("tcp", "", d, parsedArgs) +} + +func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { + t.connectTag = core.ConjureHMAC(sharedSecret, "obfs4TransportHMACString") + // Generate shared keys + var err error + t.keys, err = dd.GenSharedKeys(sharedSecret, pb.TransportType_Obfs4) + if err != nil { + return fmt.Errorf("failed to generate shared keys") + } + return nil +} From b67d7b7b9d3853ab06839312f31b600b7744b8a2 Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 14 Jun 2023 11:04:15 -0400 Subject: [PATCH 07/26] transports (obfs4): remove ClientTransport functions --- .../transports/wrapping/obfs4/obfs4.go | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/application/transports/wrapping/obfs4/obfs4.go b/application/transports/wrapping/obfs4/obfs4.go index b7922251..8bc0e96e 100644 --- a/application/transports/wrapping/obfs4/obfs4.go +++ b/application/transports/wrapping/obfs4/obfs4.go @@ -3,13 +3,11 @@ package obfs4 import ( "bytes" "fmt" - "io" "net" pt "git.torproject.org/pluggable-transports/goptlib.git" dd "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" - "github.com/refraction-networking/conjure/pkg/core" pb "github.com/refraction-networking/gotapdance/protobuf" "gitlab.com/yawning/obfs4.git/common/drbg" "gitlab.com/yawning/obfs4.git/common/ntor" @@ -157,41 +155,3 @@ func (Transport) GetDstPort(libVersion uint, seed []byte, params any) (uint16, e return 443, nil } - -// Connect creates the connection to the phantom address negotiated in the registration phase of -// Conjure connection establishment. -func (t ClientTransport) Connect(conn net.Conn) (net.Conn, error) { - obfsTransport := obfs4.Transport{} - args := pt.Args{} - - args.Add("node-id", t.keys.Obfs4Keys.NodeID.Hex()) - args.Add("public-key", t.keys.Obfs4Keys.PublicKey.Hex()) - args.Add("iat-mode", "1") - - c, err := obfsTransport.ClientFactory("") - if err != nil { - return nil, fmt.Errorf("failed to create client factory") - } - - parsedArgs, err := c.ParseArgs(&args) - if err != nil { - return nil, fmt.Errorf("failed to parse obfs4 args") - } - - d := func(network, address string) (net.Conn, error) { - return conn, nil - } - - return c.Dial("tcp", "", d, parsedArgs) -} - -func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { - t.connectTag = core.ConjureHMAC(sharedSecret, "obfs4TransportHMACString") - // Generate shared keys - var err error - t.keys, err = dd.GenSharedKeys(sharedSecret, pb.TransportType_Obfs4) - if err != nil { - return fmt.Errorf("failed to generate shared keys") - } - return nil -} From 2d23a2ba8e7532556f1030b4555abf747b5ee4eb Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 14 Jun 2023 11:05:29 -0400 Subject: [PATCH 08/26] reg transport test: use relative path instead of gopath --- application/registration_with_transport_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/registration_with_transport_test.go b/application/registration_with_transport_test.go index 1072ae3b..0fbbad14 100644 --- a/application/registration_with_transport_test.go +++ b/application/registration_with_transport_test.go @@ -36,7 +36,8 @@ func mockReceiveFromDetector() (*pb.ClientToStation, cj.ConjureSharedKeys) { } func TestManagerFunctionality(t *testing.T) { - testSubnetPath := os.Getenv("GOPATH") + "/src/github.com/refraction-networking/conjure/application/lib/test/phantom_subnets.toml" + cwd, _ := os.Getwd() + testSubnetPath := cwd + "/lib/test/phantom_subnets.toml" os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) rm := cj.NewRegistrationManager(&cj.RegConfig{}) From 9c20de887ca466daa61e404f222184cee80db85a Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 14 Jun 2023 11:07:26 -0400 Subject: [PATCH 09/26] transports test (min): use relative path instead of gopath --- application/transports/wrapping/min/min_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/transports/wrapping/min/min_test.go b/application/transports/wrapping/min/min_test.go index 615e72a4..c8e23177 100644 --- a/application/transports/wrapping/min/min_test.go +++ b/application/transports/wrapping/min/min_test.go @@ -17,7 +17,8 @@ import ( ) func TestSuccessfulWrap(t *testing.T) { - testSubnetPath := os.Getenv("GOPATH") + "/src/github.com/refraction-networking/conjure/application/lib/test/phantom_subnets.toml" + cwd, _ := os.Getwd() + testSubnetPath := cwd + "/../../../lib/test/phantom_subnets.toml" os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) var transport Transport @@ -108,7 +109,7 @@ func TestTryParamsToDstPort(t *testing.T) { clv := randomizeDstPortMinVersion seed, _ := hex.DecodeString("0000000000000000000000000000000000") - cases := []struct{ + cases := []struct { r bool p uint16 }{{true, 58047}, {false, 443}} From ed0caf0bfbe2c34d8486215a3dc98f2eed6233c5 Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 14 Jun 2023 11:08:33 -0400 Subject: [PATCH 10/26] transports internal test: use relative path --- application/transports/wrapping/internal/tests/tests.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/transports/wrapping/internal/tests/tests.go b/application/transports/wrapping/internal/tests/tests.go index 19c7ecd8..e50f984a 100644 --- a/application/transports/wrapping/internal/tests/tests.go +++ b/application/transports/wrapping/internal/tests/tests.go @@ -21,7 +21,8 @@ var SharedSecret = []byte(`6a328b8ec2024dd92dd64332164cc0425ddbde40cb7b81e055bf7 // SetupPhantomConnections registers one session with the provided transport and // registration manager using a pre-determined kay and phantom subnet file. func SetupPhantomConnections(manager *dd.RegistrationManager, transport pb.TransportType) (clientToPhantom net.Conn, serverFromPhantom net.Conn, reg *dd.DecoyRegistration) { - testSubnetPath := os.Getenv("GOPATH") + "/src/github.com/refraction-networking/conjure/application/lib/test/phantom_subnets.toml" + cwd, _ := os.Getwd() + testSubnetPath := cwd + "/../internal/tests/phantom_subnets.toml" return SetupPhantomConnectionsSecret(manager, transport, SharedSecret, testSubnetPath) } From 7d4e952c0b1bd0e0e9a6a0f77b07de826170a2c2 Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 14 Jun 2023 11:46:31 -0400 Subject: [PATCH 11/26] min client: check conn.Write for err --- application/transports/wrapping/min/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/transports/wrapping/min/client.go b/application/transports/wrapping/min/client.go index 4baadeda..1c9c1c46 100644 --- a/application/transports/wrapping/min/client.go +++ b/application/transports/wrapping/min/client.go @@ -70,7 +70,10 @@ func (t *ClientTransport) GetDstPort(seed []byte, params any) (uint16, error) { // Conjure connection establishment. func (t *ClientTransport) Connect(conn net.Conn) (net.Conn, error) { // Send hmac(seed, str) bytes to indicate to station (min transport) generated during Prepare(...) - conn.Write(t.connectTag) + _, err := conn.Write(t.connectTag) + if err != nil { + return nil, err + } return conn, nil } From b05cb4bb43c9f231cc02664c09785a64d4e81b9c Mon Sep 17 00:00:00 2001 From: marshall Date: Fri, 16 Jun 2023 18:59:38 -0400 Subject: [PATCH 12/26] min/obfs4 transports: rename dd -> cj, rename Connect --- application/transports/wrapping/min/client.go | 4 ++-- application/transports/wrapping/min/min.go | 6 +++--- application/transports/wrapping/obfs4/client.go | 10 +++++----- application/transports/wrapping/obfs4/obfs4.go | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/application/transports/wrapping/min/client.go b/application/transports/wrapping/min/client.go index 1c9c1c46..e2b8934a 100644 --- a/application/transports/wrapping/min/client.go +++ b/application/transports/wrapping/min/client.go @@ -66,9 +66,9 @@ func (t *ClientTransport) GetDstPort(seed []byte, params any) (uint16, error) { return transports.PortSelectorRange(portRangeMin, portRangeMax, seed) } -// Connect creates the connection to the phantom address negotiated in the registration phase of +// WrapConn creates the connection to the phantom address negotiated in the registration phase of // Conjure connection establishment. -func (t *ClientTransport) Connect(conn net.Conn) (net.Conn, error) { +func (t *ClientTransport) WrapConn(conn net.Conn) (net.Conn, error) { // Send hmac(seed, str) bytes to indicate to station (min transport) generated during Prepare(...) _, err := conn.Write(t.connectTag) if err != nil { diff --git a/application/transports/wrapping/min/min.go b/application/transports/wrapping/min/min.go index 0bd103e4..e18d6931 100644 --- a/application/transports/wrapping/min/min.go +++ b/application/transports/wrapping/min/min.go @@ -5,7 +5,7 @@ import ( "fmt" "net" - dd "github.com/refraction-networking/conjure/application/lib" + cj "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" pb "github.com/refraction-networking/gotapdance/protobuf" "google.golang.org/protobuf/types/known/anypb" @@ -37,7 +37,7 @@ func (Transport) LogPrefix() string { return "MIN" } // GetIdentifier takes in a registration and returns an identifier for it. This // identifier should be unique for each registration on a given phantom; // registrations on different phantoms can have the same identifier. -func (Transport) GetIdentifier(d *dd.DecoyRegistration) string { +func (Transport) GetIdentifier(d *cj.DecoyRegistration) string { return string(d.Keys.ConjureHMAC("MinTrasportHMACString")) } @@ -75,7 +75,7 @@ func (Transport) ParseParams(libVersion uint, data *anypb.Any) (any, error) { // // If the returned error is nil or non-nil and non-{ transports.ErrTryAgain, // transports.ErrNotTransport }, the caller may no longer use data or conn. -func (Transport) WrapConnection(data *bytes.Buffer, c net.Conn, originalDst net.IP, regManager *dd.RegistrationManager) (*dd.DecoyRegistration, net.Conn, error) { +func (Transport) WrapConnection(data *bytes.Buffer, c net.Conn, originalDst net.IP, regManager *cj.RegistrationManager) (*cj.DecoyRegistration, net.Conn, error) { if data.Len() < minTagLength { return nil, nil, transports.ErrTryAgain } diff --git a/application/transports/wrapping/obfs4/client.go b/application/transports/wrapping/obfs4/client.go index 1a1a3806..78c89480 100644 --- a/application/transports/wrapping/obfs4/client.go +++ b/application/transports/wrapping/obfs4/client.go @@ -6,7 +6,7 @@ import ( "net" pt "git.torproject.org/pluggable-transports/goptlib.git" - dd "github.com/refraction-networking/conjure/application/lib" + cj "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" "github.com/refraction-networking/conjure/pkg/core" pb "github.com/refraction-networking/gotapdance/protobuf" @@ -21,7 +21,7 @@ import ( type ClientTransport struct { Parameters *pb.GenericTransportParams connectTag []byte - keys dd.ConjureSharedKeys + keys cj.ConjureSharedKeys } // Name returns a string identifier for the Transport for logging @@ -67,9 +67,9 @@ func (t *ClientTransport) GetDstPort(seed []byte, params any) (uint16, error) { return transports.PortSelectorRange(portRangeMin, portRangeMax, seed) } -// Connect creates the connection to the phantom address negotiated in the registration phase of +// WrapConn creates the connection to the phantom address negotiated in the registration phase of // Conjure connection establishment. -func (t ClientTransport) Connect(conn net.Conn) (net.Conn, error) { +func (t ClientTransport) WrapConn(conn net.Conn) (net.Conn, error) { obfsTransport := obfs4.Transport{} args := pt.Args{} @@ -98,7 +98,7 @@ func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io t.connectTag = core.ConjureHMAC(sharedSecret, "obfs4TransportHMACString") // Generate shared keys var err error - t.keys, err = dd.GenSharedKeys(sharedSecret, pb.TransportType_Obfs4) + t.keys, err = cj.GenSharedKeys(sharedSecret, pb.TransportType_Obfs4) if err != nil { return fmt.Errorf("failed to generate shared keys") } diff --git a/application/transports/wrapping/obfs4/obfs4.go b/application/transports/wrapping/obfs4/obfs4.go index 8bc0e96e..8c1c71f4 100644 --- a/application/transports/wrapping/obfs4/obfs4.go +++ b/application/transports/wrapping/obfs4/obfs4.go @@ -6,7 +6,7 @@ import ( "net" pt "git.torproject.org/pluggable-transports/goptlib.git" - dd "github.com/refraction-networking/conjure/application/lib" + cj "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" pb "github.com/refraction-networking/gotapdance/protobuf" "gitlab.com/yawning/obfs4.git/common/drbg" @@ -34,7 +34,7 @@ func (Transport) Name() string { return "obfs4" } func (Transport) LogPrefix() string { return "OBFS4" } // GetIdentifier implements the station Transport interface -func (Transport) GetIdentifier(r *dd.DecoyRegistration) string { +func (Transport) GetIdentifier(r *cj.DecoyRegistration) string { return string(r.Keys.Obfs4Keys.PublicKey.Bytes()[:]) + string(r.Keys.Obfs4Keys.NodeID.Bytes()[:]) } @@ -66,7 +66,7 @@ func (Transport) ParseParams(libVersion uint, data *anypb.Any) (any, error) { } // WrapConnection implements the station Transport interface -func (Transport) WrapConnection(data *bytes.Buffer, c net.Conn, phantom net.IP, regManager *dd.RegistrationManager) (*dd.DecoyRegistration, net.Conn, error) { +func (Transport) WrapConnection(data *bytes.Buffer, c net.Conn, phantom net.IP, regManager *cj.RegistrationManager) (*cj.DecoyRegistration, net.Conn, error) { if data.Len() < ClientMinHandshakeLength { return nil, nil, transports.ErrTryAgain } @@ -119,8 +119,8 @@ func (Transport) WrapConnection(data *bytes.Buffer, c net.Conn, phantom net.IP, // This function makes the assumption that any identifier with length 52 is an obfs4 registration. // This may not be strictly true, but any other identifier will simply fail to form a connection and // should be harmless. -func getObfs4Registrations(regManager *dd.RegistrationManager, darkDecoyAddr net.IP) []*dd.DecoyRegistration { - var regs []*dd.DecoyRegistration +func getObfs4Registrations(regManager *cj.RegistrationManager, darkDecoyAddr net.IP) []*cj.DecoyRegistration { + var regs []*cj.DecoyRegistration for identifier, r := range regManager.GetRegistrations(darkDecoyAddr) { if len(identifier) == ntor.PublicKeyLength+ntor.NodeIDLength { From a6c3fa8c96c87ecb0a85f0a389cec44f00d558b1 Mon Sep 17 00:00:00 2001 From: marshall Date: Mon, 19 Jun 2023 21:01:42 -0400 Subject: [PATCH 13/26] transport interface: change Prepare() -> PrepareKeys() --- application/transports/wrapping/min/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/transports/wrapping/min/client.go b/application/transports/wrapping/min/client.go index e2b8934a..20212f4f 100644 --- a/application/transports/wrapping/min/client.go +++ b/application/transports/wrapping/min/client.go @@ -77,7 +77,7 @@ func (t *ClientTransport) WrapConn(conn net.Conn) (net.Conn, error) { return conn, nil } -func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { +func (t *ClientTransport) PrepareKeys(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { t.connectTag = core.ConjureHMAC(sharedSecret, "MinTransportHMACString") return nil } From 1ebcc1d5e4d0298fb8a77ca8115ee23e009a7b84 Mon Sep 17 00:00:00 2001 From: marshall Date: Mon, 19 Jun 2023 21:02:33 -0400 Subject: [PATCH 14/26] transport interface: move obfs4 key generation --- application/transports/wrapping/obfs4/client.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/application/transports/wrapping/obfs4/client.go b/application/transports/wrapping/obfs4/client.go index 78c89480..db8bc1d9 100644 --- a/application/transports/wrapping/obfs4/client.go +++ b/application/transports/wrapping/obfs4/client.go @@ -6,7 +6,6 @@ import ( "net" pt "git.torproject.org/pluggable-transports/goptlib.git" - cj "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/application/transports" "github.com/refraction-networking/conjure/pkg/core" pb "github.com/refraction-networking/gotapdance/protobuf" @@ -21,7 +20,7 @@ import ( type ClientTransport struct { Parameters *pb.GenericTransportParams connectTag []byte - keys cj.ConjureSharedKeys + keys Obfs4Keys } // Name returns a string identifier for the Transport for logging @@ -73,8 +72,8 @@ func (t ClientTransport) WrapConn(conn net.Conn) (net.Conn, error) { obfsTransport := obfs4.Transport{} args := pt.Args{} - args.Add("node-id", t.keys.Obfs4Keys.NodeID.Hex()) - args.Add("public-key", t.keys.Obfs4Keys.PublicKey.Hex()) + args.Add("node-id", t.keys.NodeID.Hex()) + args.Add("public-key", t.keys.PublicKey.Hex()) args.Add("iat-mode", "1") c, err := obfsTransport.ClientFactory("") @@ -94,13 +93,13 @@ func (t ClientTransport) WrapConn(conn net.Conn) (net.Conn, error) { return c.Dial("tcp", "", d, parsedArgs) } -func (t *ClientTransport) Prepare(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { +func (t *ClientTransport) PrepareKeys(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error { t.connectTag = core.ConjureHMAC(sharedSecret, "obfs4TransportHMACString") // Generate shared keys var err error - t.keys, err = cj.GenSharedKeys(sharedSecret, pb.TransportType_Obfs4) + t.keys, err = generateObfs4Keys(dRand) if err != nil { - return fmt.Errorf("failed to generate shared keys") + return err } return nil } From 7e5a25ea3802ba48497f8243556ec4897a47dbe3 Mon Sep 17 00:00:00 2001 From: marshall Date: Mon, 19 Jun 2023 21:03:20 -0400 Subject: [PATCH 15/26] transport interface: obfs4 key generation --- application/transports/wrapping/obfs4/keys.go | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 application/transports/wrapping/obfs4/keys.go diff --git a/application/transports/wrapping/obfs4/keys.go b/application/transports/wrapping/obfs4/keys.go new file mode 100644 index 00000000..d2a8f3bc --- /dev/null +++ b/application/transports/wrapping/obfs4/keys.go @@ -0,0 +1,40 @@ +package obfs4 + +import ( + "io" + + "gitlab.com/yawning/obfs4.git/common/ntor" + "golang.org/x/crypto/curve25519" +) + +type Obfs4Keys struct { + PrivateKey *ntor.PrivateKey + PublicKey *ntor.PublicKey + NodeID *ntor.NodeID +} + +func generateObfs4Keys(rand io.Reader) (Obfs4Keys, error) { + keys := Obfs4Keys{ + PrivateKey: new(ntor.PrivateKey), + PublicKey: new(ntor.PublicKey), + NodeID: new(ntor.NodeID), + } + + _, err := rand.Read(keys.PrivateKey[:]) + if err != nil { + return keys, err + } + + keys.PrivateKey[0] &= 248 + keys.PrivateKey[31] &= 127 + keys.PrivateKey[31] |= 64 + + pub, err := curve25519.X25519(keys.PrivateKey[:], curve25519.Basepoint) + if err != nil { + return keys, err + } + copy(keys.PublicKey[:], pub) + + _, err = rand.Read(keys.NodeID[:]) + return keys, err +} From 9ba5c6d41ca9415202e6294a3209f798378c3cab Mon Sep 17 00:00:00 2001 From: marshall Date: Tue, 27 Jun 2023 18:25:57 -0400 Subject: [PATCH 16/26] refactor repo: move many files from gotapdance --- {application => cmd/application}/Makefile | 0 {application => cmd/application}/README.md | 0 {application => cmd/application}/config.toml | 0 {application => cmd/application}/conns.go | 6 +- {application => cmd/application}/main.go | 10 +- .../registration_with_transport_test.go | 14 +- cmd/registration-server/main.go | 12 +- go.mod | 4 +- go.sum | 4 + internal/conjurepath/conjurepath.go | 11 + pkg/core/interfaces/interfaces.go | 64 + pkg/ed25519/LICENSE | 27 + pkg/ed25519/ed25519.go | 127 + pkg/ed25519/ed25519_test.go | 160 + pkg/ed25519/edwards25519/const.go | 1411 ++++++++ pkg/ed25519/edwards25519/edwards25519.go | 1773 ++++++++++ pkg/ed25519/extra25519/extra25519.go | 347 ++ pkg/ed25519/extra25519/extra25519_test.go | 78 + pkg/ed25519/testdata/sign.input.gz | Bin 0 -> 50330 bytes pkg/phantoms/phantoms.go | 292 ++ pkg/phantoms/phantoms_test.go | 303 ++ pkg/registrars/dns-registrar/README.md | 3 + pkg/registrars/dns-registrar/dns/dns.go | 575 ++++ pkg/registrars/dns-registrar/dns/dns_test.go | 597 ++++ .../dns-registrar/encryption/encryption.go | 79 + .../dns-registrar/msgformat/msgformat.go | 46 + .../dns-registrar/msgformat/msgformat_test.go | 42 + .../dns-registrar/queuepacketconn/clientid.go | 28 + .../dns-registrar/queuepacketconn/consts.go | 22 + .../queuepacketconn/queuepacketconn.go | 163 + .../dns-registrar/remotemap/remotemap.go | 152 + .../dns-registrar/requester/config.go | 63 + pkg/registrars/dns-registrar/requester/dns.go | 212 ++ .../dns-registrar/requester/http.go | 175 + .../dns-registrar/requester/http_test.go | 47 + .../dns-registrar/requester/requester.go | 274 ++ pkg/registrars/dns-registrar/requester/tls.go | 134 + .../dns-registrar/requester/utls.go | 270 ++ .../dns-registrar/requester/weightedlist.go | 201 ++ .../requester/weightedlist_test.go | 101 + .../dns-registrar/responder/responder.go | 333 ++ pkg/registrars/registration/api-registrar.go | 232 ++ .../registration/api-registrar_test.go | 145 + pkg/registrars/registration/config.go | 65 + .../registration/decoy-registrar.go | 107 + pkg/registrars/registration/dns-registrar.go | 244 ++ pkg/regprocessor/auth_test.go | 4 +- pkg/regprocessor/regprocessor.go | 4 +- pkg/regprocessor/regprocessor_test.go | 4 +- .../apiregserver/apiregserver.go | 4 +- .../apiregserver/apiregserver_test.go | 2 +- .../dnsregserver/dnsregserver.go | 4 +- .../dnsregserver/dnsregserver_test.go | 2 +- pkg/regserver/overrides/README.md | 6 + pkg/regserver/overrides/overrides.go | 4 + pkg/regserver/overrides/prefix_transport.go | 216 ++ .../overrides/prefix_transport_test.go | 225 ++ {application => pkg/station}/geoip/empty.go | 0 {application => pkg/station}/geoip/geoip.go | 0 .../station}/geoip/geoip_test.go | 0 .../station}/lib/buffer_conn.go | 0 {application => pkg/station}/lib/config.go | 0 .../station}/lib/config_test.go | 3 +- {application => pkg/station}/lib/conjure.go | 2 +- .../station}/lib/detector_channel.go | 2 +- .../station}/lib/phantom_selector.go | 0 .../station}/lib/phantom_selector_test.go | 0 {application => pkg/station}/lib/phantoms.go | 0 .../station}/lib/phantoms_test.go | 0 {application => pkg/station}/lib/proxies.go | 2 +- .../station}/lib/proxies_test.go | 2 +- .../station}/lib/registration.go | 8 +- .../station}/lib/registration_config.go | 4 +- .../station}/lib/registration_config_test.go | 0 .../station}/lib/registration_ingest.go | 6 +- .../station}/lib/registration_ingest_test.go | 14 +- .../station}/lib/registration_stats.go | 4 +- .../station}/lib/registration_test.go | 2 +- {application => pkg/station}/lib/stats.go | 4 +- .../station}/lib/test/phantom_subnets.toml | 0 .../lib/test/phantom_subnets_update.toml | 0 .../station}/lib/transports.go | 2 +- .../station}/lib/transports_mock.go | 2 +- {application => pkg/station}/lib/zmq_proxy.go | 2 +- .../station}/lib/zmq_proxy_test.go | 0 .../station}/liveness/README.md | 0 .../station}/liveness/cache_lru.go | 0 .../station}/liveness/cache_map.go | 0 .../station}/liveness/cache_test.go | 0 .../station}/liveness/cached.go | 2 +- .../station}/liveness/liveness.go | 2 +- .../station}/liveness/liveness_test.go | 0 .../station}/liveness/uncached.go | 0 {application => pkg/station}/log/logger.go | 0 .../transports/anypb_nourl.go | 0 .../transports/anypb_nourl_test.go | 4 +- pkg/transports/client/transports.go | 107 + pkg/transports/client/transports_test.go | 53 + {application => pkg}/transports/obfuscate.go | 2 +- .../transports/obfuscate_test.go | 4 +- {application => pkg}/transports/transports.go | 0 .../internal/tests/phantom_subnets.toml | 0 .../internal/tests/phantom_subnets_min.toml | 0 .../wrapping/internal/tests/tests.go | 4 +- .../transports/wrapping/min/client.go | 4 +- .../transports/wrapping/min/min.go | 6 +- .../transports/wrapping/min/min_test.go | 12 +- .../transports/wrapping/obfs4/client.go | 4 +- .../transports/wrapping/obfs4/keys.go | 0 .../transports/wrapping/obfs4/obfs4.go | 6 +- .../transports/wrapping/obfs4/obfs4_test.go | 21 +- .../transports/wrapping/obfs4/utils.go | 0 pkg/transports/wrapping/prefix/client.go | 134 + pkg/transports/wrapping/prefix/prefix.go | 378 +++ pkg/transports/wrapping/prefix/prefix_test.go | 250 ++ proto/Makefile | 8 +- proto/extensions.go | 43 + proto/proto_test.go | 38 + proto/signalling.pb.go | 2961 +++++++++++++++++ proto/signalling.proto | 80 +- proto/signalling.rs | 2587 ++++++++------ src/signalling.rs | 2587 ++++++++------ 122 files changed, 16574 insertions(+), 2210 deletions(-) rename {application => cmd/application}/Makefile (100%) rename {application => cmd/application}/README.md (100%) rename {application => cmd/application}/config.toml (100%) rename {application => cmd/application}/conns.go (98%) rename {application => cmd/application}/main.go (90%) rename {application => cmd/application}/registration_with_transport_test.go (84%) create mode 100644 internal/conjurepath/conjurepath.go create mode 100644 pkg/core/interfaces/interfaces.go create mode 100644 pkg/ed25519/LICENSE create mode 100644 pkg/ed25519/ed25519.go create mode 100644 pkg/ed25519/ed25519_test.go create mode 100644 pkg/ed25519/edwards25519/const.go create mode 100644 pkg/ed25519/edwards25519/edwards25519.go create mode 100644 pkg/ed25519/extra25519/extra25519.go create mode 100644 pkg/ed25519/extra25519/extra25519_test.go create mode 100644 pkg/ed25519/testdata/sign.input.gz create mode 100644 pkg/phantoms/phantoms.go create mode 100644 pkg/phantoms/phantoms_test.go create mode 100644 pkg/registrars/dns-registrar/README.md create mode 100644 pkg/registrars/dns-registrar/dns/dns.go create mode 100644 pkg/registrars/dns-registrar/dns/dns_test.go create mode 100644 pkg/registrars/dns-registrar/encryption/encryption.go create mode 100644 pkg/registrars/dns-registrar/msgformat/msgformat.go create mode 100644 pkg/registrars/dns-registrar/msgformat/msgformat_test.go create mode 100644 pkg/registrars/dns-registrar/queuepacketconn/clientid.go create mode 100644 pkg/registrars/dns-registrar/queuepacketconn/consts.go create mode 100644 pkg/registrars/dns-registrar/queuepacketconn/queuepacketconn.go create mode 100644 pkg/registrars/dns-registrar/remotemap/remotemap.go create mode 100644 pkg/registrars/dns-registrar/requester/config.go create mode 100644 pkg/registrars/dns-registrar/requester/dns.go create mode 100644 pkg/registrars/dns-registrar/requester/http.go create mode 100644 pkg/registrars/dns-registrar/requester/http_test.go create mode 100644 pkg/registrars/dns-registrar/requester/requester.go create mode 100644 pkg/registrars/dns-registrar/requester/tls.go create mode 100644 pkg/registrars/dns-registrar/requester/utls.go create mode 100644 pkg/registrars/dns-registrar/requester/weightedlist.go create mode 100644 pkg/registrars/dns-registrar/requester/weightedlist_test.go create mode 100644 pkg/registrars/dns-registrar/responder/responder.go create mode 100644 pkg/registrars/registration/api-registrar.go create mode 100644 pkg/registrars/registration/api-registrar_test.go create mode 100644 pkg/registrars/registration/config.go create mode 100644 pkg/registrars/registration/decoy-registrar.go create mode 100644 pkg/registrars/registration/dns-registrar.go rename pkg/{ => regserver}/apiregserver/apiregserver.go (98%) rename pkg/{ => regserver}/apiregserver/apiregserver_test.go (99%) rename pkg/{ => regserver}/dnsregserver/dnsregserver.go (96%) rename pkg/{ => regserver}/dnsregserver/dnsregserver_test.go (99%) create mode 100644 pkg/regserver/overrides/README.md create mode 100644 pkg/regserver/overrides/overrides.go create mode 100644 pkg/regserver/overrides/prefix_transport.go create mode 100644 pkg/regserver/overrides/prefix_transport_test.go rename {application => pkg/station}/geoip/empty.go (100%) rename {application => pkg/station}/geoip/geoip.go (100%) rename {application => pkg/station}/geoip/geoip_test.go (100%) rename {application => pkg/station}/lib/buffer_conn.go (100%) rename {application => pkg/station}/lib/config.go (100%) rename {application => pkg/station}/lib/config_test.go (81%) rename {application => pkg/station}/lib/conjure.go (97%) rename {application => pkg/station}/lib/detector_channel.go (93%) rename {application => pkg/station}/lib/phantom_selector.go (100%) rename {application => pkg/station}/lib/phantom_selector_test.go (100%) rename {application => pkg/station}/lib/phantoms.go (100%) rename {application => pkg/station}/lib/phantoms_test.go (100%) rename {application => pkg/station}/lib/proxies.go (99%) rename {application => pkg/station}/lib/proxies_test.go (99%) rename {application => pkg/station}/lib/registration.go (99%) rename {application => pkg/station}/lib/registration_config.go (97%) rename {application => pkg/station}/lib/registration_config_test.go (100%) rename {application => pkg/station}/lib/registration_ingest.go (98%) rename {application => pkg/station}/lib/registration_ingest_test.go (86%) rename {application => pkg/station}/lib/registration_stats.go (99%) rename {application => pkg/station}/lib/registration_test.go (99%) rename {application => pkg/station}/lib/stats.go (98%) rename {application => pkg/station}/lib/test/phantom_subnets.toml (100%) rename {application => pkg/station}/lib/test/phantom_subnets_update.toml (100%) rename {application => pkg/station}/lib/transports.go (98%) rename {application => pkg/station}/lib/transports_mock.go (96%) rename {application => pkg/station}/lib/zmq_proxy.go (99%) rename {application => pkg/station}/lib/zmq_proxy_test.go (100%) rename {application => pkg/station}/liveness/README.md (100%) rename {application => pkg/station}/liveness/cache_lru.go (100%) rename {application => pkg/station}/liveness/cache_map.go (100%) rename {application => pkg/station}/liveness/cache_test.go (100%) rename {application => pkg/station}/liveness/cached.go (99%) rename {application => pkg/station}/liveness/liveness.go (99%) rename {application => pkg/station}/liveness/liveness_test.go (100%) rename {application => pkg/station}/liveness/uncached.go (100%) rename {application => pkg/station}/log/logger.go (100%) rename {application => pkg}/transports/anypb_nourl.go (100%) rename {application => pkg}/transports/anypb_nourl_test.go (91%) create mode 100644 pkg/transports/client/transports.go create mode 100644 pkg/transports/client/transports_test.go rename {application => pkg}/transports/obfuscate.go (99%) rename {application => pkg}/transports/obfuscate_test.go (94%) rename {application => pkg}/transports/transports.go (100%) rename {application => pkg}/transports/wrapping/internal/tests/phantom_subnets.toml (100%) rename {application => pkg}/transports/wrapping/internal/tests/phantom_subnets_min.toml (100%) rename {application => pkg}/transports/wrapping/internal/tests/tests.go (95%) rename {application => pkg}/transports/wrapping/min/client.go (95%) rename {application => pkg}/transports/wrapping/min/min.go (95%) rename {application => pkg}/transports/wrapping/min/min_test.go (89%) rename {application => pkg}/transports/wrapping/obfs4/client.go (96%) rename {application => pkg}/transports/wrapping/obfs4/keys.go (100%) rename {application => pkg}/transports/wrapping/obfs4/obfs4.go (96%) rename {application => pkg}/transports/wrapping/obfs4/obfs4_test.go (93%) rename {application => pkg}/transports/wrapping/obfs4/utils.go (100%) create mode 100644 pkg/transports/wrapping/prefix/client.go create mode 100644 pkg/transports/wrapping/prefix/prefix.go create mode 100644 pkg/transports/wrapping/prefix/prefix_test.go create mode 100644 proto/extensions.go create mode 100644 proto/proto_test.go create mode 100644 proto/signalling.pb.go diff --git a/application/Makefile b/cmd/application/Makefile similarity index 100% rename from application/Makefile rename to cmd/application/Makefile diff --git a/application/README.md b/cmd/application/README.md similarity index 100% rename from application/README.md rename to cmd/application/README.md diff --git a/application/config.toml b/cmd/application/config.toml similarity index 100% rename from application/config.toml rename to cmd/application/config.toml diff --git a/application/conns.go b/cmd/application/conns.go similarity index 98% rename from application/conns.go rename to cmd/application/conns.go index ae3c80b4..851073f7 100644 --- a/application/conns.go +++ b/cmd/application/conns.go @@ -15,9 +15,9 @@ import ( "syscall" "time" - cj "github.com/refraction-networking/conjure/application/lib" - "github.com/refraction-networking/conjure/application/log" - "github.com/refraction-networking/conjure/application/transports" + cj "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/station/log" + "github.com/refraction-networking/conjure/pkg/transports" ) // connManagerConfig diff --git a/application/main.go b/cmd/application/main.go similarity index 90% rename from application/main.go rename to cmd/application/main.go index ac833fe3..da57467c 100644 --- a/application/main.go +++ b/cmd/application/main.go @@ -11,11 +11,11 @@ import ( "syscall" "time" - cj "github.com/refraction-networking/conjure/application/lib" - "github.com/refraction-networking/conjure/application/log" - "github.com/refraction-networking/conjure/application/transports/wrapping/min" - "github.com/refraction-networking/conjure/application/transports/wrapping/obfs4" - pb "github.com/refraction-networking/gotapdance/protobuf" + cj "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/station/log" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/min" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/obfs4" + pb "github.com/refraction-networking/conjure/proto" ) var sharedLogger *log.Logger diff --git a/application/registration_with_transport_test.go b/cmd/application/registration_with_transport_test.go similarity index 84% rename from application/registration_with_transport_test.go rename to cmd/application/registration_with_transport_test.go index 0fbbad14..6b8c0664 100644 --- a/application/registration_with_transport_test.go +++ b/cmd/application/registration_with_transport_test.go @@ -6,11 +6,12 @@ import ( "os" "testing" - cj "github.com/refraction-networking/conjure/application/lib" - "github.com/refraction-networking/conjure/application/transports/wrapping/min" - "github.com/refraction-networking/conjure/application/transports/wrapping/obfs4" + "github.com/refraction-networking/conjure/internal/conjurepath" + cj "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/min" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/obfs4" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" ) @@ -36,9 +37,8 @@ func mockReceiveFromDetector() (*pb.ClientToStation, cj.ConjureSharedKeys) { } func TestManagerFunctionality(t *testing.T) { - cwd, _ := os.Getwd() - testSubnetPath := cwd + "/lib/test/phantom_subnets.toml" - os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) + root := conjurepath.Root + os.Setenv("PHANTOM_SUBNET_LOCATION", root+"/pkg/station/lib/test/phantom_subnets.toml") rm := cj.NewRegistrationManager(&cj.RegConfig{}) diff --git a/cmd/registration-server/main.go b/cmd/registration-server/main.go index d5d854a2..423537d2 100644 --- a/cmd/registration-server/main.go +++ b/cmd/registration-server/main.go @@ -12,14 +12,14 @@ import ( "github.com/BurntSushi/toml" zmq "github.com/pebbe/zmq4" - "github.com/refraction-networking/conjure/application/lib" - "github.com/refraction-networking/conjure/application/transports/wrapping/min" - "github.com/refraction-networking/conjure/application/transports/wrapping/obfs4" - "github.com/refraction-networking/conjure/pkg/apiregserver" - "github.com/refraction-networking/conjure/pkg/dnsregserver" "github.com/refraction-networking/conjure/pkg/metrics" "github.com/refraction-networking/conjure/pkg/regprocessor" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/regserver/apiregserver" + "github.com/refraction-networking/conjure/pkg/regserver/dnsregserver" + "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/min" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/obfs4" + pb "github.com/refraction-networking/conjure/proto" log "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" ) diff --git a/go.mod b/go.mod index 3f5ab1ca..bb7b76b5 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( gitlab.com/yawning/obfs4.git v0.0.0-20220904064028-336a71d6e4cf golang.org/x/crypto v0.5.0 google.golang.org/grpc v1.52.0 - google.golang.org/protobuf v1.28.1 + google.golang.org/protobuf v1.31.0 ) require ( @@ -32,7 +32,7 @@ require ( github.com/dchest/siphash v1.2.3 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/flynn/noise v1.0.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/oschwald/maxminddb-golang v1.10.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect gitlab.com/yawning/edwards25519-extra.git v0.0.0-20211229043746-2f91fcc9fbdb // indirect diff --git a/go.sum b/go.sum index b322fa48..ec13b965 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,8 @@ github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -88,6 +90,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/internal/conjurepath/conjurepath.go b/internal/conjurepath/conjurepath.go new file mode 100644 index 00000000..3427df11 --- /dev/null +++ b/internal/conjurepath/conjurepath.go @@ -0,0 +1,11 @@ +package conjurepath + +import ( + "path/filepath" + "runtime" +) + +var ( + _, base, _, _ = runtime.Caller(0) + Root = filepath.Join(filepath.Dir(base), "../..") +) diff --git a/pkg/core/interfaces/interfaces.go b/pkg/core/interfaces/interfaces.go new file mode 100644 index 00000000..7c472ce2 --- /dev/null +++ b/pkg/core/interfaces/interfaces.go @@ -0,0 +1,64 @@ +package interfaces + +import ( + "io" + "net" + + pb "github.com/refraction-networking/conjure/proto" + "google.golang.org/protobuf/proto" +) + +// Transport provides a generic interface for utilities that allow the client to dial and connect to +// a phantom address when creating a Conjure connection. +type Transport interface { + // Name returns a string identifier for the Transport for logging + Name() string + // String returns a string identifier for the Transport for logging (including string formatters) + String() string + + // ID provides an identifier that will be sent to the conjure station during the registration so + // that the station knows what transport to expect connecting to the chosen phantom. + ID() pb.TransportType + + // GetParams returns a generic protobuf with any parameters from both the registration and the + // transport. + GetParams() proto.Message + + // SetParams allows the caller to set parameters associated with the transport, returning an + // error if the provided generic message is not compatible. + SetParams(any) error + + // GetDstPort returns the destination port that the client should open the phantom connection with. + GetDstPort(seed []byte, params any) (uint16, error) + + // PrepareKeys provides an opportunity for the transport to integrate the station public key + // as well as bytes from the deterministic random generator associated with the registration + // that this ClientTransport is attached to. + PrepareKeys(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error + + // Connect returns a net.Conn connection given a context and ConjureReg + WrapConn(conn net.Conn) (net.Conn, error) +} + +// Overrides makes it possible to treat an array of overrides as a single override note that the +// subsequent overrides are not aware of those that come before so they may end up undoing their +// changes. +type Overrides []RegOverride + +// Override implements the RegOverride interface. +func (o Overrides) Override(reg *pb.C2SWrapper, randReader io.Reader) error { + var err error + for _, override := range o { + err = override.Override(reg, randReader) + if err != nil { + return err + } + } + return nil +} + +// RegOverride provides a generic way for the station to mutate an incoming registration before +// handing it off to the stations or returning it to the client as part of the RegResponse protobuf. +type RegOverride interface { + Override(*pb.C2SWrapper, io.Reader) error +} diff --git a/pkg/ed25519/LICENSE b/pkg/ed25519/LICENSE new file mode 100644 index 00000000..74487567 --- /dev/null +++ b/pkg/ed25519/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkg/ed25519/ed25519.go b/pkg/ed25519/ed25519.go new file mode 100644 index 00000000..e8465077 --- /dev/null +++ b/pkg/ed25519/ed25519.go @@ -0,0 +1,127 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ed25519 implements the Ed25519 signature algorithm. See +// http://ed25519.cr.yp.to/. +package ed25519 + +// This code is a port of the public domain, "ref10" implementation of ed25519 +// from SUPERCOP. + +import ( + "crypto/sha512" + "crypto/subtle" + "io" + + "github.com/refraction-networking/conjure/pkg/ed25519/edwards25519" +) + +const ( + PublicKeySize = 32 + PrivateKeySize = 64 + SignatureSize = 64 +) + +// GenerateKey generates a public/private key pair using randomness from rand. +func GenerateKey(rand io.Reader) (publicKey *[PublicKeySize]byte, privateKey *[PrivateKeySize]byte, err error) { + privateKey = new([64]byte) + publicKey = new([32]byte) + _, err = io.ReadFull(rand, privateKey[:32]) + if err != nil { + return nil, nil, err + } + + h := sha512.New() + h.Write(privateKey[:32]) + digest := h.Sum(nil) + + digest[0] &= 248 + digest[31] &= 127 + digest[31] |= 64 + + var A edwards25519.ExtendedGroupElement + var hBytes [32]byte + copy(hBytes[:], digest) + edwards25519.GeScalarMultBase(&A, &hBytes) + A.ToBytes(publicKey) + + copy(privateKey[32:], publicKey[:]) + return +} + +// Sign signs the message with privateKey and returns a signature. +func Sign(privateKey *[PrivateKeySize]byte, message []byte) *[SignatureSize]byte { + h := sha512.New() + h.Write(privateKey[:32]) + + var digest1, messageDigest, hramDigest [64]byte + var expandedSecretKey [32]byte + h.Sum(digest1[:0]) + copy(expandedSecretKey[:], digest1[:]) + expandedSecretKey[0] &= 248 + expandedSecretKey[31] &= 63 + expandedSecretKey[31] |= 64 + + h.Reset() + h.Write(digest1[32:]) + h.Write(message) + h.Sum(messageDigest[:0]) + + var messageDigestReduced [32]byte + edwards25519.ScReduce(&messageDigestReduced, &messageDigest) + var R edwards25519.ExtendedGroupElement + edwards25519.GeScalarMultBase(&R, &messageDigestReduced) + + var encodedR [32]byte + R.ToBytes(&encodedR) + + h.Reset() + h.Write(encodedR[:]) + h.Write(privateKey[32:]) + h.Write(message) + h.Sum(hramDigest[:0]) + var hramDigestReduced [32]byte + edwards25519.ScReduce(&hramDigestReduced, &hramDigest) + + var s [32]byte + edwards25519.ScMulAdd(&s, &hramDigestReduced, &expandedSecretKey, &messageDigestReduced) + + signature := new([64]byte) + copy(signature[:], encodedR[:]) + copy(signature[32:], s[:]) + return signature +} + +// Verify returns true iff sig is a valid signature of message by publicKey. +func Verify(publicKey *[PublicKeySize]byte, message []byte, sig *[SignatureSize]byte) bool { + if sig[63]&224 != 0 { + return false + } + + var A edwards25519.ExtendedGroupElement + if !A.FromBytes(publicKey) { + return false + } + edwards25519.FeNeg(&A.X, &A.X) + edwards25519.FeNeg(&A.T, &A.T) + + h := sha512.New() + h.Write(sig[:32]) + h.Write(publicKey[:]) + h.Write(message) + var digest [64]byte + h.Sum(digest[:0]) + + var hReduced [32]byte + edwards25519.ScReduce(&hReduced, &digest) + + var R edwards25519.ProjectiveGroupElement + var b [32]byte + copy(b[:], sig[32:]) + edwards25519.GeDoubleScalarMultVartime(&R, &hReduced, &A, &b) + + var checkR [32]byte + R.ToBytes(&checkR) + return subtle.ConstantTimeCompare(sig[:32], checkR[:]) == 1 +} diff --git a/pkg/ed25519/ed25519_test.go b/pkg/ed25519/ed25519_test.go new file mode 100644 index 00000000..89e379c2 --- /dev/null +++ b/pkg/ed25519/ed25519_test.go @@ -0,0 +1,160 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ed25519 + +import ( + "bufio" + "bytes" + "compress/gzip" + "crypto/rand" + "encoding/hex" + "io" + "os" + "strings" + "testing" + + "github.com/refraction-networking/conjure/pkg/ed25519/edwards25519" +) + +type zeroReader struct{} + +func (zeroReader) Read(buf []byte) (int, error) { + for i := range buf { + buf[i] = 0 + } + return len(buf), nil +} + +func TestUnmarshalMarshal(t *testing.T) { + pub, _, _ := GenerateKey(rand.Reader) + + var A edwards25519.ExtendedGroupElement + if !A.FromBytes(pub) { + t.Fatalf("ExtendedGroupElement.FromBytes failed") + } + + var pub2 [32]byte + A.ToBytes(&pub2) + + if *pub != pub2 { + t.Errorf("FromBytes(%v)->ToBytes does not round-trip, got %x\n", *pub, pub2) + } +} + +func TestSignVerify(t *testing.T) { + var zero zeroReader + public, private, _ := GenerateKey(zero) + + message := []byte("test message") + sig := Sign(private, message) + if !Verify(public, message, sig) { + t.Errorf("valid signature rejected") + } + + wrongMessage := []byte("wrong message") + if Verify(public, wrongMessage, sig) { + t.Errorf("signature of different message accepted") + } +} + +func TestGolden(t *testing.T) { + // sign.input.gz is a selection of test cases from + // http://ed25519.cr.yp.to/python/sign.input + testDataZ, err := os.Open("testdata/sign.input.gz") + if err != nil { + t.Fatal(err) + } + defer testDataZ.Close() + testData, err := gzip.NewReader(testDataZ) + if err != nil { + t.Fatal(err) + } + defer testData.Close() + + in := bufio.NewReaderSize(testData, 1<<12) + lineNo := 0 + for { + lineNo++ + lineBytes, isPrefix, err := in.ReadLine() + if isPrefix { + t.Fatal("bufio buffer too small") + } + if err != nil { + if err == io.EOF { + break + } + t.Fatalf("error reading test data: %s", err) + } + + line := string(lineBytes) + parts := strings.Split(line, ":") + if len(parts) != 5 { + t.Fatalf("bad number of parts on line %d", lineNo) + } + + privBytes, _ := hex.DecodeString(parts[0]) + pubKeyBytes, _ := hex.DecodeString(parts[1]) + msg, _ := hex.DecodeString(parts[2]) + sig, _ := hex.DecodeString(parts[3]) + // The signatures in the test vectors also include the message + // at the end, but we just want R and S. + sig = sig[:SignatureSize] + + if l := len(pubKeyBytes); l != PublicKeySize { + t.Fatalf("bad public key length on line %d: got %d bytes", lineNo, l) + } + + var priv [PrivateKeySize]byte + copy(priv[:], privBytes) + copy(priv[32:], pubKeyBytes) + + sig2 := Sign(&priv, msg) + if !bytes.Equal(sig, sig2[:]) { + t.Errorf("different signature result on line %d: %x vs %x", lineNo, sig, sig2) + } + + var pubKey [PublicKeySize]byte + copy(pubKey[:], pubKeyBytes) + if !Verify(&pubKey, msg, sig2) { + t.Errorf("signature failed to verify on line %d", lineNo) + } + } +} + +func BenchmarkKeyGeneration(b *testing.B) { + var zero zeroReader + for i := 0; i < b.N; i++ { + if _, _, err := GenerateKey(zero); err != nil { + b.Fatal(err) + } + } +} + +func BenchmarkSigning(b *testing.B) { + var zero zeroReader + _, priv, err := GenerateKey(zero) + if err != nil { + b.Fatal(err) + } + message := []byte("Hello, world!") + b.ResetTimer() + for i := 0; i < b.N; i++ { + Sign(priv, message) + } +} + +func BenchmarkVerification(b *testing.B) { + var zero zeroReader + pub, priv, err := GenerateKey(zero) + if err != nil { + b.Fatal(err) + } + message := []byte("Hello, world!") + signature := Sign(priv, message) + b.ResetTimer() + for i := 0; i < b.N; i++ { + Verify(pub, message, signature) + } +} diff --git a/pkg/ed25519/edwards25519/const.go b/pkg/ed25519/edwards25519/const.go new file mode 100644 index 00000000..ea5b77a7 --- /dev/null +++ b/pkg/ed25519/edwards25519/const.go @@ -0,0 +1,1411 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package edwards25519 + +var d = FieldElement{ + -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116, +} + +var d2 = FieldElement{ + -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199, +} + +var SqrtM1 = FieldElement{ + -32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482, +} + +var A = FieldElement{ + 486662, 0, 0, 0, 0, 0, 0, 0, 0, 0, +} + +var bi = [8]PreComputedGroupElement{ + { + FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605}, + FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378}, + FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546}, + }, + { + FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024}, + FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574}, + FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357}, + }, + { + FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380}, + FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306}, + FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942}, + }, + { + FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766}, + FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701}, + FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300}, + }, + { + FieldElement{-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877}, + FieldElement{-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951}, + FieldElement{4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784}, + }, + { + FieldElement{-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436}, + FieldElement{25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918}, + FieldElement{23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877}, + }, + { + FieldElement{-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800}, + FieldElement{-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305}, + FieldElement{-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300}, + }, + { + FieldElement{-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876}, + FieldElement{-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619}, + FieldElement{-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683}, + }, +} + +var base = [32][8]PreComputedGroupElement{ + { + { + FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605}, + FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378}, + FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546}, + }, + { + FieldElement{-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303}, + FieldElement{-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081}, + FieldElement{26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697}, + }, + { + FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024}, + FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574}, + FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357}, + }, + { + FieldElement{-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540}, + FieldElement{23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397}, + FieldElement{7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325}, + }, + { + FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380}, + FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306}, + FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942}, + }, + { + FieldElement{-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777}, + FieldElement{-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737}, + FieldElement{-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652}, + }, + { + FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766}, + FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701}, + FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300}, + }, + { + FieldElement{14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726}, + FieldElement{-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955}, + FieldElement{27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425}, + }, + }, + { + { + FieldElement{-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171}, + FieldElement{27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510}, + FieldElement{17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660}, + }, + { + FieldElement{-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639}, + FieldElement{29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963}, + FieldElement{5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950}, + }, + { + FieldElement{-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568}, + FieldElement{12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335}, + FieldElement{25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628}, + }, + { + FieldElement{-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007}, + FieldElement{-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772}, + FieldElement{-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653}, + }, + { + FieldElement{2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567}, + FieldElement{13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686}, + FieldElement{21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372}, + }, + { + FieldElement{-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887}, + FieldElement{-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954}, + FieldElement{-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953}, + }, + { + FieldElement{24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833}, + FieldElement{-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532}, + FieldElement{-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876}, + }, + { + FieldElement{2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268}, + FieldElement{33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214}, + FieldElement{1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038}, + }, + }, + { + { + FieldElement{6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800}, + FieldElement{4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645}, + FieldElement{-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664}, + }, + { + FieldElement{1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933}, + FieldElement{-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182}, + FieldElement{-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222}, + }, + { + FieldElement{-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991}, + FieldElement{20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880}, + FieldElement{9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092}, + }, + { + FieldElement{-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295}, + FieldElement{19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788}, + FieldElement{8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553}, + }, + { + FieldElement{-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026}, + FieldElement{11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347}, + FieldElement{-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033}, + }, + { + FieldElement{-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395}, + FieldElement{-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278}, + FieldElement{1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890}, + }, + { + FieldElement{32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995}, + FieldElement{-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596}, + FieldElement{-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891}, + }, + { + FieldElement{31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060}, + FieldElement{11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608}, + FieldElement{-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606}, + }, + }, + { + { + FieldElement{7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389}, + FieldElement{-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016}, + FieldElement{-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341}, + }, + { + FieldElement{-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505}, + FieldElement{14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553}, + FieldElement{-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655}, + }, + { + FieldElement{15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220}, + FieldElement{12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631}, + FieldElement{-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099}, + }, + { + FieldElement{26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556}, + FieldElement{14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749}, + FieldElement{236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930}, + }, + { + FieldElement{1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391}, + FieldElement{5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253}, + FieldElement{20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066}, + }, + { + FieldElement{24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958}, + FieldElement{-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082}, + FieldElement{-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383}, + }, + { + FieldElement{-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521}, + FieldElement{-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807}, + FieldElement{23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948}, + }, + { + FieldElement{9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134}, + FieldElement{-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455}, + FieldElement{27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629}, + }, + }, + { + { + FieldElement{-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069}, + FieldElement{-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746}, + FieldElement{24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919}, + }, + { + FieldElement{11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837}, + FieldElement{8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906}, + FieldElement{-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771}, + }, + { + FieldElement{-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817}, + FieldElement{10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098}, + FieldElement{10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409}, + }, + { + FieldElement{-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504}, + FieldElement{-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727}, + FieldElement{28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420}, + }, + { + FieldElement{-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003}, + FieldElement{-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605}, + FieldElement{-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384}, + }, + { + FieldElement{-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701}, + FieldElement{-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683}, + FieldElement{29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708}, + }, + { + FieldElement{-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563}, + FieldElement{-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260}, + FieldElement{-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387}, + }, + { + FieldElement{-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672}, + FieldElement{23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686}, + FieldElement{-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665}, + }, + }, + { + { + FieldElement{11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182}, + FieldElement{-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277}, + FieldElement{14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628}, + }, + { + FieldElement{-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474}, + FieldElement{-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539}, + FieldElement{-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822}, + }, + { + FieldElement{-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970}, + FieldElement{19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756}, + FieldElement{-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508}, + }, + { + FieldElement{-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683}, + FieldElement{-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655}, + FieldElement{-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158}, + }, + { + FieldElement{-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125}, + FieldElement{-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839}, + FieldElement{-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664}, + }, + { + FieldElement{27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294}, + FieldElement{-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899}, + FieldElement{-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070}, + }, + { + FieldElement{3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294}, + FieldElement{-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949}, + FieldElement{-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083}, + }, + { + FieldElement{31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420}, + FieldElement{-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940}, + FieldElement{29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396}, + }, + }, + { + { + FieldElement{-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567}, + FieldElement{20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127}, + FieldElement{-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294}, + }, + { + FieldElement{-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887}, + FieldElement{22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964}, + FieldElement{16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195}, + }, + { + FieldElement{9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244}, + FieldElement{24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999}, + FieldElement{-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762}, + }, + { + FieldElement{-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274}, + FieldElement{-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236}, + FieldElement{-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605}, + }, + { + FieldElement{-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761}, + FieldElement{-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884}, + FieldElement{-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482}, + }, + { + FieldElement{-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638}, + FieldElement{-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490}, + FieldElement{-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170}, + }, + { + FieldElement{5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736}, + FieldElement{10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124}, + FieldElement{-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392}, + }, + { + FieldElement{8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029}, + FieldElement{6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048}, + FieldElement{28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958}, + }, + }, + { + { + FieldElement{24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593}, + FieldElement{26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071}, + FieldElement{-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692}, + }, + { + FieldElement{11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687}, + FieldElement{-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441}, + FieldElement{-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001}, + }, + { + FieldElement{-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460}, + FieldElement{-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007}, + FieldElement{-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762}, + }, + { + FieldElement{15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005}, + FieldElement{-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674}, + FieldElement{4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035}, + }, + { + FieldElement{7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590}, + FieldElement{-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957}, + FieldElement{-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812}, + }, + { + FieldElement{33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740}, + FieldElement{-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122}, + FieldElement{-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158}, + }, + { + FieldElement{8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885}, + FieldElement{26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140}, + FieldElement{19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857}, + }, + { + FieldElement{801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155}, + FieldElement{19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260}, + FieldElement{19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483}, + }, + }, + { + { + FieldElement{-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677}, + FieldElement{32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815}, + FieldElement{22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751}, + }, + { + FieldElement{-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203}, + FieldElement{-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208}, + FieldElement{1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230}, + }, + { + FieldElement{16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850}, + FieldElement{-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389}, + FieldElement{-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968}, + }, + { + FieldElement{-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689}, + FieldElement{14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880}, + FieldElement{5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304}, + }, + { + FieldElement{30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632}, + FieldElement{-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412}, + FieldElement{20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566}, + }, + { + FieldElement{-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038}, + FieldElement{-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232}, + FieldElement{-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943}, + }, + { + FieldElement{17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856}, + FieldElement{23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738}, + FieldElement{15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971}, + }, + { + FieldElement{-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718}, + FieldElement{-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697}, + FieldElement{-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883}, + }, + }, + { + { + FieldElement{5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912}, + FieldElement{-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358}, + FieldElement{3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849}, + }, + { + FieldElement{29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307}, + FieldElement{-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977}, + FieldElement{-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335}, + }, + { + FieldElement{-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644}, + FieldElement{-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616}, + FieldElement{-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735}, + }, + { + FieldElement{-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099}, + FieldElement{29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341}, + FieldElement{-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336}, + }, + { + FieldElement{-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646}, + FieldElement{31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425}, + FieldElement{-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388}, + }, + { + FieldElement{-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743}, + FieldElement{-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822}, + FieldElement{-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462}, + }, + { + FieldElement{18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985}, + FieldElement{9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702}, + FieldElement{-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797}, + }, + { + FieldElement{21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293}, + FieldElement{27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100}, + FieldElement{19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688}, + }, + }, + { + { + FieldElement{12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186}, + FieldElement{2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610}, + FieldElement{-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707}, + }, + { + FieldElement{7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220}, + FieldElement{915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025}, + FieldElement{32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044}, + }, + { + FieldElement{32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992}, + FieldElement{-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027}, + FieldElement{21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197}, + }, + { + FieldElement{8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901}, + FieldElement{31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952}, + FieldElement{19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878}, + }, + { + FieldElement{-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390}, + FieldElement{32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730}, + FieldElement{2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730}, + }, + { + FieldElement{-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180}, + FieldElement{-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272}, + FieldElement{-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715}, + }, + { + FieldElement{-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970}, + FieldElement{-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772}, + FieldElement{-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865}, + }, + { + FieldElement{15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750}, + FieldElement{20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373}, + FieldElement{32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348}, + }, + }, + { + { + FieldElement{9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144}, + FieldElement{-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195}, + FieldElement{5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086}, + }, + { + FieldElement{-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684}, + FieldElement{-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518}, + FieldElement{-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233}, + }, + { + FieldElement{-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793}, + FieldElement{-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794}, + FieldElement{580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435}, + }, + { + FieldElement{23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921}, + FieldElement{13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518}, + FieldElement{2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563}, + }, + { + FieldElement{14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278}, + FieldElement{-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024}, + FieldElement{4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030}, + }, + { + FieldElement{10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783}, + FieldElement{27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717}, + FieldElement{6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844}, + }, + { + FieldElement{14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333}, + FieldElement{16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048}, + FieldElement{22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760}, + }, + { + FieldElement{-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760}, + FieldElement{-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757}, + FieldElement{-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112}, + }, + }, + { + { + FieldElement{-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468}, + FieldElement{3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184}, + FieldElement{10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289}, + }, + { + FieldElement{15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066}, + FieldElement{24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882}, + FieldElement{13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226}, + }, + { + FieldElement{16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101}, + FieldElement{29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279}, + FieldElement{-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811}, + }, + { + FieldElement{27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709}, + FieldElement{20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714}, + FieldElement{-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121}, + }, + { + FieldElement{9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464}, + FieldElement{12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847}, + FieldElement{13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400}, + }, + { + FieldElement{4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414}, + FieldElement{-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158}, + FieldElement{17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045}, + }, + { + FieldElement{-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415}, + FieldElement{-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459}, + FieldElement{-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079}, + }, + { + FieldElement{21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412}, + FieldElement{-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743}, + FieldElement{-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836}, + }, + }, + { + { + FieldElement{12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022}, + FieldElement{18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429}, + FieldElement{-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065}, + }, + { + FieldElement{30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861}, + FieldElement{10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000}, + FieldElement{-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101}, + }, + { + FieldElement{32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815}, + FieldElement{29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642}, + FieldElement{10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966}, + }, + { + FieldElement{25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574}, + FieldElement{-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742}, + FieldElement{-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689}, + }, + { + FieldElement{12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020}, + FieldElement{-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772}, + FieldElement{3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982}, + }, + { + FieldElement{-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953}, + FieldElement{-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218}, + FieldElement{-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265}, + }, + { + FieldElement{29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073}, + FieldElement{-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325}, + FieldElement{-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798}, + }, + { + FieldElement{-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870}, + FieldElement{-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863}, + FieldElement{-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927}, + }, + }, + { + { + FieldElement{-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267}, + FieldElement{-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663}, + FieldElement{22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862}, + }, + { + FieldElement{-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673}, + FieldElement{15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943}, + FieldElement{15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020}, + }, + { + FieldElement{-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238}, + FieldElement{11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064}, + FieldElement{14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795}, + }, + { + FieldElement{15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052}, + FieldElement{-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904}, + FieldElement{29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531}, + }, + { + FieldElement{-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979}, + FieldElement{-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841}, + FieldElement{10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431}, + }, + { + FieldElement{10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324}, + FieldElement{-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940}, + FieldElement{10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320}, + }, + { + FieldElement{-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184}, + FieldElement{14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114}, + FieldElement{30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878}, + }, + { + FieldElement{12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784}, + FieldElement{-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091}, + FieldElement{-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585}, + }, + }, + { + { + FieldElement{-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208}, + FieldElement{10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864}, + FieldElement{17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661}, + }, + { + FieldElement{7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233}, + FieldElement{26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212}, + FieldElement{-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525}, + }, + { + FieldElement{-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068}, + FieldElement{9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397}, + FieldElement{-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988}, + }, + { + FieldElement{5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889}, + FieldElement{32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038}, + FieldElement{14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697}, + }, + { + FieldElement{20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875}, + FieldElement{-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905}, + FieldElement{-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656}, + }, + { + FieldElement{11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818}, + FieldElement{27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714}, + FieldElement{10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203}, + }, + { + FieldElement{20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931}, + FieldElement{-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024}, + FieldElement{-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084}, + }, + { + FieldElement{-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204}, + FieldElement{20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817}, + FieldElement{27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667}, + }, + }, + { + { + FieldElement{11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504}, + FieldElement{-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768}, + FieldElement{-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255}, + }, + { + FieldElement{6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790}, + FieldElement{1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438}, + FieldElement{-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333}, + }, + { + FieldElement{17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971}, + FieldElement{31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905}, + FieldElement{29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409}, + }, + { + FieldElement{12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409}, + FieldElement{6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499}, + FieldElement{-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363}, + }, + { + FieldElement{28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664}, + FieldElement{-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324}, + FieldElement{-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940}, + }, + { + FieldElement{13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990}, + FieldElement{-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914}, + FieldElement{-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290}, + }, + { + FieldElement{24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257}, + FieldElement{-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433}, + FieldElement{-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236}, + }, + { + FieldElement{-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045}, + FieldElement{11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093}, + FieldElement{-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347}, + }, + }, + { + { + FieldElement{-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191}, + FieldElement{-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507}, + FieldElement{-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906}, + }, + { + FieldElement{3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018}, + FieldElement{-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109}, + FieldElement{-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926}, + }, + { + FieldElement{-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528}, + FieldElement{8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625}, + FieldElement{-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286}, + }, + { + FieldElement{2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033}, + FieldElement{27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866}, + FieldElement{21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896}, + }, + { + FieldElement{30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075}, + FieldElement{26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347}, + FieldElement{-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437}, + }, + { + FieldElement{-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165}, + FieldElement{-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588}, + FieldElement{-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193}, + }, + { + FieldElement{-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017}, + FieldElement{-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883}, + FieldElement{21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961}, + }, + { + FieldElement{8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043}, + FieldElement{29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663}, + FieldElement{-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362}, + }, + }, + { + { + FieldElement{-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860}, + FieldElement{2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466}, + FieldElement{-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063}, + }, + { + FieldElement{-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997}, + FieldElement{-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295}, + FieldElement{-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369}, + }, + { + FieldElement{9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385}, + FieldElement{18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109}, + FieldElement{2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906}, + }, + { + FieldElement{4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424}, + FieldElement{-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185}, + FieldElement{7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962}, + }, + { + FieldElement{-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325}, + FieldElement{10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593}, + FieldElement{696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404}, + }, + { + FieldElement{-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644}, + FieldElement{17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801}, + FieldElement{26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804}, + }, + { + FieldElement{-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884}, + FieldElement{-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577}, + FieldElement{-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849}, + }, + { + FieldElement{32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473}, + FieldElement{-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644}, + FieldElement{-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319}, + }, + }, + { + { + FieldElement{-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599}, + FieldElement{-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768}, + FieldElement{-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084}, + }, + { + FieldElement{-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328}, + FieldElement{-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369}, + FieldElement{20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920}, + }, + { + FieldElement{12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815}, + FieldElement{-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025}, + FieldElement{-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397}, + }, + { + FieldElement{-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448}, + FieldElement{6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981}, + FieldElement{30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165}, + }, + { + FieldElement{32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501}, + FieldElement{17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073}, + FieldElement{-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861}, + }, + { + FieldElement{14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845}, + FieldElement{-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211}, + FieldElement{18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870}, + }, + { + FieldElement{10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096}, + FieldElement{33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803}, + FieldElement{-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168}, + }, + { + FieldElement{30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965}, + FieldElement{-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505}, + FieldElement{18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598}, + }, + }, + { + { + FieldElement{5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782}, + FieldElement{5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900}, + FieldElement{-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479}, + }, + { + FieldElement{-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208}, + FieldElement{8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232}, + FieldElement{17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719}, + }, + { + FieldElement{16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271}, + FieldElement{-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326}, + FieldElement{-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132}, + }, + { + FieldElement{14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300}, + FieldElement{8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570}, + FieldElement{15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670}, + }, + { + FieldElement{-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994}, + FieldElement{-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913}, + FieldElement{31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317}, + }, + { + FieldElement{-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730}, + FieldElement{842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096}, + FieldElement{-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078}, + }, + { + FieldElement{-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411}, + FieldElement{-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905}, + FieldElement{-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654}, + }, + { + FieldElement{-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870}, + FieldElement{-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498}, + FieldElement{12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579}, + }, + }, + { + { + FieldElement{14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677}, + FieldElement{10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647}, + FieldElement{-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743}, + }, + { + FieldElement{-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468}, + FieldElement{21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375}, + FieldElement{-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155}, + }, + { + FieldElement{6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725}, + FieldElement{-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612}, + FieldElement{-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943}, + }, + { + FieldElement{-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944}, + FieldElement{30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928}, + FieldElement{9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406}, + }, + { + FieldElement{22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139}, + FieldElement{-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963}, + FieldElement{-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693}, + }, + { + FieldElement{1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734}, + FieldElement{-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680}, + FieldElement{-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410}, + }, + { + FieldElement{-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931}, + FieldElement{-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654}, + FieldElement{22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710}, + }, + { + FieldElement{29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180}, + FieldElement{-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684}, + FieldElement{-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895}, + }, + }, + { + { + FieldElement{22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501}, + FieldElement{-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413}, + FieldElement{6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880}, + }, + { + FieldElement{-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874}, + FieldElement{22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962}, + FieldElement{-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899}, + }, + { + FieldElement{21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152}, + FieldElement{9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063}, + FieldElement{7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080}, + }, + { + FieldElement{-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146}, + FieldElement{-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183}, + FieldElement{-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133}, + }, + { + FieldElement{-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421}, + FieldElement{-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622}, + FieldElement{-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197}, + }, + { + FieldElement{2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663}, + FieldElement{31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753}, + FieldElement{4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755}, + }, + { + FieldElement{-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862}, + FieldElement{-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118}, + FieldElement{26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171}, + }, + { + FieldElement{15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380}, + FieldElement{16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824}, + FieldElement{28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270}, + }, + }, + { + { + FieldElement{-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438}, + FieldElement{-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584}, + FieldElement{-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562}, + }, + { + FieldElement{30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471}, + FieldElement{18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610}, + FieldElement{19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269}, + }, + { + FieldElement{-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650}, + FieldElement{14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369}, + FieldElement{19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461}, + }, + { + FieldElement{30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462}, + FieldElement{-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793}, + FieldElement{-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218}, + }, + { + FieldElement{-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226}, + FieldElement{18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019}, + FieldElement{-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037}, + }, + { + FieldElement{31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171}, + FieldElement{-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132}, + FieldElement{-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841}, + }, + { + FieldElement{21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181}, + FieldElement{-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210}, + FieldElement{-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040}, + }, + { + FieldElement{3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935}, + FieldElement{24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105}, + FieldElement{-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814}, + }, + }, + { + { + FieldElement{793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852}, + FieldElement{5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581}, + FieldElement{-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646}, + }, + { + FieldElement{10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844}, + FieldElement{10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025}, + FieldElement{27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453}, + }, + { + FieldElement{-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068}, + FieldElement{4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192}, + FieldElement{-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921}, + }, + { + FieldElement{-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259}, + FieldElement{-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426}, + FieldElement{-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072}, + }, + { + FieldElement{-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305}, + FieldElement{13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832}, + FieldElement{28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943}, + }, + { + FieldElement{-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011}, + FieldElement{24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447}, + FieldElement{17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494}, + }, + { + FieldElement{-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245}, + FieldElement{-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859}, + FieldElement{28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915}, + }, + { + FieldElement{16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707}, + FieldElement{10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848}, + FieldElement{-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224}, + }, + }, + { + { + FieldElement{-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391}, + FieldElement{15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215}, + FieldElement{-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101}, + }, + { + FieldElement{23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713}, + FieldElement{21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849}, + FieldElement{-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930}, + }, + { + FieldElement{-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940}, + FieldElement{-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031}, + FieldElement{-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404}, + }, + { + FieldElement{-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243}, + FieldElement{-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116}, + FieldElement{-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525}, + }, + { + FieldElement{-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509}, + FieldElement{-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883}, + FieldElement{15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865}, + }, + { + FieldElement{-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660}, + FieldElement{4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273}, + FieldElement{-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138}, + }, + { + FieldElement{-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560}, + FieldElement{-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135}, + FieldElement{2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941}, + }, + { + FieldElement{-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739}, + FieldElement{18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756}, + FieldElement{-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819}, + }, + }, + { + { + FieldElement{-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347}, + FieldElement{-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028}, + FieldElement{21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075}, + }, + { + FieldElement{16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799}, + FieldElement{-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609}, + FieldElement{-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817}, + }, + { + FieldElement{-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989}, + FieldElement{-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523}, + FieldElement{4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278}, + }, + { + FieldElement{31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045}, + FieldElement{19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377}, + FieldElement{24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480}, + }, + { + FieldElement{17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016}, + FieldElement{510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426}, + FieldElement{18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525}, + }, + { + FieldElement{13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396}, + FieldElement{9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080}, + FieldElement{12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892}, + }, + { + FieldElement{15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275}, + FieldElement{11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074}, + FieldElement{20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140}, + }, + { + FieldElement{-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717}, + FieldElement{-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101}, + FieldElement{24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127}, + }, + }, + { + { + FieldElement{-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632}, + FieldElement{-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415}, + FieldElement{-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160}, + }, + { + FieldElement{31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876}, + FieldElement{22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625}, + FieldElement{-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478}, + }, + { + FieldElement{27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164}, + FieldElement{26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595}, + FieldElement{-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248}, + }, + { + FieldElement{-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858}, + FieldElement{15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193}, + FieldElement{8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184}, + }, + { + FieldElement{-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942}, + FieldElement{-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635}, + FieldElement{21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948}, + }, + { + FieldElement{11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935}, + FieldElement{-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415}, + FieldElement{-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416}, + }, + { + FieldElement{-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018}, + FieldElement{4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778}, + FieldElement{366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659}, + }, + { + FieldElement{-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385}, + FieldElement{18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503}, + FieldElement{476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329}, + }, + }, + { + { + FieldElement{20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056}, + FieldElement{-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838}, + FieldElement{24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948}, + }, + { + FieldElement{-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691}, + FieldElement{-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118}, + FieldElement{-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517}, + }, + { + FieldElement{-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269}, + FieldElement{-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904}, + FieldElement{-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589}, + }, + { + FieldElement{-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193}, + FieldElement{-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910}, + FieldElement{-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930}, + }, + { + FieldElement{-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667}, + FieldElement{25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481}, + FieldElement{-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876}, + }, + { + FieldElement{22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640}, + FieldElement{-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278}, + FieldElement{-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112}, + }, + { + FieldElement{26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272}, + FieldElement{17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012}, + FieldElement{-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221}, + }, + { + FieldElement{30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046}, + FieldElement{13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345}, + FieldElement{-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310}, + }, + }, + { + { + FieldElement{19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937}, + FieldElement{31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636}, + FieldElement{-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008}, + }, + { + FieldElement{-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429}, + FieldElement{-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576}, + FieldElement{31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066}, + }, + { + FieldElement{-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490}, + FieldElement{-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104}, + FieldElement{33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053}, + }, + { + FieldElement{31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275}, + FieldElement{-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511}, + FieldElement{22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095}, + }, + { + FieldElement{-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439}, + FieldElement{23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939}, + FieldElement{-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424}, + }, + { + FieldElement{2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310}, + FieldElement{3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608}, + FieldElement{-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079}, + }, + { + FieldElement{-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101}, + FieldElement{21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418}, + FieldElement{18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576}, + }, + { + FieldElement{30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356}, + FieldElement{9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996}, + FieldElement{-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099}, + }, + }, + { + { + FieldElement{-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728}, + FieldElement{-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658}, + FieldElement{-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242}, + }, + { + FieldElement{-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001}, + FieldElement{-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766}, + FieldElement{18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373}, + }, + { + FieldElement{26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458}, + FieldElement{-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628}, + FieldElement{-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657}, + }, + { + FieldElement{-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062}, + FieldElement{25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616}, + FieldElement{31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014}, + }, + { + FieldElement{24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383}, + FieldElement{-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814}, + FieldElement{-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718}, + }, + { + FieldElement{30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417}, + FieldElement{2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222}, + FieldElement{33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444}, + }, + { + FieldElement{-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597}, + FieldElement{23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970}, + FieldElement{1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799}, + }, + { + FieldElement{-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647}, + FieldElement{13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511}, + FieldElement{-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032}, + }, + }, + { + { + FieldElement{9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834}, + FieldElement{-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461}, + FieldElement{29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062}, + }, + { + FieldElement{-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516}, + FieldElement{-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547}, + FieldElement{-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240}, + }, + { + FieldElement{-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038}, + FieldElement{-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741}, + FieldElement{16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103}, + }, + { + FieldElement{-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747}, + FieldElement{-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323}, + FieldElement{31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016}, + }, + { + FieldElement{-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373}, + FieldElement{15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228}, + FieldElement{-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141}, + }, + { + FieldElement{16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399}, + FieldElement{11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831}, + FieldElement{-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376}, + }, + { + FieldElement{-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313}, + FieldElement{-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958}, + FieldElement{-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577}, + }, + { + FieldElement{-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743}, + FieldElement{29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684}, + FieldElement{-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476}, + }, + }, +} diff --git a/pkg/ed25519/edwards25519/edwards25519.go b/pkg/ed25519/edwards25519/edwards25519.go new file mode 100644 index 00000000..90798185 --- /dev/null +++ b/pkg/ed25519/edwards25519/edwards25519.go @@ -0,0 +1,1773 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package edwards25519 implements operations in GF(2**255-19) and on an +// Edwards curve that is isomorphic to curve25519. See +// http://ed25519.cr.yp.to/. +package edwards25519 + +// This code is a port of the public domain, "ref10" implementation of ed25519 +// from SUPERCOP. + +// FieldElement represents an element of the field GF(2^255 - 19). An element +// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77 +// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on +// context. +type FieldElement [10]int32 + +var zero FieldElement + +func FeZero(fe *FieldElement) { + copy(fe[:], zero[:]) +} + +func FeOne(fe *FieldElement) { + FeZero(fe) + fe[0] = 1 +} + +func FeAdd(dst, a, b *FieldElement) { + dst[0] = a[0] + b[0] + dst[1] = a[1] + b[1] + dst[2] = a[2] + b[2] + dst[3] = a[3] + b[3] + dst[4] = a[4] + b[4] + dst[5] = a[5] + b[5] + dst[6] = a[6] + b[6] + dst[7] = a[7] + b[7] + dst[8] = a[8] + b[8] + dst[9] = a[9] + b[9] +} + +func FeSub(dst, a, b *FieldElement) { + dst[0] = a[0] - b[0] + dst[1] = a[1] - b[1] + dst[2] = a[2] - b[2] + dst[3] = a[3] - b[3] + dst[4] = a[4] - b[4] + dst[5] = a[5] - b[5] + dst[6] = a[6] - b[6] + dst[7] = a[7] - b[7] + dst[8] = a[8] - b[8] + dst[9] = a[9] - b[9] +} + +func FeCopy(dst, src *FieldElement) { + copy(dst[:], src[:]) +} + +// Replace (f,g) with (g,g) if b == 1; +// replace (f,g) with (f,g) if b == 0. +// +// Preconditions: b in {0,1}. +func FeCMove(f, g *FieldElement, b int32) { + b = -b + f[0] ^= b & (f[0] ^ g[0]) + f[1] ^= b & (f[1] ^ g[1]) + f[2] ^= b & (f[2] ^ g[2]) + f[3] ^= b & (f[3] ^ g[3]) + f[4] ^= b & (f[4] ^ g[4]) + f[5] ^= b & (f[5] ^ g[5]) + f[6] ^= b & (f[6] ^ g[6]) + f[7] ^= b & (f[7] ^ g[7]) + f[8] ^= b & (f[8] ^ g[8]) + f[9] ^= b & (f[9] ^ g[9]) +} + +func load3(in []byte) int64 { + var r int64 + r = int64(in[0]) + r |= int64(in[1]) << 8 + r |= int64(in[2]) << 16 + return r +} + +func load4(in []byte) int64 { + var r int64 + r = int64(in[0]) + r |= int64(in[1]) << 8 + r |= int64(in[2]) << 16 + r |= int64(in[3]) << 24 + return r +} + +func FeFromBytes(dst *FieldElement, src *[32]byte) { + h0 := load4(src[:]) + h1 := load3(src[4:]) << 6 + h2 := load3(src[7:]) << 5 + h3 := load3(src[10:]) << 3 + h4 := load3(src[13:]) << 2 + h5 := load4(src[16:]) + h6 := load3(src[20:]) << 7 + h7 := load3(src[23:]) << 5 + h8 := load3(src[26:]) << 4 + h9 := (load3(src[29:]) & 8388607) << 2 + + FeCombine(dst, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +// FeToBytes marshals h to s. +// Preconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +// +// Write p=2^255-19; q=floor(h/p). +// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))). +// +// Proof: +// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4. +// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4. +// +// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9). +// Then 0> 25 + q = (h[0] + q) >> 26 + q = (h[1] + q) >> 25 + q = (h[2] + q) >> 26 + q = (h[3] + q) >> 25 + q = (h[4] + q) >> 26 + q = (h[5] + q) >> 25 + q = (h[6] + q) >> 26 + q = (h[7] + q) >> 25 + q = (h[8] + q) >> 26 + q = (h[9] + q) >> 25 + + // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. + h[0] += 19 * q + // Goal: Output h-2^255 q, which is between 0 and 2^255-20. + + carry[0] = h[0] >> 26 + h[1] += carry[0] + h[0] -= carry[0] << 26 + carry[1] = h[1] >> 25 + h[2] += carry[1] + h[1] -= carry[1] << 25 + carry[2] = h[2] >> 26 + h[3] += carry[2] + h[2] -= carry[2] << 26 + carry[3] = h[3] >> 25 + h[4] += carry[3] + h[3] -= carry[3] << 25 + carry[4] = h[4] >> 26 + h[5] += carry[4] + h[4] -= carry[4] << 26 + carry[5] = h[5] >> 25 + h[6] += carry[5] + h[5] -= carry[5] << 25 + carry[6] = h[6] >> 26 + h[7] += carry[6] + h[6] -= carry[6] << 26 + carry[7] = h[7] >> 25 + h[8] += carry[7] + h[7] -= carry[7] << 25 + carry[8] = h[8] >> 26 + h[9] += carry[8] + h[8] -= carry[8] << 26 + carry[9] = h[9] >> 25 + h[9] -= carry[9] << 25 + // h10 = carry9 + + // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20. + // Have h[0]+...+2^230 h[9] between 0 and 2^255-1; + // evidently 2^255 h10-2^255 q = 0. + // Goal: Output h[0]+...+2^230 h[9]. + + s[0] = byte(h[0] >> 0) + s[1] = byte(h[0] >> 8) + s[2] = byte(h[0] >> 16) + s[3] = byte((h[0] >> 24) | (h[1] << 2)) + s[4] = byte(h[1] >> 6) + s[5] = byte(h[1] >> 14) + s[6] = byte((h[1] >> 22) | (h[2] << 3)) + s[7] = byte(h[2] >> 5) + s[8] = byte(h[2] >> 13) + s[9] = byte((h[2] >> 21) | (h[3] << 5)) + s[10] = byte(h[3] >> 3) + s[11] = byte(h[3] >> 11) + s[12] = byte((h[3] >> 19) | (h[4] << 6)) + s[13] = byte(h[4] >> 2) + s[14] = byte(h[4] >> 10) + s[15] = byte(h[4] >> 18) + s[16] = byte(h[5] >> 0) + s[17] = byte(h[5] >> 8) + s[18] = byte(h[5] >> 16) + s[19] = byte((h[5] >> 24) | (h[6] << 1)) + s[20] = byte(h[6] >> 7) + s[21] = byte(h[6] >> 15) + s[22] = byte((h[6] >> 23) | (h[7] << 3)) + s[23] = byte(h[7] >> 5) + s[24] = byte(h[7] >> 13) + s[25] = byte((h[7] >> 21) | (h[8] << 4)) + s[26] = byte(h[8] >> 4) + s[27] = byte(h[8] >> 12) + s[28] = byte((h[8] >> 20) | (h[9] << 6)) + s[29] = byte(h[9] >> 2) + s[30] = byte(h[9] >> 10) + s[31] = byte(h[9] >> 18) +} + +func FeIsNegative(f *FieldElement) byte { + var s [32]byte + FeToBytes(&s, f) + return s[0] & 1 +} + +func FeIsNonZero(f *FieldElement) int32 { + var s [32]byte + FeToBytes(&s, f) + var x uint8 + for _, b := range s { + x |= b + } + x |= x >> 4 + x |= x >> 2 + x |= x >> 1 + return int32(x & 1) +} + +// FeNeg sets h = -f +// +// Preconditions: +// |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +// +// Postconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +func FeNeg(h, f *FieldElement) { + h[0] = -f[0] + h[1] = -f[1] + h[2] = -f[2] + h[3] = -f[3] + h[4] = -f[4] + h[5] = -f[5] + h[6] = -f[6] + h[7] = -f[7] + h[8] = -f[8] + h[9] = -f[9] +} + +func FeCombine(h *FieldElement, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) { + var c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 int64 + + /* + |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38)) + i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8 + |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19)) + i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9 + */ + + c0 = (h0 + (1 << 25)) >> 26 + h1 += c0 + h0 -= c0 << 26 + c4 = (h4 + (1 << 25)) >> 26 + h5 += c4 + h4 -= c4 << 26 + /* |h0| <= 2^25 */ + /* |h4| <= 2^25 */ + /* |h1| <= 1.51*2^58 */ + /* |h5| <= 1.51*2^58 */ + + c1 = (h1 + (1 << 24)) >> 25 + h2 += c1 + h1 -= c1 << 25 + c5 = (h5 + (1 << 24)) >> 25 + h6 += c5 + h5 -= c5 << 25 + /* |h1| <= 2^24; from now on fits into int32 */ + /* |h5| <= 2^24; from now on fits into int32 */ + /* |h2| <= 1.21*2^59 */ + /* |h6| <= 1.21*2^59 */ + + c2 = (h2 + (1 << 25)) >> 26 + h3 += c2 + h2 -= c2 << 26 + c6 = (h6 + (1 << 25)) >> 26 + h7 += c6 + h6 -= c6 << 26 + /* |h2| <= 2^25; from now on fits into int32 unchanged */ + /* |h6| <= 2^25; from now on fits into int32 unchanged */ + /* |h3| <= 1.51*2^58 */ + /* |h7| <= 1.51*2^58 */ + + c3 = (h3 + (1 << 24)) >> 25 + h4 += c3 + h3 -= c3 << 25 + c7 = (h7 + (1 << 24)) >> 25 + h8 += c7 + h7 -= c7 << 25 + /* |h3| <= 2^24; from now on fits into int32 unchanged */ + /* |h7| <= 2^24; from now on fits into int32 unchanged */ + /* |h4| <= 1.52*2^33 */ + /* |h8| <= 1.52*2^33 */ + + c4 = (h4 + (1 << 25)) >> 26 + h5 += c4 + h4 -= c4 << 26 + c8 = (h8 + (1 << 25)) >> 26 + h9 += c8 + h8 -= c8 << 26 + /* |h4| <= 2^25; from now on fits into int32 unchanged */ + /* |h8| <= 2^25; from now on fits into int32 unchanged */ + /* |h5| <= 1.01*2^24 */ + /* |h9| <= 1.51*2^58 */ + + c9 = (h9 + (1 << 24)) >> 25 + h0 += c9 * 19 + h9 -= c9 << 25 + /* |h9| <= 2^24; from now on fits into int32 unchanged */ + /* |h0| <= 1.8*2^37 */ + + c0 = (h0 + (1 << 25)) >> 26 + h1 += c0 + h0 -= c0 << 26 + /* |h0| <= 2^25; from now on fits into int32 unchanged */ + /* |h1| <= 1.01*2^24 */ + + h[0] = int32(h0) + h[1] = int32(h1) + h[2] = int32(h2) + h[3] = int32(h3) + h[4] = int32(h4) + h[5] = int32(h5) + h[6] = int32(h6) + h[7] = int32(h7) + h[8] = int32(h8) + h[9] = int32(h9) +} + +// FeMul calculates h = f * g +// Can overlap h with f or g. +// +// Preconditions: +// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. +// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. +// +// Postconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +// +// Notes on implementation strategy: +// +// Using schoolbook multiplication. +// Karatsuba would save a little in some cost models. +// +// Most multiplications by 2 and 19 are 32-bit precomputations; +// cheaper than 64-bit postcomputations. +// +// There is one remaining multiplication by 19 in the carry chain; +// one *19 precomputation can be merged into this, +// but the resulting data flow is considerably less clean. +// +// There are 12 carries below. +// 10 of them are 2-way parallelizable and vectorizable. +// Can get away with 11 carries, but then data flow is much deeper. +// +// With tighter constraints on inputs can squeeze carries into int32. +func FeMul(h, f, g *FieldElement) { + f0 := int64(f[0]) + f1 := int64(f[1]) + f2 := int64(f[2]) + f3 := int64(f[3]) + f4 := int64(f[4]) + f5 := int64(f[5]) + f6 := int64(f[6]) + f7 := int64(f[7]) + f8 := int64(f[8]) + f9 := int64(f[9]) + + f1_2 := int64(2 * f[1]) + f3_2 := int64(2 * f[3]) + f5_2 := int64(2 * f[5]) + f7_2 := int64(2 * f[7]) + f9_2 := int64(2 * f[9]) + + g0 := int64(g[0]) + g1 := int64(g[1]) + g2 := int64(g[2]) + g3 := int64(g[3]) + g4 := int64(g[4]) + g5 := int64(g[5]) + g6 := int64(g[6]) + g7 := int64(g[7]) + g8 := int64(g[8]) + g9 := int64(g[9]) + + g1_19 := int64(19 * g[1]) /* 1.4*2^29 */ + g2_19 := int64(19 * g[2]) /* 1.4*2^30; still ok */ + g3_19 := int64(19 * g[3]) + g4_19 := int64(19 * g[4]) + g5_19 := int64(19 * g[5]) + g6_19 := int64(19 * g[6]) + g7_19 := int64(19 * g[7]) + g8_19 := int64(19 * g[8]) + g9_19 := int64(19 * g[9]) + + h0 := f0*g0 + f1_2*g9_19 + f2*g8_19 + f3_2*g7_19 + f4*g6_19 + f5_2*g5_19 + f6*g4_19 + f7_2*g3_19 + f8*g2_19 + f9_2*g1_19 + h1 := f0*g1 + f1*g0 + f2*g9_19 + f3*g8_19 + f4*g7_19 + f5*g6_19 + f6*g5_19 + f7*g4_19 + f8*g3_19 + f9*g2_19 + h2 := f0*g2 + f1_2*g1 + f2*g0 + f3_2*g9_19 + f4*g8_19 + f5_2*g7_19 + f6*g6_19 + f7_2*g5_19 + f8*g4_19 + f9_2*g3_19 + h3 := f0*g3 + f1*g2 + f2*g1 + f3*g0 + f4*g9_19 + f5*g8_19 + f6*g7_19 + f7*g6_19 + f8*g5_19 + f9*g4_19 + h4 := f0*g4 + f1_2*g3 + f2*g2 + f3_2*g1 + f4*g0 + f5_2*g9_19 + f6*g8_19 + f7_2*g7_19 + f8*g6_19 + f9_2*g5_19 + h5 := f0*g5 + f1*g4 + f2*g3 + f3*g2 + f4*g1 + f5*g0 + f6*g9_19 + f7*g8_19 + f8*g7_19 + f9*g6_19 + h6 := f0*g6 + f1_2*g5 + f2*g4 + f3_2*g3 + f4*g2 + f5_2*g1 + f6*g0 + f7_2*g9_19 + f8*g8_19 + f9_2*g7_19 + h7 := f0*g7 + f1*g6 + f2*g5 + f3*g4 + f4*g3 + f5*g2 + f6*g1 + f7*g0 + f8*g9_19 + f9*g8_19 + h8 := f0*g8 + f1_2*g7 + f2*g6 + f3_2*g5 + f4*g4 + f5_2*g3 + f6*g2 + f7_2*g1 + f8*g0 + f9_2*g9_19 + h9 := f0*g9 + f1*g8 + f2*g7 + f3*g6 + f4*g5 + f5*g4 + f6*g3 + f7*g2 + f8*g1 + f9*g0 + + FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +func feSquare(f *FieldElement) (h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) { + f0 := int64(f[0]) + f1 := int64(f[1]) + f2 := int64(f[2]) + f3 := int64(f[3]) + f4 := int64(f[4]) + f5 := int64(f[5]) + f6 := int64(f[6]) + f7 := int64(f[7]) + f8 := int64(f[8]) + f9 := int64(f[9]) + f0_2 := int64(2 * f[0]) + f1_2 := int64(2 * f[1]) + f2_2 := int64(2 * f[2]) + f3_2 := int64(2 * f[3]) + f4_2 := int64(2 * f[4]) + f5_2 := int64(2 * f[5]) + f6_2 := int64(2 * f[6]) + f7_2 := int64(2 * f[7]) + f5_38 := 38 * f5 // 1.31*2^30 + f6_19 := 19 * f6 // 1.31*2^30 + f7_38 := 38 * f7 // 1.31*2^30 + f8_19 := 19 * f8 // 1.31*2^30 + f9_38 := 38 * f9 // 1.31*2^30 + + h0 = f0*f0 + f1_2*f9_38 + f2_2*f8_19 + f3_2*f7_38 + f4_2*f6_19 + f5*f5_38 + h1 = f0_2*f1 + f2*f9_38 + f3_2*f8_19 + f4*f7_38 + f5_2*f6_19 + h2 = f0_2*f2 + f1_2*f1 + f3_2*f9_38 + f4_2*f8_19 + f5_2*f7_38 + f6*f6_19 + h3 = f0_2*f3 + f1_2*f2 + f4*f9_38 + f5_2*f8_19 + f6*f7_38 + h4 = f0_2*f4 + f1_2*f3_2 + f2*f2 + f5_2*f9_38 + f6_2*f8_19 + f7*f7_38 + h5 = f0_2*f5 + f1_2*f4 + f2_2*f3 + f6*f9_38 + f7_2*f8_19 + h6 = f0_2*f6 + f1_2*f5_2 + f2_2*f4 + f3_2*f3 + f7_2*f9_38 + f8*f8_19 + h7 = f0_2*f7 + f1_2*f6 + f2_2*f5 + f3_2*f4 + f8*f9_38 + h8 = f0_2*f8 + f1_2*f7_2 + f2_2*f6 + f3_2*f5_2 + f4*f4 + f9*f9_38 + h9 = f0_2*f9 + f1_2*f8 + f2_2*f7 + f3_2*f6 + f4_2*f5 + + return +} + +// FeSquare calculates h = f*f. Can overlap h with f. +// +// Preconditions: +// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. +// +// Postconditions: +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +func FeSquare(h, f *FieldElement) { + h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f) + FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +// FeSquare2 sets h = 2 * f * f +// +// Can overlap h with f. +// +// Preconditions: +// |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc. +// +// Postconditions: +// |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc. +// See fe_mul.c for discussion of implementation strategy. +func FeSquare2(h, f *FieldElement) { + h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f) + + h0 += h0 + h1 += h1 + h2 += h2 + h3 += h3 + h4 += h4 + h5 += h5 + h6 += h6 + h7 += h7 + h8 += h8 + h9 += h9 + + FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9) +} + +func FeInvert(out, z *FieldElement) { + var t0, t1, t2, t3 FieldElement + var i int + + FeSquare(&t0, z) // 2^1 + FeSquare(&t1, &t0) // 2^2 + for i = 1; i < 2; i++ { // 2^3 + FeSquare(&t1, &t1) + } + FeMul(&t1, z, &t1) // 2^3 + 2^0 + FeMul(&t0, &t0, &t1) // 2^3 + 2^1 + 2^0 + FeSquare(&t2, &t0) // 2^4 + 2^2 + 2^1 + FeMul(&t1, &t1, &t2) // 2^4 + 2^3 + 2^2 + 2^1 + 2^0 + FeSquare(&t2, &t1) // 5,4,3,2,1 + for i = 1; i < 5; i++ { // 9,8,7,6,5 + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0 + FeSquare(&t2, &t1) // 10..1 + for i = 1; i < 10; i++ { // 19..10 + FeSquare(&t2, &t2) + } + FeMul(&t2, &t2, &t1) // 19..0 + FeSquare(&t3, &t2) // 20..1 + for i = 1; i < 20; i++ { // 39..20 + FeSquare(&t3, &t3) + } + FeMul(&t2, &t3, &t2) // 39..0 + FeSquare(&t2, &t2) // 40..1 + for i = 1; i < 10; i++ { // 49..10 + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) // 49..0 + FeSquare(&t2, &t1) // 50..1 + for i = 1; i < 50; i++ { // 99..50 + FeSquare(&t2, &t2) + } + FeMul(&t2, &t2, &t1) // 99..0 + FeSquare(&t3, &t2) // 100..1 + for i = 1; i < 100; i++ { // 199..100 + FeSquare(&t3, &t3) + } + FeMul(&t2, &t3, &t2) // 199..0 + FeSquare(&t2, &t2) // 200..1 + for i = 1; i < 50; i++ { // 249..50 + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) // 249..0 + FeSquare(&t1, &t1) // 250..1 + for i = 1; i < 5; i++ { // 254..5 + FeSquare(&t1, &t1) + } + FeMul(out, &t1, &t0) // 254..5,3,1,0 +} + +func fePow22523(out, z *FieldElement) { + var t0, t1, t2 FieldElement + var i int + + FeSquare(&t0, z) + for i = 1; i < 1; i++ { + FeSquare(&t0, &t0) + } + FeSquare(&t1, &t0) + for i = 1; i < 2; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t1, z, &t1) + FeMul(&t0, &t0, &t1) + FeSquare(&t0, &t0) + for i = 1; i < 1; i++ { + FeSquare(&t0, &t0) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t1, &t0) + for i = 1; i < 5; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t1, &t0) + for i = 1; i < 10; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t1, &t1, &t0) + FeSquare(&t2, &t1) + for i = 1; i < 20; i++ { + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) + FeSquare(&t1, &t1) + for i = 1; i < 10; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t1, &t0) + for i = 1; i < 50; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t1, &t1, &t0) + FeSquare(&t2, &t1) + for i = 1; i < 100; i++ { + FeSquare(&t2, &t2) + } + FeMul(&t1, &t2, &t1) + FeSquare(&t1, &t1) + for i = 1; i < 50; i++ { + FeSquare(&t1, &t1) + } + FeMul(&t0, &t1, &t0) + FeSquare(&t0, &t0) + for i = 1; i < 2; i++ { + FeSquare(&t0, &t0) + } + FeMul(out, &t0, z) +} + +// Group elements are members of the elliptic curve -x^2 + y^2 = 1 + d * x^2 * +// y^2 where d = -121665/121666. +// +// Several representations are used: +// ProjectiveGroupElement: (X:Y:Z) satisfying x=X/Z, y=Y/Z +// ExtendedGroupElement: (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT +// CompletedGroupElement: ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T +// PreComputedGroupElement: (y+x,y-x,2dxy) + +type ProjectiveGroupElement struct { + X, Y, Z FieldElement +} + +type ExtendedGroupElement struct { + X, Y, Z, T FieldElement +} + +type CompletedGroupElement struct { + X, Y, Z, T FieldElement +} + +type PreComputedGroupElement struct { + yPlusX, yMinusX, xy2d FieldElement +} + +type CachedGroupElement struct { + yPlusX, yMinusX, Z, T2d FieldElement +} + +func (p *ProjectiveGroupElement) Zero() { + FeZero(&p.X) + FeOne(&p.Y) + FeOne(&p.Z) +} + +func (p *ProjectiveGroupElement) Double(r *CompletedGroupElement) { + var t0 FieldElement + + FeSquare(&r.X, &p.X) + FeSquare(&r.Z, &p.Y) + FeSquare2(&r.T, &p.Z) + FeAdd(&r.Y, &p.X, &p.Y) + FeSquare(&t0, &r.Y) + FeAdd(&r.Y, &r.Z, &r.X) + FeSub(&r.Z, &r.Z, &r.X) + FeSub(&r.X, &t0, &r.Y) + FeSub(&r.T, &r.T, &r.Z) +} + +func (p *ProjectiveGroupElement) ToBytes(s *[32]byte) { + var recip, x, y FieldElement + + FeInvert(&recip, &p.Z) + FeMul(&x, &p.X, &recip) + FeMul(&y, &p.Y, &recip) + FeToBytes(s, &y) + s[31] ^= FeIsNegative(&x) << 7 +} + +func (p *ExtendedGroupElement) Zero() { + FeZero(&p.X) + FeOne(&p.Y) + FeOne(&p.Z) + FeZero(&p.T) +} + +func (p *ExtendedGroupElement) Double(r *CompletedGroupElement) { + var q ProjectiveGroupElement + p.ToProjective(&q) + q.Double(r) +} + +func (p *ExtendedGroupElement) ToCached(r *CachedGroupElement) { + FeAdd(&r.yPlusX, &p.Y, &p.X) + FeSub(&r.yMinusX, &p.Y, &p.X) + FeCopy(&r.Z, &p.Z) + FeMul(&r.T2d, &p.T, &d2) +} + +func (p *ExtendedGroupElement) ToProjective(r *ProjectiveGroupElement) { + FeCopy(&r.X, &p.X) + FeCopy(&r.Y, &p.Y) + FeCopy(&r.Z, &p.Z) +} + +func (p *ExtendedGroupElement) ToBytes(s *[32]byte) { + var recip, x, y FieldElement + + FeInvert(&recip, &p.Z) + FeMul(&x, &p.X, &recip) + FeMul(&y, &p.Y, &recip) + FeToBytes(s, &y) + s[31] ^= FeIsNegative(&x) << 7 +} + +func (p *ExtendedGroupElement) FromBytes(s *[32]byte) bool { + var u, v, v3, vxx, check FieldElement + + FeFromBytes(&p.Y, s) + FeOne(&p.Z) + FeSquare(&u, &p.Y) + FeMul(&v, &u, &d) + FeSub(&u, &u, &p.Z) // y = y^2-1 + FeAdd(&v, &v, &p.Z) // v = dy^2+1 + + FeSquare(&v3, &v) + FeMul(&v3, &v3, &v) // v3 = v^3 + FeSquare(&p.X, &v3) + FeMul(&p.X, &p.X, &v) + FeMul(&p.X, &p.X, &u) // x = uv^7 + + fePow22523(&p.X, &p.X) // x = (uv^7)^((q-5)/8) + FeMul(&p.X, &p.X, &v3) + FeMul(&p.X, &p.X, &u) // x = uv^3(uv^7)^((q-5)/8) + + var tmpX, tmp2 [32]byte + + FeSquare(&vxx, &p.X) + FeMul(&vxx, &vxx, &v) + FeSub(&check, &vxx, &u) // vx^2-u + if FeIsNonZero(&check) == 1 { + FeAdd(&check, &vxx, &u) // vx^2+u + if FeIsNonZero(&check) == 1 { + return false + } + FeMul(&p.X, &p.X, &SqrtM1) + + FeToBytes(&tmpX, &p.X) + for i, v := range tmpX { + tmp2[31-i] = v + } + } + + if FeIsNegative(&p.X) != (s[31] >> 7) { + FeNeg(&p.X, &p.X) + } + + FeMul(&p.T, &p.X, &p.Y) + return true +} + +func (p *CompletedGroupElement) ToProjective(r *ProjectiveGroupElement) { + FeMul(&r.X, &p.X, &p.T) + FeMul(&r.Y, &p.Y, &p.Z) + FeMul(&r.Z, &p.Z, &p.T) +} + +func (p *CompletedGroupElement) ToExtended(r *ExtendedGroupElement) { + FeMul(&r.X, &p.X, &p.T) + FeMul(&r.Y, &p.Y, &p.Z) + FeMul(&r.Z, &p.Z, &p.T) + FeMul(&r.T, &p.X, &p.Y) +} + +func (p *PreComputedGroupElement) Zero() { + FeOne(&p.yPlusX) + FeOne(&p.yMinusX) + FeZero(&p.xy2d) +} + +func geAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yPlusX) + FeMul(&r.Y, &r.Y, &q.yMinusX) + FeMul(&r.T, &q.T2d, &p.T) + FeMul(&r.X, &p.Z, &q.Z) + FeAdd(&t0, &r.X, &r.X) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeAdd(&r.Z, &t0, &r.T) + FeSub(&r.T, &t0, &r.T) +} + +func geSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yMinusX) + FeMul(&r.Y, &r.Y, &q.yPlusX) + FeMul(&r.T, &q.T2d, &p.T) + FeMul(&r.X, &p.Z, &q.Z) + FeAdd(&t0, &r.X, &r.X) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeSub(&r.Z, &t0, &r.T) + FeAdd(&r.T, &t0, &r.T) +} + +func geMixedAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yPlusX) + FeMul(&r.Y, &r.Y, &q.yMinusX) + FeMul(&r.T, &q.xy2d, &p.T) + FeAdd(&t0, &p.Z, &p.Z) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeAdd(&r.Z, &t0, &r.T) + FeSub(&r.T, &t0, &r.T) +} + +func geMixedSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) { + var t0 FieldElement + + FeAdd(&r.X, &p.Y, &p.X) + FeSub(&r.Y, &p.Y, &p.X) + FeMul(&r.Z, &r.X, &q.yMinusX) + FeMul(&r.Y, &r.Y, &q.yPlusX) + FeMul(&r.T, &q.xy2d, &p.T) + FeAdd(&t0, &p.Z, &p.Z) + FeSub(&r.X, &r.Z, &r.Y) + FeAdd(&r.Y, &r.Z, &r.Y) + FeSub(&r.Z, &t0, &r.T) + FeAdd(&r.T, &t0, &r.T) +} + +func slide(r *[256]int8, a *[32]byte) { + for i := range r { + r[i] = int8(1 & (a[i>>3] >> uint(i&7))) + } + + for i := range r { + if r[i] != 0 { + for b := 1; b <= 6 && i+b < 256; b++ { + if r[i+b] != 0 { + if r[i]+(r[i+b]<= -15 { + r[i] -= r[i+b] << uint(b) + for k := i + b; k < 256; k++ { + if r[k] == 0 { + r[k] = 1 + break + } + r[k] = 0 + } + } else { + break + } + } + } + } + } +} + +// GeDoubleScalarMultVartime sets r = a*A + b*B +// where a = a[0]+256*a[1]+...+256^31 a[31]. +// and b = b[0]+256*b[1]+...+256^31 b[31]. +// B is the Ed25519 base point (x,4/5) with x positive. +func GeDoubleScalarMultVartime(r *ProjectiveGroupElement, a *[32]byte, A *ExtendedGroupElement, b *[32]byte) { + var aSlide, bSlide [256]int8 + var Ai [8]CachedGroupElement // A,3A,5A,7A,9A,11A,13A,15A + var t CompletedGroupElement + var u, A2 ExtendedGroupElement + var i int + + slide(&aSlide, a) + slide(&bSlide, b) + + A.ToCached(&Ai[0]) + A.Double(&t) + t.ToExtended(&A2) + + for i := 0; i < 7; i++ { + geAdd(&t, &A2, &Ai[i]) + t.ToExtended(&u) + u.ToCached(&Ai[i+1]) + } + + r.Zero() + + for i = 255; i >= 0; i-- { + if aSlide[i] != 0 || bSlide[i] != 0 { + break + } + } + + for ; i >= 0; i-- { + r.Double(&t) + + if aSlide[i] > 0 { + t.ToExtended(&u) + geAdd(&t, &u, &Ai[aSlide[i]/2]) + } else if aSlide[i] < 0 { + t.ToExtended(&u) + geSub(&t, &u, &Ai[(-aSlide[i])/2]) + } + + if bSlide[i] > 0 { + t.ToExtended(&u) + geMixedAdd(&t, &u, &bi[bSlide[i]/2]) + } else if bSlide[i] < 0 { + t.ToExtended(&u) + geMixedSub(&t, &u, &bi[(-bSlide[i])/2]) + } + + t.ToProjective(r) + } +} + +// equal returns 1 if b == c and 0 otherwise. +func equal(b, c int32) int32 { + x := uint32(b ^ c) + x-- + return int32(x >> 31) +} + +// negative returns 1 if b < 0 and 0 otherwise. +func negative(b int32) int32 { + return (b >> 31) & 1 +} + +func PreComputedGroupElementCMove(t, u *PreComputedGroupElement, b int32) { + FeCMove(&t.yPlusX, &u.yPlusX, b) + FeCMove(&t.yMinusX, &u.yMinusX, b) + FeCMove(&t.xy2d, &u.xy2d, b) +} + +func selectPoint(t *PreComputedGroupElement, pos int32, b int32) { + var minusT PreComputedGroupElement + bNegative := negative(b) + bAbs := b - (((-bNegative) & b) << 1) + + t.Zero() + for i := int32(0); i < 8; i++ { + PreComputedGroupElementCMove(t, &base[pos][i], equal(bAbs, i+1)) + } + FeCopy(&minusT.yPlusX, &t.yMinusX) + FeCopy(&minusT.yMinusX, &t.yPlusX) + FeNeg(&minusT.xy2d, &t.xy2d) + PreComputedGroupElementCMove(t, &minusT, bNegative) +} + +// GeScalarMultBase computes h = a*B, where +// a = a[0]+256*a[1]+...+256^31 a[31] +// B is the Ed25519 base point (x,4/5) with x positive. +// +// Preconditions: +// a[31] <= 127 +func GeScalarMultBase(h *ExtendedGroupElement, a *[32]byte) { + var e [64]int8 + + for i, v := range a { + e[2*i] = int8(v & 15) + e[2*i+1] = int8((v >> 4) & 15) + } + + // each e[i] is between 0 and 15 and e[63] is between 0 and 7. + + carry := int8(0) + for i := 0; i < 63; i++ { + e[i] += carry + carry = (e[i] + 8) >> 4 + e[i] -= carry << 4 + } + e[63] += carry + // each e[i] is between -8 and 8. + + h.Zero() + var t PreComputedGroupElement + var r CompletedGroupElement + for i := int32(1); i < 64; i += 2 { + selectPoint(&t, i/2, int32(e[i])) + geMixedAdd(&r, h, &t) + r.ToExtended(h) + } + + var s ProjectiveGroupElement + + h.Double(&r) + r.ToProjective(&s) + s.Double(&r) + r.ToProjective(&s) + s.Double(&r) + r.ToProjective(&s) + s.Double(&r) + r.ToExtended(h) + + for i := int32(0); i < 64; i += 2 { + selectPoint(&t, i/2, int32(e[i])) + geMixedAdd(&r, h, &t) + r.ToExtended(h) + } +} + +// The scalars are GF(2^252 + 27742317777372353535851937790883648493). + +// Input: +// a[0]+256*a[1]+...+256^31*a[31] = a +// b[0]+256*b[1]+...+256^31*b[31] = b +// c[0]+256*c[1]+...+256^31*c[31] = c +// +// Output: +// s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l +// where l = 2^252 + 27742317777372353535851937790883648493. +func ScMulAdd(s, a, b, c *[32]byte) { + a0 := 2097151 & load3(a[:]) + a1 := 2097151 & (load4(a[2:]) >> 5) + a2 := 2097151 & (load3(a[5:]) >> 2) + a3 := 2097151 & (load4(a[7:]) >> 7) + a4 := 2097151 & (load4(a[10:]) >> 4) + a5 := 2097151 & (load3(a[13:]) >> 1) + a6 := 2097151 & (load4(a[15:]) >> 6) + a7 := 2097151 & (load3(a[18:]) >> 3) + a8 := 2097151 & load3(a[21:]) + a9 := 2097151 & (load4(a[23:]) >> 5) + a10 := 2097151 & (load3(a[26:]) >> 2) + a11 := (load4(a[28:]) >> 7) + b0 := 2097151 & load3(b[:]) + b1 := 2097151 & (load4(b[2:]) >> 5) + b2 := 2097151 & (load3(b[5:]) >> 2) + b3 := 2097151 & (load4(b[7:]) >> 7) + b4 := 2097151 & (load4(b[10:]) >> 4) + b5 := 2097151 & (load3(b[13:]) >> 1) + b6 := 2097151 & (load4(b[15:]) >> 6) + b7 := 2097151 & (load3(b[18:]) >> 3) + b8 := 2097151 & load3(b[21:]) + b9 := 2097151 & (load4(b[23:]) >> 5) + b10 := 2097151 & (load3(b[26:]) >> 2) + b11 := (load4(b[28:]) >> 7) + c0 := 2097151 & load3(c[:]) + c1 := 2097151 & (load4(c[2:]) >> 5) + c2 := 2097151 & (load3(c[5:]) >> 2) + c3 := 2097151 & (load4(c[7:]) >> 7) + c4 := 2097151 & (load4(c[10:]) >> 4) + c5 := 2097151 & (load3(c[13:]) >> 1) + c6 := 2097151 & (load4(c[15:]) >> 6) + c7 := 2097151 & (load3(c[18:]) >> 3) + c8 := 2097151 & load3(c[21:]) + c9 := 2097151 & (load4(c[23:]) >> 5) + c10 := 2097151 & (load3(c[26:]) >> 2) + c11 := (load4(c[28:]) >> 7) + var carry [23]int64 + + s0 := c0 + a0*b0 + s1 := c1 + a0*b1 + a1*b0 + s2 := c2 + a0*b2 + a1*b1 + a2*b0 + s3 := c3 + a0*b3 + a1*b2 + a2*b1 + a3*b0 + s4 := c4 + a0*b4 + a1*b3 + a2*b2 + a3*b1 + a4*b0 + s5 := c5 + a0*b5 + a1*b4 + a2*b3 + a3*b2 + a4*b1 + a5*b0 + s6 := c6 + a0*b6 + a1*b5 + a2*b4 + a3*b3 + a4*b2 + a5*b1 + a6*b0 + s7 := c7 + a0*b7 + a1*b6 + a2*b5 + a3*b4 + a4*b3 + a5*b2 + a6*b1 + a7*b0 + s8 := c8 + a0*b8 + a1*b7 + a2*b6 + a3*b5 + a4*b4 + a5*b3 + a6*b2 + a7*b1 + a8*b0 + s9 := c9 + a0*b9 + a1*b8 + a2*b7 + a3*b6 + a4*b5 + a5*b4 + a6*b3 + a7*b2 + a8*b1 + a9*b0 + s10 := c10 + a0*b10 + a1*b9 + a2*b8 + a3*b7 + a4*b6 + a5*b5 + a6*b4 + a7*b3 + a8*b2 + a9*b1 + a10*b0 + s11 := c11 + a0*b11 + a1*b10 + a2*b9 + a3*b8 + a4*b7 + a5*b6 + a6*b5 + a7*b4 + a8*b3 + a9*b2 + a10*b1 + a11*b0 + s12 := a1*b11 + a2*b10 + a3*b9 + a4*b8 + a5*b7 + a6*b6 + a7*b5 + a8*b4 + a9*b3 + a10*b2 + a11*b1 + s13 := a2*b11 + a3*b10 + a4*b9 + a5*b8 + a6*b7 + a7*b6 + a8*b5 + a9*b4 + a10*b3 + a11*b2 + s14 := a3*b11 + a4*b10 + a5*b9 + a6*b8 + a7*b7 + a8*b6 + a9*b5 + a10*b4 + a11*b3 + s15 := a4*b11 + a5*b10 + a6*b9 + a7*b8 + a8*b7 + a9*b6 + a10*b5 + a11*b4 + s16 := a5*b11 + a6*b10 + a7*b9 + a8*b8 + a9*b7 + a10*b6 + a11*b5 + s17 := a6*b11 + a7*b10 + a8*b9 + a9*b8 + a10*b7 + a11*b6 + s18 := a7*b11 + a8*b10 + a9*b9 + a10*b8 + a11*b7 + s19 := a8*b11 + a9*b10 + a10*b9 + a11*b8 + s20 := a9*b11 + a10*b10 + a11*b9 + s21 := a10*b11 + a11*b10 + s22 := a11 * b11 + s23 := int64(0) + + carry[0] = (s0 + (1 << 20)) >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[2] = (s2 + (1 << 20)) >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[4] = (s4 + (1 << 20)) >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[12] = (s12 + (1 << 20)) >> 21 + s13 += carry[12] + s12 -= carry[12] << 21 + carry[14] = (s14 + (1 << 20)) >> 21 + s15 += carry[14] + s14 -= carry[14] << 21 + carry[16] = (s16 + (1 << 20)) >> 21 + s17 += carry[16] + s16 -= carry[16] << 21 + carry[18] = (s18 + (1 << 20)) >> 21 + s19 += carry[18] + s18 -= carry[18] << 21 + carry[20] = (s20 + (1 << 20)) >> 21 + s21 += carry[20] + s20 -= carry[20] << 21 + carry[22] = (s22 + (1 << 20)) >> 21 + s23 += carry[22] + s22 -= carry[22] << 21 + + carry[1] = (s1 + (1 << 20)) >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[3] = (s3 + (1 << 20)) >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[5] = (s5 + (1 << 20)) >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + carry[13] = (s13 + (1 << 20)) >> 21 + s14 += carry[13] + s13 -= carry[13] << 21 + carry[15] = (s15 + (1 << 20)) >> 21 + s16 += carry[15] + s15 -= carry[15] << 21 + carry[17] = (s17 + (1 << 20)) >> 21 + s18 += carry[17] + s17 -= carry[17] << 21 + carry[19] = (s19 + (1 << 20)) >> 21 + s20 += carry[19] + s19 -= carry[19] << 21 + carry[21] = (s21 + (1 << 20)) >> 21 + s22 += carry[21] + s21 -= carry[21] << 21 + + s11 += s23 * 666643 + s12 += s23 * 470296 + s13 += s23 * 654183 + s14 -= s23 * 997805 + s15 += s23 * 136657 + s16 -= s23 * 683901 + s23 = 0 + + s10 += s22 * 666643 + s11 += s22 * 470296 + s12 += s22 * 654183 + s13 -= s22 * 997805 + s14 += s22 * 136657 + s15 -= s22 * 683901 + s22 = 0 + + s9 += s21 * 666643 + s10 += s21 * 470296 + s11 += s21 * 654183 + s12 -= s21 * 997805 + s13 += s21 * 136657 + s14 -= s21 * 683901 + s21 = 0 + + s8 += s20 * 666643 + s9 += s20 * 470296 + s10 += s20 * 654183 + s11 -= s20 * 997805 + s12 += s20 * 136657 + s13 -= s20 * 683901 + s20 = 0 + + s7 += s19 * 666643 + s8 += s19 * 470296 + s9 += s19 * 654183 + s10 -= s19 * 997805 + s11 += s19 * 136657 + s12 -= s19 * 683901 + s19 = 0 + + s6 += s18 * 666643 + s7 += s18 * 470296 + s8 += s18 * 654183 + s9 -= s18 * 997805 + s10 += s18 * 136657 + s11 -= s18 * 683901 + s18 = 0 + + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[12] = (s12 + (1 << 20)) >> 21 + s13 += carry[12] + s12 -= carry[12] << 21 + carry[14] = (s14 + (1 << 20)) >> 21 + s15 += carry[14] + s14 -= carry[14] << 21 + carry[16] = (s16 + (1 << 20)) >> 21 + s17 += carry[16] + s16 -= carry[16] << 21 + + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + carry[13] = (s13 + (1 << 20)) >> 21 + s14 += carry[13] + s13 -= carry[13] << 21 + carry[15] = (s15 + (1 << 20)) >> 21 + s16 += carry[15] + s15 -= carry[15] << 21 + + s5 += s17 * 666643 + s6 += s17 * 470296 + s7 += s17 * 654183 + s8 -= s17 * 997805 + s9 += s17 * 136657 + s10 -= s17 * 683901 + s17 = 0 + + s4 += s16 * 666643 + s5 += s16 * 470296 + s6 += s16 * 654183 + s7 -= s16 * 997805 + s8 += s16 * 136657 + s9 -= s16 * 683901 + s16 = 0 + + s3 += s15 * 666643 + s4 += s15 * 470296 + s5 += s15 * 654183 + s6 -= s15 * 997805 + s7 += s15 * 136657 + s8 -= s15 * 683901 + s15 = 0 + + s2 += s14 * 666643 + s3 += s14 * 470296 + s4 += s14 * 654183 + s5 -= s14 * 997805 + s6 += s14 * 136657 + s7 -= s14 * 683901 + s14 = 0 + + s1 += s13 * 666643 + s2 += s13 * 470296 + s3 += s13 * 654183 + s4 -= s13 * 997805 + s5 += s13 * 136657 + s6 -= s13 * 683901 + s13 = 0 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = (s0 + (1 << 20)) >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[2] = (s2 + (1 << 20)) >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[4] = (s4 + (1 << 20)) >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + carry[1] = (s1 + (1 << 20)) >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[3] = (s3 + (1 << 20)) >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[5] = (s5 + (1 << 20)) >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[11] = s11 >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + s[0] = byte(s0 >> 0) + s[1] = byte(s0 >> 8) + s[2] = byte((s0 >> 16) | (s1 << 5)) + s[3] = byte(s1 >> 3) + s[4] = byte(s1 >> 11) + s[5] = byte((s1 >> 19) | (s2 << 2)) + s[6] = byte(s2 >> 6) + s[7] = byte((s2 >> 14) | (s3 << 7)) + s[8] = byte(s3 >> 1) + s[9] = byte(s3 >> 9) + s[10] = byte((s3 >> 17) | (s4 << 4)) + s[11] = byte(s4 >> 4) + s[12] = byte(s4 >> 12) + s[13] = byte((s4 >> 20) | (s5 << 1)) + s[14] = byte(s5 >> 7) + s[15] = byte((s5 >> 15) | (s6 << 6)) + s[16] = byte(s6 >> 2) + s[17] = byte(s6 >> 10) + s[18] = byte((s6 >> 18) | (s7 << 3)) + s[19] = byte(s7 >> 5) + s[20] = byte(s7 >> 13) + s[21] = byte(s8 >> 0) + s[22] = byte(s8 >> 8) + s[23] = byte((s8 >> 16) | (s9 << 5)) + s[24] = byte(s9 >> 3) + s[25] = byte(s9 >> 11) + s[26] = byte((s9 >> 19) | (s10 << 2)) + s[27] = byte(s10 >> 6) + s[28] = byte((s10 >> 14) | (s11 << 7)) + s[29] = byte(s11 >> 1) + s[30] = byte(s11 >> 9) + s[31] = byte(s11 >> 17) +} + +// Input: +// s[0]+256*s[1]+...+256^63*s[63] = s +// +// Output: +// s[0]+256*s[1]+...+256^31*s[31] = s mod l +// where l = 2^252 + 27742317777372353535851937790883648493. +func ScReduce(out *[32]byte, s *[64]byte) { + s0 := 2097151 & load3(s[:]) + s1 := 2097151 & (load4(s[2:]) >> 5) + s2 := 2097151 & (load3(s[5:]) >> 2) + s3 := 2097151 & (load4(s[7:]) >> 7) + s4 := 2097151 & (load4(s[10:]) >> 4) + s5 := 2097151 & (load3(s[13:]) >> 1) + s6 := 2097151 & (load4(s[15:]) >> 6) + s7 := 2097151 & (load3(s[18:]) >> 3) + s8 := 2097151 & load3(s[21:]) + s9 := 2097151 & (load4(s[23:]) >> 5) + s10 := 2097151 & (load3(s[26:]) >> 2) + s11 := 2097151 & (load4(s[28:]) >> 7) + s12 := 2097151 & (load4(s[31:]) >> 4) + s13 := 2097151 & (load3(s[34:]) >> 1) + s14 := 2097151 & (load4(s[36:]) >> 6) + s15 := 2097151 & (load3(s[39:]) >> 3) + s16 := 2097151 & load3(s[42:]) + s17 := 2097151 & (load4(s[44:]) >> 5) + s18 := 2097151 & (load3(s[47:]) >> 2) + s19 := 2097151 & (load4(s[49:]) >> 7) + s20 := 2097151 & (load4(s[52:]) >> 4) + s21 := 2097151 & (load3(s[55:]) >> 1) + s22 := 2097151 & (load4(s[57:]) >> 6) + s23 := (load4(s[60:]) >> 3) + + s11 += s23 * 666643 + s12 += s23 * 470296 + s13 += s23 * 654183 + s14 -= s23 * 997805 + s15 += s23 * 136657 + s16 -= s23 * 683901 + s23 = 0 + + s10 += s22 * 666643 + s11 += s22 * 470296 + s12 += s22 * 654183 + s13 -= s22 * 997805 + s14 += s22 * 136657 + s15 -= s22 * 683901 + s22 = 0 + + s9 += s21 * 666643 + s10 += s21 * 470296 + s11 += s21 * 654183 + s12 -= s21 * 997805 + s13 += s21 * 136657 + s14 -= s21 * 683901 + s21 = 0 + + s8 += s20 * 666643 + s9 += s20 * 470296 + s10 += s20 * 654183 + s11 -= s20 * 997805 + s12 += s20 * 136657 + s13 -= s20 * 683901 + s20 = 0 + + s7 += s19 * 666643 + s8 += s19 * 470296 + s9 += s19 * 654183 + s10 -= s19 * 997805 + s11 += s19 * 136657 + s12 -= s19 * 683901 + s19 = 0 + + s6 += s18 * 666643 + s7 += s18 * 470296 + s8 += s18 * 654183 + s9 -= s18 * 997805 + s10 += s18 * 136657 + s11 -= s18 * 683901 + s18 = 0 + + var carry [17]int64 + + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[12] = (s12 + (1 << 20)) >> 21 + s13 += carry[12] + s12 -= carry[12] << 21 + carry[14] = (s14 + (1 << 20)) >> 21 + s15 += carry[14] + s14 -= carry[14] << 21 + carry[16] = (s16 + (1 << 20)) >> 21 + s17 += carry[16] + s16 -= carry[16] << 21 + + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + carry[13] = (s13 + (1 << 20)) >> 21 + s14 += carry[13] + s13 -= carry[13] << 21 + carry[15] = (s15 + (1 << 20)) >> 21 + s16 += carry[15] + s15 -= carry[15] << 21 + + s5 += s17 * 666643 + s6 += s17 * 470296 + s7 += s17 * 654183 + s8 -= s17 * 997805 + s9 += s17 * 136657 + s10 -= s17 * 683901 + s17 = 0 + + s4 += s16 * 666643 + s5 += s16 * 470296 + s6 += s16 * 654183 + s7 -= s16 * 997805 + s8 += s16 * 136657 + s9 -= s16 * 683901 + s16 = 0 + + s3 += s15 * 666643 + s4 += s15 * 470296 + s5 += s15 * 654183 + s6 -= s15 * 997805 + s7 += s15 * 136657 + s8 -= s15 * 683901 + s15 = 0 + + s2 += s14 * 666643 + s3 += s14 * 470296 + s4 += s14 * 654183 + s5 -= s14 * 997805 + s6 += s14 * 136657 + s7 -= s14 * 683901 + s14 = 0 + + s1 += s13 * 666643 + s2 += s13 * 470296 + s3 += s13 * 654183 + s4 -= s13 * 997805 + s5 += s13 * 136657 + s6 -= s13 * 683901 + s13 = 0 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = (s0 + (1 << 20)) >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[2] = (s2 + (1 << 20)) >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[4] = (s4 + (1 << 20)) >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[6] = (s6 + (1 << 20)) >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[8] = (s8 + (1 << 20)) >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[10] = (s10 + (1 << 20)) >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + carry[1] = (s1 + (1 << 20)) >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[3] = (s3 + (1 << 20)) >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[5] = (s5 + (1 << 20)) >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[7] = (s7 + (1 << 20)) >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[9] = (s9 + (1 << 20)) >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[11] = (s11 + (1 << 20)) >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + carry[11] = s11 >> 21 + s12 += carry[11] + s11 -= carry[11] << 21 + + s0 += s12 * 666643 + s1 += s12 * 470296 + s2 += s12 * 654183 + s3 -= s12 * 997805 + s4 += s12 * 136657 + s5 -= s12 * 683901 + s12 = 0 + + carry[0] = s0 >> 21 + s1 += carry[0] + s0 -= carry[0] << 21 + carry[1] = s1 >> 21 + s2 += carry[1] + s1 -= carry[1] << 21 + carry[2] = s2 >> 21 + s3 += carry[2] + s2 -= carry[2] << 21 + carry[3] = s3 >> 21 + s4 += carry[3] + s3 -= carry[3] << 21 + carry[4] = s4 >> 21 + s5 += carry[4] + s4 -= carry[4] << 21 + carry[5] = s5 >> 21 + s6 += carry[5] + s5 -= carry[5] << 21 + carry[6] = s6 >> 21 + s7 += carry[6] + s6 -= carry[6] << 21 + carry[7] = s7 >> 21 + s8 += carry[7] + s7 -= carry[7] << 21 + carry[8] = s8 >> 21 + s9 += carry[8] + s8 -= carry[8] << 21 + carry[9] = s9 >> 21 + s10 += carry[9] + s9 -= carry[9] << 21 + carry[10] = s10 >> 21 + s11 += carry[10] + s10 -= carry[10] << 21 + + out[0] = byte(s0 >> 0) + out[1] = byte(s0 >> 8) + out[2] = byte((s0 >> 16) | (s1 << 5)) + out[3] = byte(s1 >> 3) + out[4] = byte(s1 >> 11) + out[5] = byte((s1 >> 19) | (s2 << 2)) + out[6] = byte(s2 >> 6) + out[7] = byte((s2 >> 14) | (s3 << 7)) + out[8] = byte(s3 >> 1) + out[9] = byte(s3 >> 9) + out[10] = byte((s3 >> 17) | (s4 << 4)) + out[11] = byte(s4 >> 4) + out[12] = byte(s4 >> 12) + out[13] = byte((s4 >> 20) | (s5 << 1)) + out[14] = byte(s5 >> 7) + out[15] = byte((s5 >> 15) | (s6 << 6)) + out[16] = byte(s6 >> 2) + out[17] = byte(s6 >> 10) + out[18] = byte((s6 >> 18) | (s7 << 3)) + out[19] = byte(s7 >> 5) + out[20] = byte(s7 >> 13) + out[21] = byte(s8 >> 0) + out[22] = byte(s8 >> 8) + out[23] = byte((s8 >> 16) | (s9 << 5)) + out[24] = byte(s9 >> 3) + out[25] = byte(s9 >> 11) + out[26] = byte((s9 >> 19) | (s10 << 2)) + out[27] = byte(s10 >> 6) + out[28] = byte((s10 >> 14) | (s11 << 7)) + out[29] = byte(s11 >> 1) + out[30] = byte(s11 >> 9) + out[31] = byte(s11 >> 17) +} diff --git a/pkg/ed25519/extra25519/extra25519.go b/pkg/ed25519/extra25519/extra25519.go new file mode 100644 index 00000000..33018787 --- /dev/null +++ b/pkg/ed25519/extra25519/extra25519.go @@ -0,0 +1,347 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package extra25519 + +import ( + "crypto/sha512" + + "github.com/refraction-networking/conjure/pkg/ed25519/edwards25519" +) + +// PrivateKeyToCurve25519 converts an ed25519 private key into a corresponding +// curve25519 private key such that the resulting curve25519 public key will +// equal the result from PublicKeyToCurve25519. +func PrivateKeyToCurve25519(curve25519Private *[32]byte, privateKey *[64]byte) { + h := sha512.New() + h.Write(privateKey[:32]) + digest := h.Sum(nil) + + digest[0] &= 248 + digest[31] &= 127 + digest[31] |= 64 + + copy(curve25519Private[:], digest) +} + +func edwardsToMontgomeryX(outX, y *edwards25519.FieldElement) { + // We only need the x-coordinate of the curve25519 point, which I'll + // call u. The isomorphism is u=(y+1)/(1-y), since y=Y/Z, this gives + // u=(Y+Z)/(Z-Y). We know that Z=1, thus u=(Y+1)/(1-Y). + var oneMinusY edwards25519.FieldElement + edwards25519.FeOne(&oneMinusY) + edwards25519.FeSub(&oneMinusY, &oneMinusY, y) + edwards25519.FeInvert(&oneMinusY, &oneMinusY) + + edwards25519.FeOne(outX) + edwards25519.FeAdd(outX, outX, y) + + edwards25519.FeMul(outX, outX, &oneMinusY) +} + +// PublicKeyToCurve25519 converts an Ed25519 public key into the curve25519 +// public key that would be generated from the same private key. +func PublicKeyToCurve25519(curve25519Public *[32]byte, publicKey *[32]byte) bool { + var A edwards25519.ExtendedGroupElement + if !A.FromBytes(publicKey) { + return false + } + + // A.Z = 1 as a postcondition of FromBytes. + var x edwards25519.FieldElement + edwardsToMontgomeryX(&x, &A.Y) + edwards25519.FeToBytes(curve25519Public, &x) + return true +} + +// sqrtMinusAPlus2 is sqrt(-(486662+2)) +var sqrtMinusAPlus2 = edwards25519.FieldElement{ + -12222970, -8312128, -11511410, 9067497, -15300785, -241793, 25456130, 14121551, -12187136, 3972024, +} + +// sqrtMinusHalf is sqrt(-1/2) +var sqrtMinusHalf = edwards25519.FieldElement{ + -17256545, 3971863, 28865457, -1750208, 27359696, -16640980, 12573105, 1002827, -163343, 11073975, +} + +// halfQMinus1Bytes is (2^255-20)/2 expressed in little endian form. +var halfQMinus1Bytes = [32]byte{ + 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, +} + +// feBytesLess returns one if a <= b and zero otherwise. +func feBytesLE(a, b *[32]byte) int32 { + equalSoFar := int32(-1) + greater := int32(0) + + for i := uint(31); i < 32; i-- { + x := int32(a[i]) + y := int32(b[i]) + + greater = (^equalSoFar & greater) | (equalSoFar & ((x - y) >> 31)) + equalSoFar = equalSoFar & (((x ^ y) - 1) >> 31) + } + + return int32(^equalSoFar & 1 & greater) +} + +// ScalarBaseMult computes a curve25519 public key from a private key and also +// a uniform representative for that public key. Note that this function will +// fail and return false for about half of private keys. +// See http://elligator.cr.yp.to/elligator-20130828.pdf. +func ScalarBaseMult(publicKey, representative, privateKey *[32]byte) bool { + var maskedPrivateKey [32]byte + copy(maskedPrivateKey[:], privateKey[:]) + + maskedPrivateKey[0] &= 248 + maskedPrivateKey[31] &= 127 + maskedPrivateKey[31] |= 64 + + var A edwards25519.ExtendedGroupElement + edwards25519.GeScalarMultBase(&A, &maskedPrivateKey) + + var inv1 edwards25519.FieldElement + edwards25519.FeSub(&inv1, &A.Z, &A.Y) + edwards25519.FeMul(&inv1, &inv1, &A.X) + edwards25519.FeInvert(&inv1, &inv1) + + var t0, u edwards25519.FieldElement + edwards25519.FeMul(&u, &inv1, &A.X) + edwards25519.FeAdd(&t0, &A.Y, &A.Z) + edwards25519.FeMul(&u, &u, &t0) + + var v edwards25519.FieldElement + edwards25519.FeMul(&v, &t0, &inv1) + edwards25519.FeMul(&v, &v, &A.Z) + edwards25519.FeMul(&v, &v, &sqrtMinusAPlus2) + + var b edwards25519.FieldElement + edwards25519.FeAdd(&b, &u, &edwards25519.A) + + var c, b3, b7, b8 edwards25519.FieldElement + edwards25519.FeSquare(&b3, &b) // 2 + edwards25519.FeMul(&b3, &b3, &b) // 3 + edwards25519.FeSquare(&c, &b3) // 6 + edwards25519.FeMul(&b7, &c, &b) // 7 + edwards25519.FeMul(&b8, &b7, &b) // 8 + edwards25519.FeMul(&c, &b7, &u) + q58(&c, &c) + + var chi edwards25519.FieldElement + edwards25519.FeSquare(&chi, &c) + edwards25519.FeSquare(&chi, &chi) + + edwards25519.FeSquare(&t0, &u) + edwards25519.FeMul(&chi, &chi, &t0) + + edwards25519.FeSquare(&t0, &b7) // 14 + edwards25519.FeMul(&chi, &chi, &t0) + edwards25519.FeNeg(&chi, &chi) + + var chiBytes [32]byte + edwards25519.FeToBytes(&chiBytes, &chi) + // chi[1] is either 0 or 0xff + if chiBytes[1] == 0xff { + return false + } + + // Calculate r1 = sqrt(-u/(2*(u+A))) + var r1 edwards25519.FieldElement + edwards25519.FeMul(&r1, &c, &u) + edwards25519.FeMul(&r1, &r1, &b3) + edwards25519.FeMul(&r1, &r1, &sqrtMinusHalf) + + var maybeSqrtM1 edwards25519.FieldElement + edwards25519.FeSquare(&t0, &r1) + edwards25519.FeMul(&t0, &t0, &b) + edwards25519.FeAdd(&t0, &t0, &t0) + edwards25519.FeAdd(&t0, &t0, &u) + + edwards25519.FeOne(&maybeSqrtM1) + edwards25519.FeCMove(&maybeSqrtM1, &edwards25519.SqrtM1, edwards25519.FeIsNonZero(&t0)) + edwards25519.FeMul(&r1, &r1, &maybeSqrtM1) + + // Calculate r = sqrt(-(u+A)/(2u)) + var r edwards25519.FieldElement + edwards25519.FeSquare(&t0, &c) // 2 + edwards25519.FeMul(&t0, &t0, &c) // 3 + edwards25519.FeSquare(&t0, &t0) // 6 + edwards25519.FeMul(&r, &t0, &c) // 7 + + edwards25519.FeSquare(&t0, &u) // 2 + edwards25519.FeMul(&t0, &t0, &u) // 3 + edwards25519.FeMul(&r, &r, &t0) + + edwards25519.FeSquare(&t0, &b8) // 16 + edwards25519.FeMul(&t0, &t0, &b8) // 24 + edwards25519.FeMul(&t0, &t0, &b) // 25 + edwards25519.FeMul(&r, &r, &t0) + edwards25519.FeMul(&r, &r, &sqrtMinusHalf) + + edwards25519.FeSquare(&t0, &r) + edwards25519.FeMul(&t0, &t0, &u) + edwards25519.FeAdd(&t0, &t0, &t0) + edwards25519.FeAdd(&t0, &t0, &b) + edwards25519.FeOne(&maybeSqrtM1) + edwards25519.FeCMove(&maybeSqrtM1, &edwards25519.SqrtM1, edwards25519.FeIsNonZero(&t0)) + edwards25519.FeMul(&r, &r, &maybeSqrtM1) + + var vBytes [32]byte + edwards25519.FeToBytes(&vBytes, &v) + vInSquareRootImage := feBytesLE(&vBytes, &halfQMinus1Bytes) + edwards25519.FeCMove(&r, &r1, vInSquareRootImage) + + // // 5.5: Here |b| means b if b in {0, 1, ..., (q - 1)/2}, otherwise -b. + var rBytes [32]byte + edwards25519.FeToBytes(&rBytes, &r) + negateB := 1 & (^feBytesLE(&rBytes, &halfQMinus1Bytes)) + edwards25519.FeNeg(&r1, &r) + edwards25519.FeCMove(&r, &r1, negateB) + + edwards25519.FeToBytes(publicKey, &u) + edwards25519.FeToBytes(representative, &r) + return true +} + +// q58 calculates out = z^((p-5)/8). +func q58(out, z *edwards25519.FieldElement) { + var t1, t2, t3 edwards25519.FieldElement + var i int + + edwards25519.FeSquare(&t1, z) // 2^1 + edwards25519.FeMul(&t1, &t1, z) // 2^1 + 2^0 + edwards25519.FeSquare(&t1, &t1) // 2^2 + 2^1 + edwards25519.FeSquare(&t2, &t1) // 2^3 + 2^2 + edwards25519.FeSquare(&t2, &t2) // 2^4 + 2^3 + edwards25519.FeMul(&t2, &t2, &t1) // 4,3,2,1 + edwards25519.FeMul(&t1, &t2, z) // 4..0 + edwards25519.FeSquare(&t2, &t1) // 5..1 + for i = 1; i < 5; i++ { // 9,8,7,6,5 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0 + edwards25519.FeSquare(&t2, &t1) // 10..1 + for i = 1; i < 10; i++ { // 19..10 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t2, &t2, &t1) // 19..0 + edwards25519.FeSquare(&t3, &t2) // 20..1 + for i = 1; i < 20; i++ { // 39..20 + edwards25519.FeSquare(&t3, &t3) + } + edwards25519.FeMul(&t2, &t3, &t2) // 39..0 + edwards25519.FeSquare(&t2, &t2) // 40..1 + for i = 1; i < 10; i++ { // 49..10 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t1, &t2, &t1) // 49..0 + edwards25519.FeSquare(&t2, &t1) // 50..1 + for i = 1; i < 50; i++ { // 99..50 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t2, &t2, &t1) // 99..0 + edwards25519.FeSquare(&t3, &t2) // 100..1 + for i = 1; i < 100; i++ { // 199..100 + edwards25519.FeSquare(&t3, &t3) + } + edwards25519.FeMul(&t2, &t3, &t2) // 199..0 + edwards25519.FeSquare(&t2, &t2) // 200..1 + for i = 1; i < 50; i++ { // 249..50 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t1, &t2, &t1) // 249..0 + edwards25519.FeSquare(&t1, &t1) // 250..1 + edwards25519.FeSquare(&t1, &t1) // 251..2 + edwards25519.FeMul(out, &t1, z) // 251..2,0 +} + +// chi calculates out = z^((p-1)/2). The result is either 1, 0, or -1 depending +// on whether z is a non-zero square, zero, or a non-square. +func chi(out, z *edwards25519.FieldElement) { + var t0, t1, t2, t3 edwards25519.FieldElement + var i int + + edwards25519.FeSquare(&t0, z) // 2^1 + edwards25519.FeMul(&t1, &t0, z) // 2^1 + 2^0 + edwards25519.FeSquare(&t0, &t1) // 2^2 + 2^1 + edwards25519.FeSquare(&t2, &t0) // 2^3 + 2^2 + edwards25519.FeSquare(&t2, &t2) // 4,3 + edwards25519.FeMul(&t2, &t2, &t0) // 4,3,2,1 + edwards25519.FeMul(&t1, &t2, z) // 4..0 + edwards25519.FeSquare(&t2, &t1) // 5..1 + for i = 1; i < 5; i++ { // 9,8,7,6,5 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0 + edwards25519.FeSquare(&t2, &t1) // 10..1 + for i = 1; i < 10; i++ { // 19..10 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t2, &t2, &t1) // 19..0 + edwards25519.FeSquare(&t3, &t2) // 20..1 + for i = 1; i < 20; i++ { // 39..20 + edwards25519.FeSquare(&t3, &t3) + } + edwards25519.FeMul(&t2, &t3, &t2) // 39..0 + edwards25519.FeSquare(&t2, &t2) // 40..1 + for i = 1; i < 10; i++ { // 49..10 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t1, &t2, &t1) // 49..0 + edwards25519.FeSquare(&t2, &t1) // 50..1 + for i = 1; i < 50; i++ { // 99..50 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t2, &t2, &t1) // 99..0 + edwards25519.FeSquare(&t3, &t2) // 100..1 + for i = 1; i < 100; i++ { // 199..100 + edwards25519.FeSquare(&t3, &t3) + } + edwards25519.FeMul(&t2, &t3, &t2) // 199..0 + edwards25519.FeSquare(&t2, &t2) // 200..1 + for i = 1; i < 50; i++ { // 249..50 + edwards25519.FeSquare(&t2, &t2) + } + edwards25519.FeMul(&t1, &t2, &t1) // 249..0 + edwards25519.FeSquare(&t1, &t1) // 250..1 + for i = 1; i < 4; i++ { // 253..4 + edwards25519.FeSquare(&t1, &t1) + } + edwards25519.FeMul(out, &t1, &t0) // 253..4,2,1 +} + +// RepresentativeToPublicKey converts a uniform representative value for a +// curve25519 public key, as produced by ScalarBaseMult, to a curve25519 public +// key. +func RepresentativeToPublicKey(publicKey, representative *[32]byte) { + var rr2, v, e edwards25519.FieldElement + edwards25519.FeFromBytes(&rr2, representative) + + edwards25519.FeSquare2(&rr2, &rr2) + rr2[0]++ + edwards25519.FeInvert(&rr2, &rr2) + edwards25519.FeMul(&v, &edwards25519.A, &rr2) + edwards25519.FeNeg(&v, &v) + + var v2, v3 edwards25519.FieldElement + edwards25519.FeSquare(&v2, &v) + edwards25519.FeMul(&v3, &v, &v2) + edwards25519.FeAdd(&e, &v3, &v) + edwards25519.FeMul(&v2, &v2, &edwards25519.A) + edwards25519.FeAdd(&e, &v2, &e) + chi(&e, &e) + var eBytes [32]byte + edwards25519.FeToBytes(&eBytes, &e) + // eBytes[1] is either 0 (for e = 1) or 0xff (for e = -1) + eIsMinus1 := int32(eBytes[1]) & 1 + var negV edwards25519.FieldElement + edwards25519.FeNeg(&negV, &v) + edwards25519.FeCMove(&v, &negV, eIsMinus1) + + edwards25519.FeZero(&v2) + edwards25519.FeCMove(&v2, &edwards25519.A, eIsMinus1) + edwards25519.FeSub(&v, &v, &v2) + + edwards25519.FeToBytes(publicKey, &v) +} diff --git a/pkg/ed25519/extra25519/extra25519_test.go b/pkg/ed25519/extra25519/extra25519_test.go new file mode 100644 index 00000000..6875ecbf --- /dev/null +++ b/pkg/ed25519/extra25519/extra25519_test.go @@ -0,0 +1,78 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package extra25519 + +import ( + "bytes" + "crypto/rand" + "testing" + + "github.com/refraction-networking/conjure/pkg/ed25519" + "golang.org/x/crypto/curve25519" +) + +func TestCurve25519Conversion(t *testing.T) { + public, private, _ := ed25519.GenerateKey(rand.Reader) + + var curve25519Public, curve25519Public2, curve25519Private [32]byte + PrivateKeyToCurve25519(&curve25519Private, private) + curve25519.ScalarBaseMult(&curve25519Public, &curve25519Private) + + if !PublicKeyToCurve25519(&curve25519Public2, public) { + t.Fatalf("PublicKeyToCurve25519 failed") + } + + if !bytes.Equal(curve25519Public[:], curve25519Public2[:]) { + t.Errorf("Values didn't match: curve25519 produced %x, conversion produced %x", curve25519Public[:], curve25519Public2[:]) + } +} + +func TestElligator(t *testing.T) { + var publicKey, publicKey2, publicKey3, representative, privateKey [32]byte + + for i := 0; i < 1000; i++ { + rand.Reader.Read(privateKey[:]) + + if !ScalarBaseMult(&publicKey, &representative, &privateKey) { + continue + } + RepresentativeToPublicKey(&publicKey2, &representative) + if !bytes.Equal(publicKey[:], publicKey2[:]) { + t.Fatal("The resulting public key doesn't match the initial one.") + } + + curve25519.ScalarBaseMult(&publicKey3, &privateKey) + if !bytes.Equal(publicKey[:], publicKey3[:]) { + t.Fatal("The public key doesn't match the value that curve25519 produced.") + } + } +} + +func BenchmarkKeyGeneration(b *testing.B) { + var publicKey, representative, privateKey [32]byte + + // Find the private key that results in a point that's in the image of the map. + for { + rand.Reader.Read(privateKey[:]) + if ScalarBaseMult(&publicKey, &representative, &privateKey) { + break + } + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + ScalarBaseMult(&publicKey, &representative, &privateKey) + } +} + +func BenchmarkMap(b *testing.B) { + var publicKey, representative [32]byte + rand.Reader.Read(representative[:]) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + RepresentativeToPublicKey(&publicKey, &representative) + } +} diff --git a/pkg/ed25519/testdata/sign.input.gz b/pkg/ed25519/testdata/sign.input.gz new file mode 100644 index 0000000000000000000000000000000000000000..41030690c0db39a0279304a46f002a625caa9080 GIT binary patch literal 50330 zcmV*3Kz6?$iwFoTsc=vL19NF-ZZ2tVaCLM5?EPz!AU%?02mX)M0EV~k28PG}moVqp z*D^9gA!nNH)m2%^C^oAyBf`zi0DW8qRPPrlJ!@tDXRK03 zd(%@#94(}Gu8`uIr`;NMD|7S^`}4*y-?mGB@7ZaMnnO!7oDj z{=_oEOn%&|@gzPpt~=gb-~E*LmK(|_?|YtHONlw=)K8l+g!ku9UTcRw-lyL?>Yii2 zb){U-iZP#X%iCv)rTC-5?Z}sL=BXEA5vhDdjGp(ZW#rjbEN3)d z=IMI{cIK>eW@LlecwgcV`#3{+aia3fl2bjghg7gnA9(HzDVNKly|J{Xw9?vhdI;s< zCH;(3)eNZoOLxeVYHgo8M*BAKK$=ivGKig4)4NCp1tCnrG?Ude*J*;uGZe4 zJ$miCJnMO}zD6s(JQ!;s ztfctj_WbP3u3=JU>(G`=U) z`QTXie#*qB)AAa3g?#X(_g!JLx8Yg2q!bNOWv`r~cJQQ<&YbvCZ=DUnLx@))#5s|E?n-JDB3pP%R?=C6SN{H;ZVaLz*t%U!5_Qf~}514x* z1e~X0_Z@GXGt?Byb{otSEX@1h#R*@ZQrhggRb6o=A;%)PfJ? z-s{T-y`8rtj)%=|-af{A*}o8fe*FMGxbm`Lw4e96E7!SmGqC2|`if(m$cLR+$Bpl) z>1q7@zzO+{BVl-R5O6PFS8>?*K1Aiq29gbTA(}@QoRB*YzCz;Qp}ZUE_hsQG$ugHZ zC*ePg|BqMs)B41R?>&SN7IZvB4S#*e_*=!1YU5Kj`yFrr0t|oh5O4S!B2p$Tt^3}Y zLt%H@#rMDhguRVRuT?T11a>G-4g4pZ_rX30@jc;Ljw~1W7xfvL2e+@5mxVt zd+_;(Pw0&lc5A8tmvjkxWcM}Vyn7_V%zkoY%WflJU@0A3(eHydSEBMu=)uIc5q6WK z2j)a9$XIH~n}9;g}~9 z(n897QNWAsVTpTy+aFs+F%5KqWyX`eXvsOhvuPET*bcUi^Pz};V7f_<&& z=hqK-^CUm_cv=9*u)Ja3=Ypl?Nv+NLw%H!iz`k!L4DR$qK+_KUmh*rDNmjkb=d?q5 z89fGKaw!ktf@DdiDhrbYy#=x}TSV^1u8BJM4Z)NEuvz-`2EZFX-2M-*^M~9}OZ>3W z>ixX2$9LcW>5?YM1^lo2vfBJzewW@x!nivS`_3Wd-5zmI9{QBKNN5GTK?uD37y%Px z2^71pE{30xMf!MvH6+QK3Q<(A0Q4tR=}kzHbPA!h=Qb_ z-VF+yKbb7di7^zs_9mXdU+nYnOJ`XLe_&6Ri zHPu1I1|#oyunhhS;RB3P32C_c0eP^Dx+~%BIe5HLW&pd--9Nv603Y%ai)-1$Zayv7 zpJ%l?12xQ(MqH6R+@F(h$hpWV1wYhf398sMp&f(^B+xIg`Gv({!DFqFLtZ&2!L5*_~&fDX_ITyGdSLbVt z4|(7F^ZN&+O+e_F@Bz!mmnk_uu;H95W2J2FEN#85t0g_Vn0B9pu}kd zFQ$MRE-;J8dQR3EY~3l4(y*qWjsXHtl9fSR2CG?<%--^7ymB3tK#vt1e&qk`rT$n> zvVsrrjVf|Xsv?l`VMj>Mctwtf96?1xngE_9?EdcO*`35lg-6;ZoRfoi`l~U@tYtQ@~@C%vd;E zRtW(jGRl{V*-`5O%}-&AL-@aVtv{foSt)P9C7@_xJ)o?D_MQ);fZxOvn|hcx!nq!@ zH%qd~qzUvw#e7d^%c&G86eItW;>s8ipbPXsHO)5HmmD0~KYj*)o(7ebc8ry@pI<)! zWV+oY%2{@~toywrYWg6zZjzkIPj_zwsg@aL9p za>@qMd|(E+jUPmcropq=xMi&h1ejE!{8JJNRUTFIOJFa7vMFGeqLuvMs2l7J^iJ;e zOHq?Z?)=NrsGbJ3I$)I|ZU6lG0Te3Ob4=ia%Sw?@$ltH1>&M^&7$ykez^nz1NxhfI zpTyfMmJE#~*IUe&1j6^`FsesUQ#x=3=uIrL*aeQ$3 zA{jq{dbE4;HNnIG*RS?x%!Nsm;ZHsh529>jwF$2WYYvMzL->3WEAVc@%lm`}pWN(8 zovg|tWfPuyCY|7j)JU5+Mph-uHXMia)c3^42fuvr*eA9#_{)SBKLog6KY#+2NJ@!H zzGa2ktcS-O0Z9S~ng}p$z5rzYf;%2QA>cox5WoQGB0LdCcmP?1nVb($5DVP3&X**K zMYHH}fDsCiyYv}1;lQ&d&*nl&mdFi238D@IgYS3G9kV^FUh>SzX zCkX%@*qPqWd!A8a#VtuYfY9rqz~V1~54Z~ffc?fH3-Bj`kf|pMDPkYq==4hhW{2hr z9*NlikhiTYbVSAoj*L3a-;-{Rcxx5sq3Qyt_uAQO&-uo4*iOv47uK?RkVfv?88;-V zluQBui$o7V`b)C-|NVM@!sI8Y#64f2T%g!2o|G+<_5&ten4F-Fa1UO_i7TE|fT$p8 z{sn*h9RmbXQ_HF0xqb@^mS3_sZ$tr1QOgQ!vkpd)TV3Qb7qpc3=hqJ~2w!$-Rcw0_ zpl&5CP-S4-;O+7A%(S0o_}#|Vrww8Pp!Z_DZ(@0 z>iRaoXWxL<2lT#h?C}0iyyBnME+qtIMn3m?6z)&uLCpcm!8i(d^HSY{xUxYwf@%|W z^0V1jcB^HNz#ohWpbL)emD&Y(kSJ{l!}upFK(RwKTl^o)II_zN`1N?6`u_a-0WXU{ z4yQiCBtdEGz1gGWmrno+S~|ra0vq46J**CiKs*4Otz-?E4?Waqlso_r;3e)q7ulb6 z!yMV3LKa>Rp8tY``N_lr)@9A0AqH|VVB~3M0a|gI#=-+MGbkpV!*Y{@=l|48{vqyC z+MGl6=iLFn`<+znR6cV9Lk4mRmRp-Mtte;;$pho}=9_leoqf(?yYi)Se`kflQ1U+&- z&hxT^6j&P+?I{c?`B>1cGs(C337(G+UM#n<2mE#*CGc+&XH&EP5H|Kw}_={qKpPFq%1FY%FljklJ~U-$b^kVL?; zn6QRR60?@3-s~P`t@LcyrR$g;FafI)AdugDQt3J1QoSA#-69zSE%=vLNX>?>5O~M? z^XmuncUJ0C03Ov0HaW257kesvb6|yVqTJs+er5!(6FEHpr~D*u*47R%=z4obDk93v z5^e$MtU16TH(ByMEMs~+EMqZ%aR3FZd05Ik18d2;640f_dHtDUr9-?6`KeaR`yB?D z@<08ee=vz!wwHS?P)sCDF;3t)HGB5~nfOf2Mp~ty3zU}@eD4F=G-#0hFZBflc$k3# z&WBrjzM9qq@A07lKcAk9<^rltw>}_2Ahmd4_McxrAQIf`cNzR0%d;H2dvyPbM8G-6 zQ>ws!s6SK@(XwP8@&%zA^JSTczbqI@f_SeN64cmiB00wFRWMZ^<-)DNCE#AbsGmyN zy^8?s#ljcG4EFAg@y(GWw;u9FOWw_RCEPshINdDsKmDqIHrRsbR5u}fVf4Q-(4#BPI(NW>SvER?1%i}r#Lnt1ei&J?u-%mE(@ zC9}5go`hfQzWn_90g(XWktk7P4q`1?wLNR^#oK0AAQH9Sb-*V1=Ot89s^OQLI-StS z<0mP+6Fkk`Rg<-hA&q#J|AKWl$d@{>ndtylnJ1H!ylY)%A2t9JCH8^&iM~9J@)1)5 zygiqqWLU%XIe2mi|F>TD52ZHX@r2tNCG_yVD>Ta9q}PXaB2a|)73v+2n8L0&5l%*8 zrpPA{you5%WtNIH#E>XkSjtp@1-Sv#FG(7gBvuoH`Jg9N?ZJ~NVB^oPA5gG;DlE)9 zSi(?ElSN6i58ojAsb6rRvgG|^{b}cdsVQpMYob!m-(4a(Cu6`se+-i9Ty$9`)d6vy zs-tZa(Cj!kr9Xg;RRp1oalNgrwPaGWhq4d<9SDhY5W`HB7KaO*O8VEe@VWnculpw- zLhj=o>=S_z+1oGTFTU90HI@^S53s%L_wj}=QzA4%!yz|?yel~@eQhXu8ju$IUNt9{ zwBR~Ac>@sX72n$ zP&5JR-15UVPZqYaz$^DjXl_(zsrQ$KK6dPQoJ}wtwRr+JSsw2v+unB%vIOzekiy@O z4n!gG4@v`&H2L_o;o&JIe^+0)MFHkM36vQl2o6J=|F>WG4>rN>?P;?FAe$sqUKR~M z1FloT9)QKDVo37WEkqb#J4ut*5F2jK%&2vS*sT|`rp-acCY~+SVxe&ik~*)uFifCv z^+JVw_n1TK )CvQ&_F|D&(|~Wcevas@-~58&na0Fp6blgcBX0v2FFU%r%5 zcJF$5clNs!DmN^b+VTxQX)aO8z$xz z0p1%JQz(ry-qA^gwwqw^2W-{1y_xs=afC5q7}ZIhi`dgLl|KbdI^^+Kz*3;`eTZ@7 zHImqF;L!+HdrcKd36Hoq_0 z+ci_5y0xiw+EXz3pB~6WnF@2IPPlnaz1OA)q9@2cQN(28+vC*-u{pe84Qf9MhI4ox zf8ogt=njkwh9j`^OJgKZ)Zjfec@U)izy9if_#vums#zOIv1MwvmzTi#1j%zh3-C%M zES43QZVH0PX214@@vcvLzeA%^A8=DMju9#-5DK+Op2TsAQ&MSZX+PKNz~mLic(WbV z<^B2f1KyYVl+Q1?1r=eyGd2rAiHXVKs81^7am*OBKr*MeCs(nm;I8>YR=IO~B?4%} zDe}et!kMd;g&UG6>eqG(Iu8cX^+dvE=cTF0USWR(9NYYChwYs&al3g!Gv2TL?(MvX zE1A;-4)p6`eBn1!rGP%4U%mXFXwwE>ne25lm|`KBjrSNO5h=F*xDNh&E{O9!qY%#u zackJ)#h*}z5pm*&lvkjtzV;YD6rcDE1vt+6^}B}R&8c0@WXuWR&+ubd%d9-{5;s1|v^A@d~1ez zHUoTJj9#?AlQPN%%<1tvJB16q1eYJr>Z;eTuca?}-+PM8?_fj7c*MR%_90fYj)bLA z2(&X=FcLFUcUnIQ_WL0#ameC_M``SkQ@QMl4Sk0JkYo7mklM(nog{s6;$X|cLp8_r>9a3BX zdS5=`vY!NQo@N_uOz~-n5AjK$DnLxF*~VC~4*_IPJ33-66ocD-i%fRL06}M4lggwf!OKcHdGZ9}X zUaiexWD&_g+a5i6S!fFZFtG1g&WHeBA}hGEgfF@huRu8zXvdv+ zSpPLxTRawo3TQd@zHas;*{XV}4eyELY2J!b{PQKA0aN1tM|^}ux;K@L%-a`flS0PJ zpi!xH8U+rC_ujlro)i$1lD)>XKvaROz@J=iK!O)*GroY`V8a|~c=20Vad7@q)>UAxW4b@Tet=CItk-QUEw*3}Vz8h(tbBO7t)^gzLg4Nc2bIX@I%Dr3 zs`(u|cFgmK#8OCt>jy^((22CfG8)VOaXMi5a3Anh5{chuku=gE^2Bw-bRTYhR{ z9s@wy7K!m0k3*@=4d5S5s;W6D4j(5*_SXjgANVPM#`KD#;kw_g%lWQgU-vaE%jCr- zc88d--uv<@7!Qe@QYj!jiiYTW5go)SmoFKMl-`8-S6c2Oqjslwi+IWAUDq&lD?amC9?(M}$ySF`m z9t-ATGbQE6D%l1kF9vCKI0mBE>05Ax!z1xFkSN);Z#?CR&OA-4l>xOcNxip<0 zn|I>QKx;~;cL0gpvw6ZMiSotITfL0~+&&<2Y~5*~YYKG2faN0&d(ilJzXV>|&V=of z+_@+8XWaol*3YZsC*-EY=1yup> z@9Bid(+U-28+^Z4S~+T4K=PNE@p#7yIL5{RJD4@~z`~S0n4kb4>XIIbbhCLl#lNii z?LWVM06tAxA}0poSlo{X#P7yZDj2M{nwy77k1f%cN|*l-NQ1TSW@j7OB@gG4pE3O5 zc76a(*f_C~fHv%fraZKxiQS_jDA-?P6YjMnAYi8ox+$GddJ4r*0qEe-U{33QN|#F| zg0Vc+_R@IL6IQsEnB_ZWYpt7^S?!&U=i>c8{Db~n(s(66KLed{ zIg1$sz>xYfuqE#ky#b`KbZT&%*B?mi)^^U_qxGd}z;K|^ z+^Bqie*J*uaQ1CyrDkjanWfv|Yc0u)Odz{8HYo`;D1x}{UqRtG<( zhtd33hqM45e3dsDBz;?hN3H;fPSBZr)5`{Ahm}CO)MS)e)ZbL}V2M0mq5)Z?VCQBf zJa(DCY_p&a|M~R;?8_w=Zc)YYEF)6xV(?f)?|bzW^I?BBK6WUbgH#k0aacP*Gp%m7 z9_g#$m##rO)Db_?&NkxLs%FBcPKp|Sx~%MQyv6PS31f?1V&&-lw==qdGzM6Bo|6~< zux*FN2(g7NIi#ILO1!KnId%_n55<)YK_D+S&zTC~M|lXy|64xl4+d-@V1EM<09ye? z=kr`bv}rMB+r4h6@A%I3HtCVx*4>9%_k48`uUK=X93hq5uU&0ZuM+U5 z=b^Z?wIq(VJs&Fhb<8gCtHF*drApm{%geZtoStE;yxw+v@3B-1<$u#>{SgmP3fdI! zF*DU!wUZk&Yu$?>TR652&Qm@B(DKc|ISBK{>-|8P+7f1pYvfB|&9bBA$r1 z1~1#>RM;)>g9&>gI}o8`BwSr_?_NLr;@%5Uc)Dw%1GTcO3@{{Isou zuj6~m(Q8-BWpS3&^O$M>hDBtvoAK8VaB*!L2+!R7)J@;b_I}T6$Lq#h@q>y9C8>K@ z&RH@4*HOAdU2e}X@!BRBNpy&%&#ulb#OKEz{1rwnL~8rsp06_ibagQHKvu&c!Ai+` zVTWNoPyTDy9%$R)L0)VEk+SXa?8rCl8$o-RFL*8j2*xIHvJoHxwv06VdXC|Hlf%>h z#!vgxWgr4!49W#k$n;h(cjpUb(CEi|Ko&- z*5M_|7Gg=K$F?ER4q(2HNSUf9p6Ci7cQ76`EHr zWR?a*j7}&osyCaem*drj2x(U2_9{z@ji5syMjTF*5;1>%{eZlvLHP8;Uo~HqbVP0A z=-IZ3=h?P8H>tHqy!;#fADfuI5w7+;Yh!I~Q`S@5*hn{>EeO`2Ut|jYRv>`un~()P?QLWI7w)(- zDGB)5FdoOoXR{NpdacbC{crxfKZ|m1cCR5p#hxaF?%{Te9tLGushqA_9`B{{&4DEn zaf-vM@7IgJ{Tz&OTGyZYVkQP;>X4rHyQt~xyuwYT&j`oqoCG@R(orq2@XxOw(0T$P zS4tCN`6YLlNzW@J_Gp1LUr8&BAj@ioSqJRg*w_~)sCd|?sZQ;NFH_W!#-@Xu=f+v~{h_#dI+k5ZY5> zaj10J!mkw$zA+tY{d?`QAsShU$#j9uUpt$DVs2=)35|Njm_FrB0^br1@9`XstUCA4 zuOHyFT%(Ex0cf&24XWtsS&sxMn)%0k zBn#7;F6Nbu|c{pDrJ$y;2FFCzR9dYjU1p7Lq zJ^0u}-MKt?1BUl%Ok`!B^i%CQ%$ZsoxKFtZ4(OGa%;avppFbf5mrk?@gv?APU4492 zm=tcjkB7?X#j8owx5Pwk)?$$f#LLD*oPMbh4u8T=Tc?H zyr}s>FdIaOArp|ia$g=4UCiOlM3Im%O8e-5y1I$uqFCi5sU&F`N3Sm>CN4yQXfxm| zca6nO2iaVkL_K%rO`ENqx!j*$KOo8gM^FT-*ppMKf8)yY>6KiL73JNZ$Eh$%b(fJ0 z+Ptfbb0sP`$;?3J$E!Qa`{g*EmxRF8C^;01@KR3yEIW>)cF-2?MzGF+>PwvZsymAl zXD~0p7x&}m!OqUO#n;JD{58t?+DP+_dwO2ggUMj*bpkUntVa?FO9v!QEf7?w+9eu2qe|FGD)h{k ztvQ)0O%f`KHo|l~_G`@KJZs#;e$a3QbT4^R=X1#TKkrljytW8V>Y;SC6w(_e_TFqHDqyz z?BYj9B6}-YLGog0t>hK~FcxR?K@&eAnytCL5JSBJkc30$Hv5h*YilKja;bh*t2l2qZDUXd_+&)|EVAQ=cV?M z&M(M)^mv_I7N!tt)@a+tJ1Avq#-s=?UI#nC4^SaM+IiIM=fp^xa~E-aJvCyNk0Xj_ z#Za4ryQ}B%7~P83jRpIv~l_}d3i&F$IdSj1Wa;G~v2hrO%YzUC1L)iOJi^}#1> zNAcYH#dU)R1cx|I+LfxB&rEVJO)n%T|7;}j-HFToAV;mjdVX;7XAGSDK9$O`4wkHW ze$Qi*YWL89lEjI+M-x@F^9H?Y{U!m;@*bHvSCGTdIexTk&ySK>J-G7e0YEL)ZmQFDZC%wu=c(-mQlPsQng{we8%v&n`+!)&Lu&gA5T3wK}Z{{@!JP@H*e__DWgMw zy|g3bIsbG$q;tfYn)=EpT;<0|9uy{d#sCYU00bx5ii9ph@9rbu^iPOh5rlQD(`H&S zj#w`8`9IEFEt~p1zp=5W00@Dby*z-g;dq;z;N)rgyUde(e^E?{H6(g{zhE zojwQI=j;^S9@9`MzK0^h<{mt_v^0JILF*f6^E$W6fIF+SWp69e1K05m_S@skDhCG} zEg>s~Bry>e5Wik|2_Dw+KEqj~>*!C#B62&@@;BmgUA{7?R4 z*&v}sz>OO~u|3UF`4Vla7t&$Y8qie~4Uauh|qI)uYFC|I2*M^qdxJhC(K-;qf4!WFAi}V1SuVl zmzw1g^=*Q5-e|7ylb#Jo33-3>P+l=QLla-Bo9F4W?URv)WVmV8`m(>%@?2?@0T@W2 zFH&y0vR`&5c)*@<*wcEWQ{d}j4CyU$`VTN0m8y*t!MTxm!uT)x>_2&ck*Sk6(01BJ z17OV(;qIxs+i?U)+0s3wT28(`pM2LtA`vJs;5c^X%~?7SKG8T5@q$$HO0ho6x;~xs&kf_p05V*thI=3Fkt?yQo_24wx&&!zH^r%rYfJc#|e)WnX; zVo8*0M^?Lr7BQ-j@`)Z~%?1H7d;AF`5dO0E}k zo?`FIaxjUv>x~Unvc{1L{d; z+w6&4cc|YM2g+YcW=bN;3x0xFyYI67wm)T#s^G$Z*{A=ZP<{v4V9L4hM3&;(MnF2; zo*7reX$!M?!vH*c-?aIUGVe!6c_?Bdn+swF=gZ3F(V@40gB4kJBC5XOlzhY}hAYtR5J%Pj+WU!>W3lEmB*ERx(h*G-8b3YT7JAC*p?g^O_L8vc0f6!DDuDsHcNSe zK@lx5yw8=>@=O&4*hxEA9Vnur@pNGJcS_3hq^6`#B+pd&MFyo5at~k1bb*A95#!-t+VO2Pk2)6gg=xb*4Hg-?$Nhy=B=* z`EiOHBWfUdJNW$+Z?e3rqyC*9UQVy-gNM{b?%sZF)UmT_Ti#3L71kqs?Z+eeQThmbhYDk5%sBx%9-+5)A2Og}zFL$gU+(}T-z7)x!__#BTE2~>H0L2Qz zi~X?)Le}-C@OI?qb0smtl_{BJxSpN8ztgTgme9|5PW*0(ql~ICdm$K~`rVaPCo1Jk zir4#PrM0X-)2{iuNzL!t{1c3`ZeBrl>xaFDJ#Bw6Q}}P;9|1l3<3^LD+fnhaKceot%GwDiZG2yC;!e zB{}DZJxH+x=Am+AD--eBJPi=G*SD;xLLFu+S1l&DKF<68HP2(4R94~)8O5gzPI*fc zB8BUk@>!EnfGw;9h~%&N|26;rI`jWi%RZtC&u32O#i_6e-=UEFo~&kFP-TGfuiWem zK;`?v10Jt{a-NsWM-erikAiF3B`YE1M~FhwA``{pwbyj=TfsD-=gP}rvLHdh¤ zlQ$!hi%}8rZ%fs@d9}ko$K;!oye<#8l1~b5#gV<6%-bfWU0C^I+sD{n|7)k@@~BAd zA+KG&Bg#8uUzV_n+{Lc0ZXY$EDL3%jw516L0ZQ%H|%IWi3GF*jD z^EkW-kF4)U`J^xk?+rpE;fHF?uxgpT+6DH0BfKEQ;=R{x-qQTjp--9hHamYXX<44y zRLe~=OKhju*Ye;Pz>NHnc41}!1%73gG-j?x85O43VGXOsF7v#dm7bipmbB{ zD^c%vM`l2lH5HE%ha&=VGg7))`8^*&$!fBRwZ+GJ^k$KVv4pKeB)ItfSo&n(=_>J2 zK7Z>k9eq!RWW0!K9oTLe+HB`@4_{)1#27KW%0hlDt+H%8W&J7WdgT3%@eDFf9cZV@P=8f=sezjr z-1uYu^EAY-5VG@%c18pna>gf3_wvWz070-lfS)0S{B?l84)9;;0Dpp`iY@U!&c4bg z*&G^uZgu1_J2f}>_ig1VqsW#thJ>4CJ?{G(C4N%wYkoXfvaz2Q`SbW(`6EX>{SEu0 z9VZXvV=nw|3A~S>9Qyh7160pb-pAfpmH#OAC}TYDbSipK!SEjrNNn2dV_D`GfwyM3 ztO#zzj+W)s;tc!q>4`;wE*uJzqMzSQ&iz`5Py6`6z(ka2)O93&R#;A0N-`eprMv|# zap2%sYrcS*<%;mxWieV+3;O0kl*!V%#J;sCuNL&bFUF{_B6`<|JNG310m-bll z-uK{Tm)r}Il&dx?M&aRqIZ7^lG%(WcOyJR~&9OWOeh(lqS`6Q4DLTc>pp(gZx`ciH8WMGpI2jAFV zvkJzFecBMly7%r8-|V;=NH|mKO9QhEZv-1KX{)lzHb>fm3|2+ulsTL9c8=&uz4L;p z5=)%>mV;&%4+s%<$sO@r2bJ z1)Ke!QNL8$QnSpv`d4C(T9hPk6kqkRPngJdy!=j;o1|lHATK$x)C-RG+OP(}TG}CA zz)@@t25oIWfXc3RgPK!+ zUEr?^{Fl1GAD56SOm+hs<2pYfA0yQP1~NzJmEE7`b-=dQVKv}wf0SY^|6)BT0B_xlJUX41R3QXS>3uLxh>V zHOQBZ>sG7t7lcvYU8b}!HPunTb+zY|q{g8BCGW8fYh#)JFo37wH+xy?OVRuuel@f`O{``IPg(#E(?R&`iJX$cj8HqYV9ei4!``k z)1fR7MvQ;HA7ig}j`aZK-&yij$RQ2DUoVOy$tiiZjG=4!jfC5`Q-0K+y{P&(k(Y&yT@Yz1wJqm)zV~2DZaDDtG?;00Q->YxAFQ4FUt<~ zT?6kUtps_=CKG-;G3&1r{B?r=awqsh@n%!OyQ>2-m}xq4Cs2{rOb8D$!R8Ze_DaVa z6{Vr%EpmZ?2w9lx@xD9*07I>5yHBLRqec$7t6G>|Dl$2_=3#%!{`vI- zB9+kR8g zEn<_&+8ZmD14yaD53bO%ENF}D`bfnvqKw~Nu2>8J&$FM3ZLmMk>3D!0&wD&y1sut{ zcpcXPaBNAhK{Ql^*n=G(gcM$Y1g^etb*PH8irFqfo{hju%$mw6;y^NLSKw^kDZMKZ zqkbG_ReF_9fY?%109RkFaFYX3(GIWaYR7L_LQ2O=u`G2)V|%Y!Qk2Hd>TVSf zF4e7VaUSXO+^AR^unI&ACeOohqT(#z!70Fe=d1S*pYTzJv~dVql+1RdE^tWdPXXE$ z>HLnJARxhwcgmu6zp+4q0%)ZsZ=Lb^rG!19(t*XP%x)*3>|KST4__nN{s)YO%ZF%I zdxZ+H{#XU6B8dF;2awrp89Yi6J8YuJb?nI#8a%4z^xAlF3why__Oj`F+bc=1Q#!R0 z0JA5^V8R{j?_{wrhUC;4mB0oVNBfxhN-#DtIoLc%B;U3a{dI%CZtySQ27fRzX@%_( zZzaAHj3aA|GvG3P)}f&1pnOo!oTz@WQBoBp3+A%2)DNmcFKKoZ&F+T}tk1MJdr5jE zY25o@s;}aQ)?x|EQtVTH!0_|y2Y7o&Eor+|h_YMb9esX`qD4W;q-93Ly;`yoHiPV^Fm^%|Q3@C&Mbu%|@h z4KQcZ@@q-1Qk+CLr>Zp@4m-RXIC6QNx9rBm#zv@$OA^>ZluPVL5!#$)FESQLBI;rA z1BhZhr@C2jdRUPhQNLh1kK(~>`i(D-&-1(3UU2qv>TEv;V7K0yE~qZs>pgO%ekL&D zMZh@f1X*V*#uDX@7JV<9pgOCzy+L^>Y~&0`-eeM#Q|YqX#QPnY9qDMnloB#NTgh~_ zU531dQ%SbJj_}tJ{v{mYPq1|X!>*y6oE?1shhgHyKZayJ!`3Z(r{CT*+WAslJ<4?} z8KIseNQ76x9L%Os##b8_9>=w*;|8T$8hH+C$3#6+91-Ic&EqH6pI<+KLY!j7JHP#L zt;#S!My^}op_#YNc0&M0H^23LYknLIq4qr#!OrXDD#!xgUkPm4nltovOYi|NXtvACqTp_Q0h`{fjUyp0 zHMjS0?2*KLL?N}F0cH&lrp}uenCn%ciFH4`dTI_wM*p?k|5XN>$GgKv9{%#RMn?&M zY|~(!`jRG7VRt3-Vv>|x-QwaS%PSwbC$UeqadCPl9Hl8bcY+Zy>MF_Jk_?GWf0YUc z_#VD|7tHmsJINN=*GpsD2D?P<@kmdG56c|}a0q@z^}j)`A#f;`8nhXJ zaROUYSpzXo_|TGSN#SXPPkcNngxl@$Rhb32ri3tMy^3>*7yATk`3?O#f%qyGp$HAJ zZU|=OW3!R`2XqKfzgzj|rqs&dMG2uG(vNi^--~O;B4Kvop#(cG5<*m@a8Q*K!Boi2 zcc@WFEOt~<%`jqN2OP5BL9QLg6Zy3)9dRPB_nfO<0#>k9uOuJ9)*aLfxS(}6V? zAQP3|Nsk@FB%4NQ3AkG4k>;j9PgVL2&zUy8?~}^clclJseU8qcb`?Gz$4JSG%I!SO zAxMcas!5H%8INk3CxrU*>j&7mVIQHYKaxjbKLl?U2-&`^`o77_V*0BAs$zq0gf zwv~)P!3B(>hGaYNBE`$Ey(bi{joKJ1j-~VklOp)f3pvSJKirw zIrM=9z%Azl@l|Ecg7bUH&c~*Zt38inw#JShtgp+t$<}VZXMpKy>mz|D*y|`cytOQz zGE#I-*(O@)VF^JmnDKcCB+9jT0)7cp1k8tB=bt~1wxtkBE&G$!OQ9E)67TBZB>XT= zxg#q0Y~|vR7U;Nx&6{!-4)X>-pMaM;(XB=B_UFBiDkOt{@B>C#(iQK$6vf7-S9j)v zkhIm+JYNY;*pMXod_{`FeqGH}PeYbelKH!gS0P2Mc#9xqkz4c+h9af-!L@CLXlq&` zSMdRDpHTif!(V6kmvM$a@^iBgWV~DYClM!4yqt8064rUwC9$|FC1exD`v6_d-VZeb zDf*vwMsO|5c?Q+DL&wLidrGdgiv@bMhJF*N-nl3Ts+A(K&+Lq!Uq1jOMh3dd^12^k zV9Lj~wx-}kvGmQNDC~Q(9ra3|VsFAuRDG%kHn2)aRLyLAS9HR5h*EYB>29jE!qQsvDUj{b4KyfRi!Ti-y7{k%NfG3udW(;m`Dcf}KIjSun?`R#Fl zb#P=*CSeb7Br`qeZ^Z6|A-2^OSvt}q<1@TdqS^*(Z+qYgTNM6N<+gL8@*LmX#ORqi z8&v2>wRZuTha9<5aY|{l?N2`*=41I_IyFxzh#l>1Pf}|#^M*Gbi&EAiN@b=Rr-&J7 zQ^in(xI|+WYp0>II%@buaUZhUQy@#bc{z}Z#9;%||qU6*{vuLq$d&^a=h~D$` znD_Hdvr5%xtJC#DVmf(?hey2nM%lftMMtQD;qaXhTyUIU|I`HHYS^M9pv0!*lv%(; zumKivzCV3+<%hj#ZOuMQX>>9LK?Vb^p!&i5#yY>2u;r~c$h9;TjH2LKirJ0Jea9>D zIkRsfYyr)&TwgECmCMQYSLwd4i41c%3iHX$`qv%)y2HPYJN#j3vn=_nM(xxr!^^ny zvh&pNZ0nWYSV^6x4(tVT>?bNIZcPPlkO7TcTZ5exuNyWLi&W=+l7UEX_K#=&Gl_cM z)ksiUCq)TAbIQ-JAK-!E+YSI}?C{a>@@1eKAOQuAeAwm9)cE+YdxFjRZ^`2Q#;h_c zt4{SvLN4AZN<1l$2Ij{Oau&3eQd5+$$tvJ{6s4T(Em3V#grd8;D?Ak)|0 z8TKkKr5O2DAOODUrY0}cp@x-=-qF<1HO66!AhzArcz?fd?Oi@+{*#?}t9!-{;KD6M zb2jO{vO-Nqy9Bz)&dll-)$0Vd=f;h126F)o+o(j_;A0yeL1Da_ zT0#|M5u{$W3ACw6LzO#7`(t{Omu#oRdgpN_$g`akz}GETFF@^FQt<5Ap{jpwf4Y*J zz)ZU-?N0$|37bI_r^-))*YcvoTs&QUtVpyP8;CusW90XhG>NKw6GtQH!ZyxGh+-=i zub+lj%2@Ut^DT7%d;#5gw(S)j5pp^&L7aTlZUrM_Iuh>y$#W*8%PjFuhl#<7LfaHx zwG@WRO}NHOWS3~`6Ur0_6Q*DAcuW1B8AFL`drPUGam2<~uAkSt3IJXNCzt9SCf>XY z&ZmC$BI6KA`LD7)ow+5kUHp~z)EZ1w3InH{%GAgNX&oTH4*1)9)zxin4T(rbk>O=4 zvGd5b)>W4e;jcsdb%=i{hxn5m1@TPIL8{ZT%`N4Tv<7rywGvfae9l`aBIJaSZ;0K_ zEp&>0;DvH-t6Uk*k zly%>2R0NaNG9d2FZvmH<88W^dusDKzEMczH+aJ_*C0dex{+o**0mlLDbj zou1&?1h1(IFYex{$Zzekk^)y>$F$h)DrW=>d~M7LKvGOCZrLJ8?5~4yb|T)-v)=`N znXId9HjY;~6MZiGUNs*{3%b5}FY_;zBH7dX;Nbxq6H#KZ!=z+^(>Bj@)oxT7A zs{F@%ce^mVbg6YZ!!NnXj@=l0_KRn;OXgrGzrz%WXl)V&2*mk9kx z>z4ho9$&$Yb zJF|ajNE^zhWwi<^P$us|5koi}>Ynu8#sDI!D6zh2I54F>V}D)ZuS@)kxx}AFlqXxb z%NUSczx6A1g|pX@rTVj8P3?Cac_+5>C!6|I{YfW?sCec~ zpUBW7nNv?M3k(1l>*Hk|L-NvJK7jv>CpOg#9yzYkT~(^1W(Ocue@nKyNF#Aqlvorf zAXojE12@N`+SBANPQ{wHfHqphQ?WJW%2;V3)a%$RMo`zs1FOo-o!h1eoHy{-(mUco z8$YWXgHtUSWTrl`;p3b~){T|bwZqymh=ltF0tzO6ZXd^sTFmgd9=H=<2uBoe;7!v! z4*{DEs^&3qFY1~u%BC1d^ba9+amUU`=DcOQVVb18W>Dv)F;Bm*1fM$u( zo_Oal7`DM;^Dp@LS2jhS)t%Dy1|f!}AgnDlpcFe!z7bvrX^ET^)Z4@NAXynpwaG(9Gh^rmGSW>?IIvyCFF!4||`Qpcz<`6n1 z`{Yd&3XBpgsDg;8@`8GwH~0~C zRpjy@ip#V}P<>v@3u29dgNi=b3F_y|DG!v)TLMV_B&pI($wExd>uD{{AKvkj1s>a^ z>Zc)@yQ&+`3fdMnr(u5iTb+YG4mNmC;;l+tT|VlBy@0?jV3r~y_mU*DYykJ+-6$?G z2}03!RV)`@Ck#&M+7_YzuT%VWihnt$_)`Hk)PO-61c1chlSiFReoBReol*K|7pSJ> zX`j@Yk9S$~QZBP@m@;ppCS{HwtdIX?u{FyPtY|Y|DoPPbl?TjWZEPy3ttxoQpZ)y) z0k+xorBFIZZb?ZWqP=zxAn$Bd>O7B)2h{L-5m!G;SV=W0RTpeH*;L^@f~>kTN7S_7 zkt^L* zIG5+GA$o)_Rq}P#o45hwy(}p}HrM;~K_y+^pvK(mEUj|vmXj3RNAl1#9kN!DGCC#J z*lKmhR}9h-o{?T<-|zHy?GKf*W~GnsLJ!Mqk34$`b0!Y0r%I-OMbF8OMO%Disnbb; zeAC8%EKnY#Lx_xCE89fHdjZMbH)zx9<2fCClI@04Zw&dL30PH0f|5sZc&=me!y8E3 zpZuIH2S=+iq=xkn167((m4GGO5%dI3+kiO_qeqwcL^<#<(<@KjSW)isKk*2fv=pggsE*J#?)5+?q!ZuY-JXea+{ywV7PwCtp9{=kWf8F9= z&n^Dg>Acc|oyll(Y$Gip-V^48<3dVDMW_3S40?=~!d zT|>4eKDi|+YFeA|Yw45eho5nN?RssPEWGQKM~Md?p-NVcM|Slac};99B@aH*>$$gr z)@Ky3iPH5q9-J)fR7+GrY85B3q|$aS*#n6*09K&gXM3Y4!7O<^KS}Biel>9dZ0NK! z8%byaqP>b6ncrW#NMix=-GgyqAri$ZtnAd9JR{_IEcJ2pi#U`N|4LxTNVHLUcKfFo zlD(PXj$|uk9ujYS(x+XDCe;uril?LGiQUKsF3Bkrs{(j}A>PMUD6khFTJ8{izD*KR zHM)xm%6;`6t~&)JlBc(b(4MAdC6$0=ze!2n2;_S_^ij=yedHo+E^dOw5Xg42++WY5 zuwvfw)l;(XN>rLl5eWj1L(OgQ|1gLr$mETawWW}KUiqULTvXoi>pW^Y6=A8V`!nkx zI{h@oz`M+jU{vC2akgI4;o;q{*P;oBUyc-e{-Hhy@O*;2mq#1m>YG8+Wlag0_sN?tbU_Pq~~5QDa%e~{#$K} z{Tnt-V^h?FZ#keL{&zYg*?%NWsJE29R{m)!S5@tw8;TrA>?Y|^uTd^G?Aw7}t91}W zNu*9z4jcXX^#hudRU1^c`9ChZB_`h%szbHhpib=u$s{>tDQn|VQ%kaJ7ExN z0*kV%SGxNihx4vO9U-7=UMuE&Fa|z!k=i54-jmJbG%%2MkHN-D`Gm9MI^%fiLGGRE z*;o1C9TTlwu#Cqeko-?_FP%T2 z-em^ov4~)J{)2oL*_dVnkrn&%9wJchyMS#k z@h-~Q(KYX#)pnQDM7fxIq|nNb2SG|AAHKrt_p@+5uTKv2#$EBtL!SXZ4lQ6Ap z4}oeYuNpIdUE{B7{ENEApQYU0r~5>zSMu{%zZQ(RNs*jL>-KS`U}HafyK~Dt>b+lH z#TJLM6@0a#tJEVUb4Ll>4pI<*<<(j;xYG9pU z$LaODkd?cjm5@88*?V+)H@uEZUut%b)QJa*?cBEjGSz3kT@yXIxFCnj#sUH%@U6#x zf&H__Z@5?zk+)|y?BQ(O>1LM?s5JVC9Jl)S?u63mfUvH>hh_JsEJ96%~Q zWd|U2HsFs?g6RzB=sd;+wy_KZ7Q2?b_q+NC*2t$(1QQ*?u!}UM`h9m{mzoHvJYJ&a zFe|nN+`W<7jB;8TM))snU4C1w%7iYN0Na*FuOAs+X7Uz%zO1(0 zvw`n?JZ9K(L+0abbpZ=ss*j&yqZHnRKfWPQ``Ak*$sm3-F8@sVKg`-UE0|v1yjLbY z$V!=HRUYF?@mp~0OsHu!_QGo3BT1CvD-td_p8=ld@e*Se(5sC;Q%bGB&hghd{zaYR zj}Qu^;gwV_GNU^9Q$14aSG_#jNcN{C@k$nF8w}58Wxh6b>dJRCucNS6>`0CtwH}KU z+Ls;Q_B>w)5kO`e&xwUM&9=kWvDvDhUq68D2>t2g{t<^faZaMz=RY#5vtw}t={`#m zq$Kwr#eX6Bf}_;8&X0Pa`E?GK-|QGek{L>VxQSEOiodK2l3k76z)PF}d`hBM+02N8VT;v~X~K~LT={nSD!}U}%e2Ra zof5qvhKNi|+&Y&qD+^w&N9y2rn+d;D1+fznnj-h=5_?ORu6 zNIHip1@mj6eB5!Y_^LE5`vA#^BJ?p)rPoa}*-ty?Y!Cpn?NXM5PI7}w*gbRe=+19z zA4N3v8^zquuOA>0=T`A2t_yB?x@(9%YR&)3)yrsSS@71(B|@hCfOQsl;y?Dcg=$aj_4Y!!?SsMZcv zB`|sbO2{BiWX6M}jFnMw=P>4czfe%CA0R7D#YPJO@j_+Ffe#`Zx}Gr!T<>oy;iH_CP- zSs_D$TPFSh#_?1Ttg6#f6Y-Q~PKTAF%(^0atcUvlnQC4HyCuQUm0%|2IcTqh4?Q|w zS6Rc*r~RV1zFoNhH~Gt(N=F|+leU&+1l5gMd!b|iSZ7;mcczGV`9}n;=%u~-jghAu ziLCt2rc@SQmak>A)5Jvb$19I2@rGi0*e@|`-|s}L-7p^+RftM6Dq94WXU%}x)w>jM zkn7Lyk}zB;^qnO%kH`CY*`)TwM<{66x#w%c@eqdE0eexnj}Wncs9Vk*((8gyfm$pe zx#g;)OsNu{gO|=v;SkfU9b*qe&655^=Q{&M{~XP0X*-=gSz^npRFw*3cwfBa46)UA zEzComO&ml;FQC2J9)BI=uY>#xJIJ4B@BLO@W(U@7klno*3eHHyPTdZCTf!FgDlF0> zwc^~$(WPu%+(Q|PJ2$&au(EMT$A?YBbol2$Bhb`k!TD4>CLf`iYSlJy+Ar|y2S`+) z9#K%afxj*uklP#gP>CkcpENxSb7t}FB~*p_fI^2=mG}&d$;xM`T3Kn2QRi*m=)bt58ROyO>WUstYj#T-bC=)Qr zz1pUrr;xwWycXO-Bd5j#ih*;FtRa_*ccmD3nK$W7!Ycb+k^^!0oMcG~Tq#pw1L!<5 zMcJdt|HA3Q_3GL~?OAG*bytbi5H=W;Bu}tw(JmS14znBOe@4Nn*p3v70`vT-U@dt$Sw>wBHo3A=|lhigWBmXE1L zmX>LI)75EZrVk!vL{`V^hU{g76-A#QMAo{?cHZX!yb+U#-)*c>CMa+#YMzL^lpkHf zrA1n(#96~2hLJ&XUX6<231D6;00+Zm!3IC{vvB)^ixUwKfz(^hA>}XuAjo459tY=9 zECmpM5xWv$LQzjj5drBH!S!q4AL7i~Z256@qG*;1fcJODAMZ+SvNm$^r;n{@?DAh1 z`RgM8;x6*XMhnW>fTe=a_%Z3mW!njb9Dq$pOQ50#Xb6Oa9b>?kyrd*6AVety{4#BM-Fu&eQHqeBDNC9B!^rdv?o%l75 zCEO9DE>;rkY?h?gXY(pkASBvmJJ}^b;8WYVVsyKg9QjbSW8f;OsbfRu@9$WmL+H8s?=Ap5NJavrQ7U8D4 z7w@(_avAD`Juf)35lIN%^W$f%av|3BA=uuNv?fv-uXdgpZ10s{%kZ$5oyj1eyTOrU z23|k;1FN>GPK=_uRmDaA^BzxoKRHJ=VX}Ry;Jj0wFEC)TDG1*kWc z2+o>br$e*J(*Y3?|c+;-NP?rLL2qr^jTk>-!D9P&8q%hOJE?IS-?UsgyuMjjJw zWI0{=*~y;mn0rwm79?n&BoL%WieGXwE3W1OctwpZ0GUjPC1>SzRp4ODJdcUvgHhDV z5BYmuXQH=yfQ5Cn&E&lv9F$iUSL|xKvDB&(RXNi@5qdmlk!g@pvDv68d*P$r*1Rm# zRf8gvvhfVHTeG}MtVUXne)G1sTAJgs_`qCSRbfiaC&tQRU3nRS6_-#o%AP!RV9x6s zRPWb5QXCif4#t$EBQ1x|)r7<>Q@Q84UtiOGKMMJG#g{cIk8Hi)+&tg+>?ah;Y6-2% z%DknNkoy&E@(Zs6nEO%Y(9yym<)T+9H9m@^8+L()kAu%)s>?wjcjQHFl>;80?E9AX ztIFqCJAFVxdVbofbKWGYmv-c!}Q_sRb z9CHBahzcy3RxnF93#c$;5%Tar^;&5K-{+&&tt!C+W!^_#4vNlIw=F2GZ(f}bTUJTG zeZZF=H?JuXcyI{(P8Jhvl)Y(lSgemQ`6SA`Ap3`N8#d3MD8nP=`$I(t z%1r!z`&kv)lS!&xwL`)PYk*y&{NO8(4X(qe3Puu7S7RzkbN=i+2`@Q0&Nb7wi#Vl4 zo+I%5ATkJ$qN75kas^xlL>%Q5&YIc2n+-0`|`uYm4E|))NN>0psSAoPX0)XpV+;fZ=eY^ zm&aVI=cvMxbAqzT)TpC;SGoMA0){`bNP2m}233}MfDbQNdPOw_l-cx%q5x@q42yY- zS0EU@oo8d-jXBi}aIcDNvV2ow#3|9{cnRDAe14TzcW%%N)sZJ3RjJj3Evp{dlsMQm z;$rO$q@=TC8er_RbR;wn@t=cfRzymNi`^`hMPK;*z! zgt%4il^0WP%aa^z_9&HkqW#;kOSXjxc6*)Q+NHVNQx!Gr(W~9BYk*CZStau`ug6PL z`Q%rA97U4DUsw6-D*sJfQ!#A#b?kw^zYHO4O)o2;~_6 zf+U&9_{(Xrt@xlcz)#*-7+a1ri6$C9KOW_{6p7_4=D9D0_qa-LE12;_6<)!BYK;Jl z@grbkd6j=E`%`cs08sJQ$DV`*7f3JD4wt*~y>GE!Btgjl%C)sI9%`h+z;fhq2HB zn9?rb)Ny)HV6jI?-A-I3@1mUj6_YLy=#`VR*=3VJ)!u?!d#%+6I7&qYFz{9iC5h$g zj?Rb+k?MFKk8_AvD&ssJdPHR(qiUd*1H0xQwx%h(11imux8qj)NY%kqSd@s7D0kcG zhn<${T{H-2_Y&S)*Pa|c+WaLrx5<)e7q4uT+le5Bf4yd|ZG23c_XZb@BGT*jr_dYGeNKF=R!4C0?_KCprM>goq@M+;$iOnZ&?=d4EM+Wyw3)eWd zLEsmP*mZV*(p_SNe|9M=$CRGb-}rS?z7yD#<07~G_5s_jd%zx_J{1Uw9y-2Q9WdqA z$eKql1RdSwQMj@DmyU`VlweqY$#>r4Xm^%bBeBc?B`FxGKx2C)KU|(lyz-(4FcS;b z4tOlQtgmXlcqk<}+XLvrRH;LGg^Zoc^Hgz|ZrAIa-ir-vXgR)dRf6qet-;oGtflUy za4zxZsmj2_WwERH6GbEVAYpd>coM{at#M*s8^0Mdl=OJxi9cb0k2>cysS5a3Yyppv z>uZ-(KxG$?W0!}HLC^q_rTwa_iMzF2)jxA)E!c*v1XGjxpFNF7NME>cj8gjfpz%^V<4F*s<}9THT3xnSQ}~ zUMBM$S$?Omx`W;=d$REq04x470eBAiElI_Q<8oA;hbKBMPDE5YXFkgV9YP+D+o}@C z)`qP&*6z7BT?0bfE0toDXmh&)v&%H>flLFHvse7{>%F#pupdDd2I>{KGV=MZqa3M% zCV)FR@(pHQ-6j=NLLHv&n3d}7^T$EMWkGTIt?n`JfSa)^v)C<+{q1tpNhlUin?xY<-d)) z{ITnt)I;t2o&15qz-0UN5G_(oQ8M>XJ%#A2Nyp>FIK|n?-({v9K@TR`*8#P)xJI-l zETu;&q4w9glRYYS9@!KlzQXmS5npOc{QUX>!>W*d)>iWan8fO~>aJS~VdcAIRb&tD zDcJ`lELc)+Nui3R>A6Z{fJj*k4Bc_xqJoOJ<{dtl$2*dMA9h8B0S_J$8wctgSt|Ia zInO1Nen0$^L&^O~c4)e+etX#>YVUP$vZ%Zm(4%%KmM0IS+%_x$hcc!5+*3sN&gdv| zR!`X!4sukhD=C*aB#Z|gILG*aW=6(sNa=vQHn183iFECtv|-K{9&j(9g?@*T8@JsEZS|?IX_$ zrqlVYHr(26WlJ;m@2O4XNu?>Me6TXPikH&|A1&67rG2c8vJ-nu(>;)wCo3nF?}xUl zYKW?XHgN7Vv?&5TU4Z@$X>v2s0Xz?~RK@!Ft|VA5bz&kVO8AE~vrt*EjNU*Hpz`d6 z3S_i^Jpp?=2BJ!EJcqjGc>ixV94~o4rpNx#ys<%mKFl$JU|$Igj$WF`KOk*~>Q&ov zPQ^|kEREf<6K~F+!?GlzWVl|1OX2gp{2)MlvUyTOwg|>2cJCx+36+S7a9e zB7J;Bcc8Jn9#y1d7kMb?U#h5IKcL&jM?tC>$o9zdyBwZ)B}=fS_~514A&Y;OZX|17 zmFZSJIGn|jotWEqUg7vi-fUIC0bBfL!oxqV)uZ;#l7*-gZ>^y?0)1+g@1=VQVV@5G_DRXfZ`r0C zj926idiP0HF~EJ`OR^Adb+gH_;bsCK@;AIzfgk5g#4)NOHr-!pO?Bj|743 zr;zrtg}>z=DGq#vk9hi0{YEb78*Ls7$^gqZ1Mmde_Gc^Jb@8k-%XbJ?pM?E^0)q|1 zETLol9vLm$i(lN1LS5bINAgPT3q$r$yyabFwD{L${<_S6Gne^8HavEstn+-# zBF&anUO!sSQ+3(gYP-TI_W|PAz&)g4RVJ1{aEeP_$U9GIMd7}3_a4=rc<_W%;rt** zLoFXC=C>)y6Yj%?rxnxq`Sk+?Q}6W(@N)ycB+Lq$lb(=WkTxvm@=#>k_}M*$RoeV( zlS!RTqEalSGzmS33!^CMA|J-Xj{@xEGqMSj{28)T;~gM*X8?%?49{|t+P48bftsF^ z-cx62n3?Nkd+#GNrBdW)%5})s0aFg(Rpv(3cVCapolO`QnM4a7R|v}ZTl**szyK-nR*WYHT` z)&kqeXtHGimcKcw4)EBRRVJRb7C0Mok|UrUwv@fJ5&(eZ=CDu48>lZ*y-EuJjAeFw zq~uf?2b3G-=G?3f1qc5Ot9_{bWs;Vb1*rTD;M5cx&bgN;fWJs&#ka*v=(rBbgE`Ab z=lD>~7eFz#LgeJ-FRoib?LvM<=_o$Lv~S2M#_$rZbLN*~1cbx60dUF`@vEg+1N0S7 zmfiz2Cu&P*0A8-E{S-x~6(#60H{f-vRH6Z|@)9DCqe>oFc|F48Dl0C#kVM`@oAZ#O zo?en?JOI> z!})|FYl~E|1R{r_*1Ikz|z?fH%Lyc>7yQIXm#T6_gm%Qni;$Ix7fTR3a z#~J$606~2HC#X*DmvaQKwP&b&T|?w>%69%c*!Fsx?O~+KOF6J=p2oZs&Iu2+$v1AL zL%b`P-t<)m=e>=6o+&?}a%Od6PW3}^%5mBxlD={F@J^s;im9nVKfylhf{wv9&ScnF zKZ#pUluuxIDok~cYmFnZBmu(jBBz<3 zMN|Xdo#+|1vnEgWGC_V3gP$tVll4feHiyBld{+txq4~on z51$BgN_xH0`>&?Hqc;+r%__?5thvP0-?%0?2vb*@x|TBcBl~aw$^);O;yyc5Dd=nc zM!@%XE-rU;=|k>Nz$LK&EMFuP=pUQ0ECT?_x6epWNOnB$uYdLH%LSK`AY?Yh-+OC> z`FnOy@kHUdVo#~v(}^IJq{n)x1z2tN2)K3~6C42$OC)<%BPuk<7We$p5t2?2g-fu?j(xZ+WrMNaW1Q zYJ(xuOVz>ew;_Y?iEXOOR_5@u%EJftA~@>4Ws}Iqa8~}h&0n|qZ|F9ERJ@leC1=y# zhyt0;_OAkN`Kr@uN4x#BUjx-dfopWKo9ti*V3oUmdT)K@M5HcfP4kR)>EPM?^93rj zX~>&DC@{1prtTBT8y3!utGhjsQ ztCz*@I#UjU>f~_#>qv?669b znMT00++sh8K=I9m08CS3C$`h2fK#%~2D=WM0qih;TC6XDsB4DLm_vC2+1W6frPSRk zCuZsP07&WTIo~17VJg=~bwir;0&RD@EL6C&C-|@9{B@lFmX7m>kLo6)HEv+Vj*?yH zu+-q6CCMu2Pgy02hh5M^A@+D}Yahz<=s%GKQ#-c|2eI+HptMuZ9&le0eV~3#b)E5v z!`NH-5eKs7tlrPBA7Bc$Pk+thNxoOP_fdM-X4Ji2n;kv%m8NkFycN@2*;$Vm)9v!h zVx#1I0L#RLfPN|ZoA>@k1bBL|qvO~T>8wMO#YE|544VShVSo0In6fJGSx)k3n+=nP ztL>XESwC-nbCtI9k*qgjO-{T-voNq>@N27Dn;@~JeJPV*Rs1TVga6$}@f($|S$dV> zlB}4AAf&+ia!2oxc!rk(J{Db8rsBBfR!iDRG^*Jw{z;#9q@bN>9VfjD52fij=f&R+uQcYy!NnW zLo&8glUw{c-XF6(Yf;umwIy)0eV!8}Pzx&3EhVh)(!~`H*zC8G)-r&5GDSSa(G0m`EM8}|3`Vz#`Y70m#lZ0%3(GFUj!Y0O$8_1>hMy!uQd;Nui!kqN)IaE z@H^J-zLI)Mgux+2OY`z3s5wi3%c;ba`J2D4^VfC$o4U@Q<`6}qkh%))<`F`1zW0$g ziQiqRD3xs*hr(U~OzO%9h=nfC$rrB~vg9k*bqHMQaa{poso~};0d=+|_}G?2d3_}7oKKVw z#U^0hrr9Kwyfz#~`eFM{ciR$=Vm#|v4#8YeSi!uVImr)Bu>*0!0QKMje0sEnD6+h- zigcbV$@s&!s9@IHOF^$L9e6Z=Lp#1bu`2*gBo)!5UrI+eY?#1 z82Q={h^IatL}W_$T^)R|@%E19Tx*i#`4H8*JgPV(Vct=BvvJOmi=yNJ(ueYaGV3%smGr5$C<&1q4xIh zyX+84Eu`}^v-9_(-^E8yPh&32%0HBAGkqfCt&Hvf@Jp$YmZE#lvjx2KZAO>)5eg7} zx<`5zYDa49z!$43DzPQOBHN26R$kM-ULw{cF!sOB^VfO)+d9u5&s7`N%p<9#J8SAh zoSYord_`0=Dh-b-sl~x|Z3c0$lw$S zMeuko$n$+C=quM&rk5PMQ|-?ym2qT~|6v!vP>ZJ(RLjxxinlstN0?H{%(GudGt^nA zF*}f4j3lPJx!xIeRd>{avhP54t=_A$X_;OV9+s6N?3#(q+c23fO*otP|_J zxyea-jvCM^Ue8PEo&frU?MzfuS3p`A^*MpV9}l*}P5hA4v7$kHfuEsXdHJ}Str2Wb zkfJ7EMSOOa3WgxxJAu?LX9B?{xUm=ZdtX^MJG;Xwt;iFpRHVCej)q^iY#R8E!P&4N zFC2jt)2Ygf?w|OHQTOmPm7N^$C*H}rWLwT9L%Pel~V_T)aQOe!$voDrD8}GV4z)f)wp2J#Z&9mQb-z=|8fE;kPPR87Y<@ zu+yL{25MqZ;0(*oF8lP9#0AU_d7&W~CL?1oBVp{bC@ zf6U@g)mWC}1MEK7xmG+9Pz8u!UA+Nt80E=*Hi_Sy-}7R%+5F_5Ch2b5szVH{chK!_QO>$|`JD)(Iu|0`ZOJgH0f<4uUP+qEm~tzPx>ELJCiMz;vmS;+P=(X5_uxlPCcsnsCownr)+ z!Mx+FOnmISokcYc{F?mNE5Cl@rSt)HUq*lC`R8`Xt7oTV6sw4{+hfd+3~~s8>?5#q zG;vUHfJW5~a;W~5kwH#8%)S#-WP$6Z4=(~hRcdNJ)BfV+VASlYvGLa!vSdX`ueCK{ zw%hY33q5;pmkBzPDL;*HE!LC-22vs8>LfQLGHmze& zKBo(mkUScb;lt!?!?f7DQ#_=8UtWdUae1iD|LTvT50Z+2z$hxED#Z~9QC~-sm#UvCR6uZxe?+ zX};KMt~0%HNlQ6w_XIpQ-b*fQ7Qj6?6AX0v^$kfRT2d}+dzTwfSP$2 z%fxC^_BTN7^)gBg(xfEmn+phd@+Eoi`AjEPmc6c2UB zdF3o6#Vlnk`s%i#^D!gfMy&SQ@dx+ouZEWa(=V$%2;G>5*VV6*RMpgh$(>Sy4REyp zMV*CF6lq(9N$Y8k*&2_954!;Zd}PKufxO||7d74p^57*fJ}b*kfR=}+F@Ig?uM7S6 zcA-C1T;!&{T2+5iUipwnmnu}A_3;swdU)Qw-?WHa(VM-SX_8*meRKM7kUQ&+xAgo0 zg>2R6DY48TgF;a4;RfdF*6Lu!lm(yu&J3m9eBm*yu4C zYO*?Ss-MA}8bc*If!j`+VaU$&4xZ3U zeuZ&aQZwMtEHgz1(1)@$PRwMFcvA`N9baP?(Z{wwMz={Q0pR%F-o1eU>&S-vI{zam zQj<(-uhy+_FIQU~b)Nt+9SZ{q~$_7?H@jJdxeG93< zVwFchTGjDQ-zbKcva~n~S=)3QoEJ($BI<0yc6|r$Q9z_Or%{ZjGH)#Q!Z z;1eETb$84U`wRdh7Cd6pkY-c5r^tYZ)f6WaS1oV3jhDw16t*QYgI6gZw&LGA5zufp zqPQ>3x~=pb0}Y7{l-C%f|9C%3&aQPnWPfSSF3`-2=ElO+pnT7KzUq9+3y|$U zSql__h zF{14Sfpdr0#LXLQSn~j2jU+j8Q2~>81^Av=7x794mY~qVlNOelU-?Qu*_zWNUpX;( zodA14gulWP-1WY>*}*nX!pI{Cb!gbBIs7WLR29LKi5bL^6R4{4put&vq?iF^CCT+2 zIuR1nb^J+%&`D5|6dXGYd3v9HWH{$9<-y57H+4xZ6$m~Xe`gOtuvaTj&V1l1c-uoU zzsEO;A0=ab_jzr?%6WY)!8m9ba!pe&u;Tt-{-U4xC^2mhT-|_74wocaxHs<&g+^UfYh2=k(M_ zl!qPw+r?vlYd%dpaAkOAY2Q_^bSU^xahPQS)WRll53m?Xv9C8BSv%Ca^pqjapI<)! zucG$k#k_q4##QK6D zrsAE{-_*}dQkdS9lgJ@SnBx>XhROe}0Md)e32Sw&?ES6tB3TX3P;DtA@<{yEyW-Wm zT>EhNoftKc6~OmCACEo-^~bS%Z=GHKA7?-x{%(WOhAd)px#N;Q)Ln>4?_iDjEP=&X zGDb^-;=H>n(}$FFYe`q&`ALqvf)q0q9IK-2m1hqG%4-zjR8_d>`6i42Dd~+w%M2#X z8>~`0yB5Juqf{#IA_v`j6k5X19uS1Np@Jd&-9C?Yo%$ ztunp>UZr3-1bB*xCR>KGKyp;GfT4EYq{ zK7_NDqfA8qgf%frdCe4v@RIu0mq)~pOssw9xwU@OF-d7_o(~AMZ)>O26VB1U>4(QN z>{^^G^7uiX9?YM8I@j4(DYGAkHnzP!A=DQu-Ta@{3IU~znD=)IeMXrfY@8@v;Gm~j z%K;9R@46kxIr9lXcYD4Sh{K4A=Szzqv0uqPZ4@r*S_hsr9=YJgb7!;P+ve<&%T$)& zCXA3B>cJa_+9qEIGR(L`xei*!;2>@L_yE0~SEp5xy8^_Xr8Ae%SApuA@M)0oX2jsNe!hu2bF+Pl3J_wqF4{B!!p`#7^}o}{Fve#n2jxF zQec2-?K~VV%Ix)r-J!N=TK>h<3F1=ruqm=J-CK&2RpqP8B3ni%By_~)1rqQsNHf*n zEfvQ+JF@e{lTQL;A60DkQse}mIj+)R9bW(NqdzBBg!0#w{<_k?i7WkyoEdyKg zk{PfN9Jt9R@HVM}D>DY2B}8V;6_1nRS=tr#vS*U37~5mRR+CY=znF~oDC`wT^6mgW zU++qQxp1TvA0Gh_-!@uu{$vHb5`am(@zPV)uWlyeWaBeC4E#NZtvh&t~wDx+M~XMXHS6e#xjmoo!MxP zr>y+VJPDj7D%yLs7eDvt=3WsRD_pK!+3NOscHyYaR-?POPohJmZ>0f0ty4hUczCi@ z+pmn&z&)0{sPCiDk3Pf7cK|MF;Z*|t8LZ%VUe?6+^OsepjEI|h|KO}|U?VP3(nBZ0 zTTbKx3@xcq|4;+)gh(|c2gE~qC{mej3}8Qt)wiuemOKR$h%aLAR&3%RIe720R8f*p zU0%KEp}v|YK-8)(*Vmo#5fu%^fA5dO$Z3LK*@`uJ^#way_9iSq{R}Y77?;&Ga)uSa#8>eWS`XV{L(grnkT>m=LUuXJv zai%{vv?06kd3O3(@1vUFPVTX2uiPvOEvvE(+5?fuChy4d*<);sNLCcjmL0tY2FSbi zemBOdwLBo9#rLzccuiU)sW{m|vL=5wGyn4E*AHlNXW8#U9oj<~rsk?X*;YL?eN&59 z7USv>?*{P9@NA%u-9p&TeNQ{>o&3W6D!ttK9VI599^f)$IoN#q@`s*+i>e;= z*FFCCYCfMu!Ucw8RdgJskRR@mw9`Wp%wH=TGI3+cRPWvfyr55;U6&*MUbzBR`VIZ5 zFQBJ8`Dr^cZUQQ@(JU4$zb84o`v*DW@_0Qv%i3_~Y9Cv=9S9&@8D<4wxnQ{oN&;5P z?3R+g1X4Uv%juX%0wLP@TJh!Em_#$g&z9&;kN6Gf^x0jd)K$N}i_{G{}w(wo+wkKSZW&_qTj5>fb%D$42{2ywutv+Z7cieVY6V?|S1W zh+so?STBIgIVUL~(pHusy)P)aDilu$3Lh6tJcP|o*!tw=fnU;=|IjnJgaI9s)$f(kY2-h{96z$k4qwt16X$hmi3+#Y-2U zDlbJIqI#lwIm!=HUi7;@5dSztOq`T}a2{0zdHXP(Xe9)_b`4S%#IcHW^AuY!CPw+YAPEgzRBMS5#wGU6uHFSj}FROg0@$;^-YMRwc1{ zXOeE^O-|QiC&~yea9S(8xjsa39-2C@or)iu;H5_L)&K~+?)N#CRm6}qp3Xp zc)a~6=emS$P3@$&)u;>zC?#jb7hPLRr z07)|g)kIMLrzp711Ne8tA^;GEX{{~$pF@u_|1@?)ns&DOj{QwU@(d&LLjm!T8@2Y` zr!U<0I`lFgIig+p!^5kCwr%&UrYZiz;w6cVu2O{rYJSQ27}=y>0%^0zgxrb8K6^^v zR#Zp|>dcNV!M6l|2_*Gy+wut08&pd$>K^ZSw-dtGaNfx*PpXk$k(;VTkL2Nb5`-Q} z2yDBjWWX;dasA229(sNb zR!s&TSI1N?YuvHURjAf$W{X2f?;0_WqpG^8&e(7zDlCC7)PA10MXO$cJv@6fJjNk2jd2vu2 zz~BZORCflwsmb@)HPnIQBd~){|C*cL0xXi#{QU-S25>m2?&_$GO?Gph1nC^snjjKuOd&vQhvL*)Tt-6w=+HpoaeRLW52KRKkI<= zZ%~*OB*l(*oS+e`Fo^==KjCZeZoQhPt1oLx0jU#Y_9 z0vDAC+%830BU{mNEG(9-TVg2uHs|gw36Om8=W;!*=fQ!2OUpjGXC!+Y%2Nh7`$q8| zt3Y^?cap-Dua>lSJaG<&(A9#ko|rudT&NZ*^+N4JY23Iod9>GiG5;eHrU&@mN0NX zO-}vCTkB7d>=O);t*<6ZvqKIN-`7~D{blMTv8z%Z90>wreWjKC>r#JR>fg+z{*b>_ zRBK!MePz+ULv4zu?(n^06W4U^h+=!mv{f;J%dYU-EJ+<%OuXV&+YYdT$yG|h{Ji!` zS>6|WL_*Z_x_BVxMFnkhC@Hr6{Q3cEfESbW#jK^v13G~srY&fjoG#b26lO6@d!e!# zbJD?J7bJG97ho3Or@ywKbxd12fJcVXEK!j~C4ZSQl)O|HU%8Z}+P1gQBOmH*IdXs$ z$J1JG0;IY*rw43k>m;dwyEZlF0K_#iJ`cLY;sGDjHlV zDcJkQZ;_ALkRMt571DtdciTiT24aBa0+UNUyxshzyl@GwEi z{J_#t7Z`m3hxI!V@?_^L2#9?ab68lyY+w73akHlpXDR&ndE9N==RiS|@{wX_DORiU zap-@Y>aSD%+d0)ArEcu~-$zjxR_DbEZ_~c0lbf#Yw#?E4t z*S^Pxop;!)KYj`c-#WqE|}PxbOb&00p4jg zy{X3IwC9%3MwtfrU*35t7**tOQ{scV6tohcQZz4KAVmsN&je(7&^D+{6`P>azWI|k zI@sQ}uXw&{+sYQ$OYpkCeOzhrVWZ9sD$iDBb-te6TBME`U9L}XdSoM)lwCTthrxq?8Gz@i^$8O3lNt$F?cTH!R^WO?r7f=4uR)Tbp~yGRQXPDKhHcHN z^G2eR115l8`;(--!@RtTcnSptrTLIiAS&HgyaT3ymlg;otbvccd3pqH^A&*y4_=bI z+CVI4T8s&6ZUK+7|84-lPY)%oM%3ojd76hKJG>sF2}mValoN^=dp?<=m*Qg-btqQB z?g4{eKk+V}&V8&)9^6ey_-e6~m~yU5n7~V=7i+VHPiU#!-z$i;W!m{5(E7$pWLAF^ zcOekAZ$j6Ts$!M$rH{tL$O9g$RAN6h0EGvSa|bHERuWcK2R1V&zc^(c7JqQWrtoE4 zyS~KmWLR}}1_ZsyRwMKIeC1VGT46`LArmRNzRZdk@MQt=nb)#6mMzRN%E6wjPhfa1%ESiQn3{L~jbo&YoDstKJd+ z9Ry|%_M^U1&3p;2;ABpjPO?1PU=bqDDvc;+-X%}KX|P@_t18G{8+fLGr)?nO7ZEYe zxUKU&Mva@Wq@u=Qzdf^~TdD!4E}!-0!Ya0)m@)D0TuJM|EoFk5K9+UdEnn-2B@cDy z_YPv|DJmf5Vjp+`c(3I+@OKP#tBf|DSd1ynQL&r-!&h>c%3~*wyF~1_^P~7gsJ39M zXhc*2N)G2<9D3|d0~g?aminSdLjedJ>Kt~UY;5Y>OL-femYrqV9u<%B>&HWuqaJXt zo8Op<^R9Su4fB1D#O?gFGPSaF%n>)fd|Mk?{sT7j^r7-rkjd6wz1K^iI6dW;oSwY_ zdXK}qmTrwxCZUVpyd99m0Z(S3r%Sb+lv)-EO(OG#4b?iObHc|C0gG4`Wk%wK=LKL6 z<>adZjb6JDfBC0Btd@gG8WMqL2LevwUxJ4()!cD-Oopbi`|~t@N9+o1mf#iMQl&aQ zSE6zTSvU*RlRO*1x4={b|pq2J1~V zfXpLZignpD-$Sms{+deScD|qF+YhBxvr)+Prr;w9hIdp~@nS>miN|`M0&%PTJsT;? zHXe|W>S-*{1ugD|tL%ockDp&Zfc-k1{Ac$Hd7f*`zYPoQ2ql$ z!~I-EJfn3DOm*QCN*gwbgPI9A9lNd(Fom<>8ISIOLlK`IP#Rx`=?aZv#ew^4KQ-`B zjo-p2Z?7GI(-9x9VJsqtlr`&S7EY$Z_F*^-Ch*k>#0O-@e)vi3b)TwQL<|{Z0l-sI zY4e`Ms3k`MAnL^*@%vE1b8xr|Ou~&+xf&D#cVCd$KFI@{(8FuNzii)@>tWWfld8Qd zY~HfYI_207OKSLZ(vna@l6K;Xd`s+jYy>8+Zvu#!|C5hOQZgOj&8>wC{1U*)3>f&I z3FfZ+GTYz5WRKBo@M>Qmx-!0Rg5C{_l7YHFqC#GQ&ycz?f7b?b3=xR-#6j1mynm5W-EoVMxvg_?N~{?sBJ_!f+Z0P)69*?TX=R z*+M~4?%Nab8sdp z*1ea(Z{P@y-P+@JOO`}!77v$fMcd^PmbziD5YEn)qzNM!7!oh%m{N%!Y2gTJA5t2u zOc<5h{$vF-__P_j9SHfTJFo05fi$oryw|IG;NaK3IgX`V?gCBKkB9+Bw{BO_ebo3dAwLumk{4gVb_UVy?^wxibJZr86-?k4jbJ#GKGQH4TEK0KsRW2vv_H%jcL>`}Ku6z^2!$upU4m#ibh63Oonr-D^p!U98W-{QYLZz-V;uWu%1 zYy0}Mc^SUz1@_={%VAx>*xhm~luOa?5fIprNYDmmYy-BVs!G9QgCLBC^TpGvjStcd zcy{59MLyXPqRbaAr-A2FZKjeb5f~D|mkS62_675^#6w+ZkIRqreOD&c?l%#>l&S=b zy`GbKiT{Yb9bd+8u(bjLR_AG{3OUC|v7VaRXBpTkZFp6#H{)K);|-2($zz`%UO-aZ zgVnIn`*So(iT<%FY|r(&QXdY2vWD0yk-kf`73?Sp&SF_F99-A1Ok{O{$ENDjDoaEv zJNDrxTx#2|65fxjzS<^nqhq+M8mWGIW`lRB26P9aYGeIh+>q}AUK5t&gedmP;holU zANEcDp=!TJ>LYfUP)2Ex>mcTh|DiNyhXGL}JD^q4ch^Vi8a4HU;XD|8h=1MduY3I) zyVoBK>Z!xFEqRJ=Zq;wcZvX}fBaylLN=~;iGwWb1K?-g#q_d7#9wt&r&-sp1K9$y) zKe_>@Htf71>!xT~yUSQ_iygDP;Q(p|w)^wz2TbquD~~9D6>KM%M6PQ-${~+e zC0J@~N=(V>9vgmHfF0R4RTFP3?VD`mSF>n8Z&nCM zlEeB30KNh8i&EgSJ{eDoIY~~>=gnEJeX!$1f(*Dd7eWqy2#(J#S!MR?3O3zr5S|y3*^X|KUu_3`ae$B)GRhVZPo} z;M{6S1&<{NMv}U}t5az3-(Be>em>s(bPp%H%DLxlBefE^)N0yPyU z$&XEH5?fK4NfS(%8eMg)iY-L-Bfp!LXMSVB7}E&qJrj*XcDRZdL-=FIehx3+uBVX{ zW%0=0`>{0uxMkXN2jnnJR!@%E%ZpZ<6NytG_}B7`8ZoU= z1NEXJk#Vc>Y{i17*PO%q*TMce*uS-d{c-k&ay#(Tj^wll04K4x!t$T|YLIX}-qE@m ze!xdn?Wt!&dY!Xz8U*NN%8%0n{S5Yq@-`$7SSCMukE1TsZd&tq z0JtbN!zcuaA4?9aj|PPxE>LZHVl0b*ooCrGNZIMgw*pv)XMu+6c}5XulIZ6YIC|B; zSmFm$c<{&O>8rQ31M}t;s%#Gm7v~W%vc^g{c?pO*M}{PYT>*TSIWDDSKW7>UrBKfX6I@g}NcRsH%va$}9Nb_>~8R2GS<9JzfM!Aq6l? z8^k@I=1i-DnsfKf4)UN+a~@=;w5I5#mMEwVk6=95H~4&m%}<|U5fp%?;8^D(@l3*l zO39~V2KxzeRscwWmz#i;PgnUPtXIJ)2X%mXe4y}h4sYX$N$k^WKcZI*#M@`hTC&nv zwqa2t;4zU>I?%`z4>O(Juw8gkB7IE3;8Ln z-UR@}t*S&0MFy#t$XWx2(B~q$uk`I+Y5k)sZ?>+n^v6-V^<)a2X#>dGstyxf>ac&C zUyKD+S*1RWh>?@FLzIo-7sc?u^N2=x-9cX{$ zptm1Cee&Vm2K#5_^?qYhatF7#u&YemqdthdMA=_g=cl6l1i}=`+WtLcYY1rOPw+a@WfU`u&4m!?RLXc5dt~m2)k~u^h zv|I?Mf`|%xpTbH%cij?G5LgWVeMrG~AW+A3LTJvk<1Dj&DkGK18k^Bq1STQ;vYnBcY zM0aF_TJkIz0VxT#%A^gurpN(!dt_!G_QT2_$puMf7F<)(W@7ty_}R~o;sPcuz%}JU zt#Zr%GfGfw1rID-v8$VCGo{A|-7D#1KV5Fg@hm);5-~Up{@SKT3SUnl$PWdH6?_U9WF7ea`-p2*ie#fH(PP6=@9p79ptexnvx z6?|}V1s?;FU}1gn-3~-hAy4UOx@x*!lHy&TK46&B>G<72iXDhK`ex0_IK4kN{`~#{ z-k4gumMSO3RZuD8Z;$Y_NZu5anLgb&KYarqWaz_{voo_xmc#8)64>zO?s}zu!5-1k z8R~oqe{5H+wgM;L=l~XpJd%t%(UP&M8P+RztLM2 z(nMtsYP97bO6=bW0sH+qb@DdSeL3s|*bY=c)CyF2Q*eFOJDhW_A9R1@gIIiwqUHQG z#=*{kf$y^%A#$dCyeCpP#RN__HWp=Ic2a}I4eCk0rcPv@3cCJvv%hZk{{T1pV?8@B z_3I8R;TBk?t44C9IE+h~SBmN)dr&xX0+bBu<3B3h^>MWHCdU!@G)mLsP+u}tA65Qj z)CD-m$MY=eev5x_VZ4tQewoVf=hqK-Wg@z4Tzy`!%5p5SZmE$Xz^C7X&Br>5>R#X> ztMF#!E=#KFvRly+M`4eHhpbCJlEXE72BOrcpP(?t?B(Q#rkv=JWCtKyKIKMS4=6FN z><{en3|P^Xb^^HJ-%Db#Ro1|&abFLVo^uF4@AXSD_8o=kpRA)BWMh>SSGeK(;Q6-{ zF!tW|+ez&cH|{Fh;}wL$schmBFMHVL1_B!|@colziTxjq&t}inQKAH&%F)hWA0`}= zyaTV6k+mLKqC{ALqN8%xaIhH|)tcx2a@}1_`q=8!7OQ2Fn?Qj)~}?E^^W`G2?5>rzkv z$Wj8-my$8>;-!w1e0A`V1*h{iqe#Qdr`JynRA1d&4a||i{e86P`5jR!B#Mt`rA6Ga zY&uU>N5CV-89zm6RgPb8=O=Z{*TP%~1q)<&9YyEw<6u1((Znl=mOh&zFR*&mMz|u? zA)BTWwD(7|IXkYqy?XRQ#Kf=-e%ovjQ$L*mAr!qTE(nq_Xr(%q}LT;YBU>$0}f09>? z)v@|*D@tEVLH=sZ6q#*GDVng8{Rs`PApRQ3;hElIQA}{#tR!E$ciZ{r*AKuDz;?qa zDm=abtm65^RRoQ|8A027idu|IR_-{0Bf^g?PJ9$b2WE5dr^(7tHl|QrE)evS5_p)u z4cGgOg)=MLnJ`OPeo|ylpHW{$>z7l%b{@z$@YpXfBqF>(5q6}=vXnL5QeVenfz=)g z@!4b9xa427;j03bm0<$Ww(D*E$WAO{eByiFXNQle{*gFjO}ns0AjCO^14iuXAXj45 z*d92j7t>w}{h`oRcfM%6QEG`o%y27-v`wBlxd$FV2o_TfCX%Z+07#c`ZhU80gjqsq zWW%;p%APLtPZj&Q{O)vBRvrP2J;GQ8_oh@yAi<0SCwcbo?R;6?887^!kR~B2j7SNpTGlkr}^ zt8?)xZspJ(FpwPDK~DVJ{HpXoHq9W#2rPN95Gme!m#CGG=!#;_XWiq(zwjha)g|P1 zPvlyXJlGKbitp=@4Ey6%cE0`R*AM6*l#k6@d8chd*SX=lpq!2_^%TxGdFv^>ua6_k zNx@U)Ugy8yXjT3nTn0Gi+5NN`s@g6csnxZ!ZY$N1M(A4W%W=N+x~|`{@Jot;F~2VH zopy+y~sS6(F^On>PuE`=SDxvby?Zufek7iVV(d9j^KlmP8sz7gQ9hDnu^fo-fkerL~z4@pGV&BwpN9=%<2 zodYKa;pe<2kb?&i24&T!6455U77eY52-cimYr;1$kr)hrj0%2U;*FQrEnf-v7ypEp zCmwiSR)MIR5oLanr6i^shjC+EuYY(+B4d^X_oN%VzPG4&)otXr8lWk7ip|d0!wsN2 zg&Ui&{{Y!{{p8Vn<6ayTw<)oWAxqRp;)_29o@iZ=i?FKN%u&+F3X3j6!d43u4+Qcb z+s7-odDx!{v*o*jOiwUsFUqf%A;%xZ&Y`biPVh`xH^3IhE`6Gv=vGdBnPWj;N1yH z3U*)nIAXGif}Q#6Y=52Y|1r+?=Pr*>S2+&G;$WU^KW`Ezu5(>!!NKoY zY*5DwW{Sd`AQRC13T>N*dGZDxo+4RA7or`NqP$UG!l1qHeB-$Vcye( z;G_FA9=luriv+*|0aQf-;X0BqgpOA^_rlkAR60uzRJi;N-E&EaDS97YD zR}+iGa>Lg}j@f{%5?=mzt^FtjBf-`shiKsQZ*sYR3=j8_epczux3f6PNA{7#Hn-;; z*FH9(0Wn$G`r>PVz8xDGKe3doW3heG(a*#$Y%lF<#ET2Ye)lV@0&eiN^3CeaTvD?K z{OU+9p2-Hffzz26c#FB)%plNzWwu;C!oX=#ghBWocU;D9;! zxsT*@vW4Xn$Bf=wDJ~n|TO1lxb%Ee(?^;v?@0b|bX4#dzkw(Q^l;RZ~ps*Mb@XhTo z`46c=V-TuhHL+T#A+FeVApX$`k^pGc? zFQjtuV3}+Rm~%;6XFnWg`03>Mph>k=Bn^6{RsFP3NZ;R!ZLN{=M~LV!>_}=7%2n?k zhf$N1JMYh5KY+cKdSPb?&VgJ*;U_lh<0k+Llx+*S%(?s7IbubZOMkdv>874hjs4x{1a2srwY%3XRZyV?QtFK({bvFIF!zpR%t zMWt^u1CW(#B7v4oWFSh(@QF(5Nyf0r3b1N5=oU34g0&Iynlh~jrD8G@|?t#{k% zX2p=c63%kc;!z|i-6rBEM1D7*uZ^M3G&BraO>Yc-r7d<_jh0#{- zR|)dyn6WBv+GA;^Uh~SM|22RttArdDWFo8}$JQ9tL95;yXI z`|EJO4);$v+@IQAo~Z;g=jCO^rn0gWaSiTI^7Ni=CkkqZB3UA5aXKvA3!& z3NP8_&X`4L*IufSB$;bMOb)bh2H4^}snskIZX(0RK6n55>jy{?@dU|}6zl+YzRxCL zG+bduJ&w@8iUN?pg1kZI?Ld^%3wm34r62&rSpUot$AKvNr&f)}7Ij56Lp_w3Fy>kE zghZ!Kz2SY-bPQlW#j9HKjwR*ih~I$9#FqN8*Rsgu;N?vFuy{14aH2!5YuH5oS}4!u z#83C_d^}KD#$*7ToUTCyu%3B@@>!eL0!KT8^;$A|S6V8AVtr%hTKOIeE0#tOh({>7 z8*J?jz&%#5TUZVZVWuxz-rek4?b`A>sp3oL!GmotT<*og>X5=~xuMFTx;{%iyMCE%zHNR)=l9>(0k-848fd(6R#vk4Z+ELa^eWF&y?lNu@NWD z1r2cZ4cPJa`t}nZ1R&72NHi>?$_o1DVO^*R8Nu|?u78a~-aCk1l1|EZt)XxKAT5~TliI0WTc4@V6NIJSb)&%xf-bW?+UJ{LQZE}}PjE#S{ zEKzT9a!M-5I7tRDAHwrv3G6LIgBI|D?eIC!7=*X$+!kT@{nTc{A(ZBctyl8}2Z3?; zTpvxOO)L4;^@-9*5}afzHd!Jr+FN5K`Jn1_wql}quGf-$q?cKs?dQlA zQaziTseVL*N1}eb@9ll2Oj?nr{AT;zuaO>GC6fb;HsCyHTm^WR_E>)^4j$Avf3EPH z<>g!hzi+8mdb^(@xg;Z*5M=9Rw*_XbT;B6P>9Lx1wkPINz|cue zz)Z%9)tnhtPA91gm8D`XgSRC@=3l4#b-I7f>HdH+hb?hW*kr*Iquhg3eUDGOqXpjNTsxVIIDbUM}!%zY<$r$e$zZNAGjFAY=mQV09Wm$bfNaU_go zWWK>)KcGl&r;?h)8PaT&F-g|DEDT_ybb+1WaQ5T*_$k@*Y4wRLMapZgu&!9z0>c7g zqVF3{OCVpJt8n)vEY)=mnZRZiHUac`=6=5_FmgKNtAEcgY_XE5(%2@?lFuDF97WD=Vk)xfH= zc<~mX-x17jS?k#~cj{|8+po7<_PxJps>8OdM_li%La5CtaCYFe##a;}c$Eg^Jw|ez z`)+kX!?h2zZnlRYtG3PH#89SX$dXmhwk|>(;xC-A7{2@+Bz`!RIi7sU{P9YjkyT^M zU&9|?S=DcRGQZibQvm4*(>{ltp6vX!#X~|yoS#rZpFhg`@P*m5i{-91mHj?PMO5;| zTO52=#epLrDH^*ZNhXWSQv%V6&DzuByuJ;O!7fhQTuCjv$p9a z!zR6Yp7rZ?zi#&ry4@cz*pY+dxja`jXBOt`j9TBtM|_>fR43(1N_D_LWXB&9N8#iu z!y!t^oO1Ilml4S}awRaQO>nF=p7SNX@AZEHj^x5u76^rj$Io9spvqOnuQcg?l8Vvk zErVSA(Y}h(rPG>@Hy{#7*lSg@!=!hg3gD88Z#hK+R`=p+V2lQrbL;+K?MgV+J1U8L zb8xw-RSs_8n*l4A4TV<)gYrDS#|3kRJ$Uq2(n*&6gDL$2;Z<3m#i})WlgyGUeQFEA zTqgpbq{PFuXL_66b-)C^fZh4l9)N9uPaz;o47(^Dw{_ z+4VtkyhuOWnH)!1OLul00DkPLo_9Im)m57XwXsMM-xFzrRoV32h&e&}kwILEtb1@i zZ^Ua8cba4%-u8U__7nU^ls;3=CN*(@RRYwl9(W+GJEk>RIs&ilB7}N_Sde$*VH;w( za!v-dV~jJA&x(b=c=!U@J~6c*Y61P*KSm6wOS0xe$bXH7b@EQ;XCx-X8j$z31)!d< ztJ7P`v?aGGl|$jRw0>(yfZB)ky?}20d@A|5TT&`c-BS{e_!PC+AK8qt+2B|QNV&_S zg25H%`Q!*__RW~X<;0ORpt*h259k(Pr&#&YCI^I9&cz=p) zQI7;VUymBF2uLCKd5T@RkS2?-hwLNQsVn;x4_L4wR|n^M^gLfS);d@tmUsq^TlPmc zfcxAi|KHeZYq3^?FnckW~2|NkpIi5RBTY-(}3h^h%0`>KV|vRr7(z1$r|aFzC669rC{9q zcIh5FzqLm>VLN9%B|m7AL}ZC8i>Bys!}YfW0#!Gf;i27xlpNYP=J1 zZD2B`+LRBdU!Pz3{!&GIfo-ARerYv%0F3jKT{)Sz#4OWeTUV5anD|!`UJkOd#BJCZ zO53a^?P9Q8;XEAwqKFJ=^3C)8yo?tZnd-}X({2*q8DOh0`DbE+Azjp z5*=fH0})Olkb6yg#`F0+xH#WO$~3zizSe@7-52K+qJ%e<4CLawgn=(x;m3}|z>#-X zD5;)2$#H6Fd=FW{rhV%jNK1^nWG9X>Hg#2JmJKsLVC+MJ2*l?oc$^B0Bp&z)2jzKw z_I^0!h?t?N$z+)+mrjUn4pht9>8n?w5r4v9O{;ckK_y%%o3n}tWG&dBMWw;}Ra@%T z4#_D!jFE32Sa+{)>#$q>N(H*slxg7C^?qINA9cMyqh=jIht)f#3niY85^7;!NwZcKNfegfzD;$`$)qH6eb_M5sH`~vVAW5AR zl4_}pSrK3cV7E$HHP!C5sm}+vo?vp!#bNHIq#4*)^!`l3fT7S{wo*RU4xhC|xzSs9 znKaieSiYXey4a?83T8d-)+8+gc_9~Uro*-32X$^^VfDTHg`s_ktrCx5srC#sXO$yB zv@asjRV?0VKvrT}(!yA$OvLlCXFiW3S5#C6DcC|6EPd1?l;k+Lp~%sq!{xJPP99ahwk$m-%Y=~=TUqcI4^}*; zk__Mii=^uPS~qbmCkonEDH@<|dLc6-@V@F*%S1^8JZT{bGKiWC9E38u+fEtVd?B ztSTUm3^?E4oc1Ar-9DA;ScFO&B`PcYsVd0jMoK}T<-p}Q=DXVq8dNua#L=W2sg0{F z(3s8#s4V>Je80~3&pO|qTtS@Ip-cP^e6j3K9|urn?|D%5j0{()x8y}b98n<~ULAnd zA4#>Q>MAy4joKxtR~a=VTq5W7&2i$Le85{d4R>%PWt3bm;18e{e*XFa0T%$EscRO6 z53)QKtGcJ2>mb^;Bpe5+&aMsc%6JFn0>(YE$b$k^jlJn0B{UkRaK2mJ8XW%$jBr1lotwU>3drJCk=mz zUxN*MA4xxnJ_$UTb0;F^A#ckJwsfCJL?O}Vg{z1V&3ZxS#|vR$8#GGzi>PwG8~X~%zkL4)&zfsqmZF<79o#G$9FW7ws&CiANG z6ES||AjddYR_cjRa;0+VU*(A(c!*XU6RiCFIJOJ^qN;DLiGxn4i!m<;Hb!*RaggbG zMN`&!i@hX7L#dsYxu0q3;+*5v+4S|sX`9LPzK@KD-05Mlq;-|A>z+rtRx-m}In;!2xtyod`(i$3D97s^CVTCFOP8;-%Gw#ax`qI;qUnbRFa?!PUSbKJQm=j{_ zMd8a3BnGU6f|Wj|y5nsqA%vqQ{wTSWtUns7^GEgVjU)k(vnB?whE-9*nBMD!z5*iQ z8%+fvO$T|-?N$k2&ZF5PK|v6KX#|I42*#wiX{g$Q>&&lAhWqj}#e_BdhTq@t`x}0L T!|y*De*gRjX1oxufGGk1?cM`* literal 0 HcmV?d00001 diff --git a/pkg/phantoms/phantoms.go b/pkg/phantoms/phantoms.go new file mode 100644 index 00000000..e6117091 --- /dev/null +++ b/pkg/phantoms/phantoms.go @@ -0,0 +1,292 @@ +package phantoms + +import ( + "crypto/rand" + "crypto/sha256" + "errors" + "fmt" + "math/big" + "net" + "sort" + + pb "github.com/refraction-networking/conjure/proto" + "golang.org/x/crypto/hkdf" +) + +type Choice struct { + Subnets []string + Weight int64 +} + +// getSubnets - return EITHER all subnet strings as one composite array if we are +// +// selecting unweighted, or return the array associated with the (seed) selected +// array of subnet strings based on the associated weights +func getSubnets(sc *pb.PhantomSubnetsList, seed []byte, weighted bool) []string { + + var out []string = []string{} + + if weighted { + + weightedSubnets := sc.GetWeightedSubnets() + if weightedSubnets == nil { + return []string{} + } + + choices := make([]Choice, 0, len(weightedSubnets)) + + totWeight := int64(0) + for _, cjSubnet := range weightedSubnets { + weight := cjSubnet.GetWeight() + subnets := cjSubnet.GetSubnets() + if subnets == nil { + continue + } + + totWeight += int64(weight) + choices = append(choices, Choice{Subnets: subnets, Weight: int64(weight)}) + } + + // Sort choices assending + sort.Slice(choices, func(i, j int) bool { + return choices[i].Weight < choices[j].Weight + }) + + // Naive method: get random int, subtract from weights until you are < 0 + hkdfReader := hkdf.New(sha256.New, seed, nil, []byte("phantom-select-subnet")) + totWeightBig := big.NewInt(totWeight) + rndBig, err := rand.Int(hkdfReader, totWeightBig) + if err != nil { + return nil + } + + // Decrement rnd by each weight until it's < 0 + rnd := rndBig.Int64() + for _, choice := range choices { + rnd -= choice.Weight + if rnd < 0 { + return choice.Subnets + } + } + + } else { + + weightedSubnets := sc.GetWeightedSubnets() + if weightedSubnets == nil { + return []string{} + } + + // Use unweighted config for subnets, concat all into one array and return. + for _, cjSubnet := range weightedSubnets { + out = append(out, cjSubnet.Subnets...) + } + } + + return out +} + +// SubnetFilter - Filter IP subnets based on whatever to prevent specific subnets from +// +// inclusion in choice. See v4Only and v6Only for reference. +type SubnetFilter func([]*net.IPNet) ([]*net.IPNet, error) + +// V4Only - a functor for transforming the subnet list to only include IPv4 subnets +func V4Only(obj []*net.IPNet) ([]*net.IPNet, error) { + var out []*net.IPNet = []*net.IPNet{} + + for _, _net := range obj { + if ipv4net := _net.IP.To4(); ipv4net != nil { + out = append(out, _net) + } + } + return out, nil +} + +// V6Only - a functor for transforming the subnet list to only include IPv6 subnets +func V6Only(obj []*net.IPNet) ([]*net.IPNet, error) { + var out []*net.IPNet = []*net.IPNet{} + + for _, _net := range obj { + if _net.IP == nil { + continue + } + if net := _net.IP.To4(); net != nil { + continue + } + out = append(out, _net) + } + return out, nil +} + +func parseSubnets(phantomSubnets []string) ([]*net.IPNet, error) { + var subnets []*net.IPNet = []*net.IPNet{} + + if len(phantomSubnets) == 0 { + return nil, fmt.Errorf("parseSubnets - no subnets provided") + } + + for _, strNet := range phantomSubnets { + _, parsedNet, err := net.ParseCIDR(strNet) + if err != nil { + return nil, err + } + if parsedNet == nil { + return nil, fmt.Errorf("failed to parse %v as subnet", parsedNet) + } + + subnets = append(subnets, parsedNet) + } + + return subnets, nil + // return nil, fmt.Errorf("parseSubnets not implemented yet") +} + +// SelectAddrFromSubnetOffset given a CIDR block and offset, return the net.IP +func SelectAddrFromSubnetOffset(net1 *net.IPNet, offset *big.Int) (net.IP, error) { + bits, addrLen := net1.Mask.Size() + + // Compute network size (e.g. an ipv4 /24 is 2^(32-24) + var netSize big.Int + netSize.Exp(big.NewInt(2), big.NewInt(int64(addrLen-bits)), nil) + + // Check that offset is within this subnet + if netSize.Cmp(offset) <= 0 { + return nil, errors.New("Offset too big for subnet") + } + + ipBigInt := &big.Int{} + if v4net := net1.IP.To4(); v4net != nil { + ipBigInt.SetBytes(net1.IP.To4()) + } else if v6net := net1.IP.To16(); v6net != nil { + ipBigInt.SetBytes(net1.IP.To16()) + } + + ipBigInt.Add(ipBigInt, offset) + + return net.IP(ipBigInt.Bytes()), nil +} + +// selectIPAddr selects an ip address from the list of subnets associated +// with the specified generation by constructing a set of start and end values +// for the high and low values in each allocation. The random number is then +// bound between the global min and max of that set. This ensures that +// addresses are chosen based on the number of addresses in the subnet. +func selectIPAddr(seed []byte, subnets []*net.IPNet) (*net.IP, error) { + type idNet struct { + min, max big.Int + net net.IPNet + } + var idNets []idNet + + // Compose a list of ID Nets with min, max and network associated and count + // the total number of available addresses. + addressTotal := big.NewInt(0) + for _, _net := range subnets { + netMaskOnes, _ := _net.Mask.Size() + if ipv4net := _net.IP.To4(); ipv4net != nil { + _idNet := idNet{} + _idNet.min.Set(addressTotal) + addressTotal.Add(addressTotal, big.NewInt(2).Exp(big.NewInt(2), big.NewInt(int64(32-netMaskOnes)), nil)) + _idNet.max.Sub(addressTotal, big.NewInt(1)) + _idNet.net = *_net + idNets = append(idNets, _idNet) + } else if ipv6net := _net.IP.To16(); ipv6net != nil { + _idNet := idNet{} + _idNet.min.Set(addressTotal) + addressTotal.Add(addressTotal, big.NewInt(2).Exp(big.NewInt(2), big.NewInt(int64(128-netMaskOnes)), nil)) + _idNet.max.Sub(addressTotal, big.NewInt(1)) + _idNet.net = *_net + idNets = append(idNets, _idNet) + } else { + return nil, fmt.Errorf("failed to parse %v", _net) + } + } + + // If the total number of addresses is 0 something has gone wrong + if addressTotal.Cmp(big.NewInt(0)) <= 0 { + return nil, fmt.Errorf("no valid addresses specified") + } + + // Pick a value using the seed in the range of between 0 and the total + // number of addresses. + hkdfReader := hkdf.New(sha256.New, seed, nil, []byte("phantom-addr-id")) + id, err := rand.Int(hkdfReader, addressTotal) + if err != nil { + return nil, err + } + + // Find the network (ID net) that contains our random value and select a + // random address from that subnet. + // min >= id%total >= max + var result net.IP + for _, _idNet := range idNets { + // fmt.Printf("tot:%s, seed%%tot:%s id cmp max: %d, id cmp min: %d %s\n", addressTotal.String(), id, _idNet.max.Cmp(id), _idNet.min.Cmp(id), _idNet.net.String()) + if _idNet.max.Cmp(id) >= 0 && _idNet.min.Cmp(id) <= 0 { + + var offset big.Int + offset.Sub(id, &_idNet.min) + result, err = SelectAddrFromSubnetOffset(&_idNet.net, &offset) + if err != nil { + return nil, fmt.Errorf("failed to chose IP address: %v", err) + } + } + } + + // We want to make it so this CANNOT happen + if result == nil { + return nil, errors.New("nil result should not be possible") + } + return &result, nil +} + +// SelectPhantom - select one phantom IP address based on shared secret +func SelectPhantom(seed []byte, subnetsList *pb.PhantomSubnetsList, transform SubnetFilter, weighted bool) (*net.IP, error) { + + s, err := parseSubnets(getSubnets(subnetsList, seed, weighted)) + if err != nil { + return nil, fmt.Errorf("failed to parse subnets: %v", err) + } + + if transform != nil { + s, err = transform(s) + if err != nil { + return nil, err + } + } + + return selectIPAddr(seed, s) +} + +// SelectPhantomUnweighted - select one phantom IP address based on shared secret +func SelectPhantomUnweighted(seed []byte, subnets *pb.PhantomSubnetsList, transform SubnetFilter) (*net.IP, error) { + return SelectPhantom(seed, subnets, transform, false) +} + +// SelectPhantomWeighted - select one phantom IP address based on shared secret +func SelectPhantomWeighted(seed []byte, subnets *pb.PhantomSubnetsList, transform SubnetFilter) (*net.IP, error) { + return SelectPhantom(seed, subnets, transform, true) +} + +// GetDefaultPhantomSubnets implements the +func GetDefaultPhantomSubnets() *pb.PhantomSubnetsList { + var w1 = uint32(9.0) + var w2 = uint32(1.0) + return &pb.PhantomSubnetsList{ + WeightedSubnets: []*pb.PhantomSubnets{ + { + Weight: &w1, + Subnets: []string{"192.122.190.0/24", "2001:48a8:687f:1::/64"}, + }, + { + Weight: &w2, + Subnets: []string{"141.219.0.0/16", "35.8.0.0/16"}, + }, + }, + } +} + +// Just returns the list of subnets provided by the protobuf. +// Convenience function to not have to export getSubnets() or parseSubnets() +func GetUnweightedSubnetList(subnetsList *pb.PhantomSubnetsList) ([]*net.IPNet, error) { + return parseSubnets(getSubnets(subnetsList, nil, false)) +} diff --git a/pkg/phantoms/phantoms_test.go b/pkg/phantoms/phantoms_test.go new file mode 100644 index 00000000..dcb6561e --- /dev/null +++ b/pkg/phantoms/phantoms_test.go @@ -0,0 +1,303 @@ +package phantoms + +import ( + "crypto/sha256" + "encoding/binary" + "encoding/hex" + "fmt" + "math/big" + "math/rand" + "net" + "testing" + + pb "github.com/refraction-networking/conjure/proto" + "github.com/stretchr/testify/require" + "golang.org/x/crypto/hkdf" +) + +func TestIPSelectionBasic(t *testing.T) { + //seed, err := hex.DecodeString("5a87133b68da3468988a21659a12ed2ece07345c8c1a5b08459ffdea4218d12f") + //require.Nil(t, err) + offset := big.NewInt(0x7eadbeefcafed00d) + + netStr := "2001:48a8:687f:1::/64" + _, net1, err := net.ParseCIDR(netStr) + require.Nil(t, err) + + addr, err := SelectAddrFromSubnetOffset(net1, offset) + require.Nil(t, err) + //require.Equal(t, "2001:48a8:687f:1:5fa4:c34c:434e:ddd", addr.String()) + require.Equal(t, "2001:48a8:687f:1:7ead:beef:cafe:d00d", addr.String()) +} + +func TestOffsetTooLarge(t *testing.T) { + + offset := big.NewInt(256) + netStr := "10.1.2.0/24" + _, net1, err := net.ParseCIDR(netStr) + require.Nil(t, err) + + // Offset too big + addr, err := SelectAddrFromSubnetOffset(net1, offset) + if err == nil { + t.Fatalf("Error: expected error, got address %v", addr) + } + + // Offset that is just fine + offset = big.NewInt(255) + addr, err = SelectAddrFromSubnetOffset(net1, offset) + require.Nil(t, err) + require.Equal(t, "10.1.2.255", addr.String()) +} + +func TestSelectWeightedMany(t *testing.T) { + + count := []int{0, 0} + loops := 1000 + rand.Seed(12345) + _, net1, err := net.ParseCIDR("192.122.190.0/24") + if err != nil { + t.Fatal(err) + } + _, net2, err := net.ParseCIDR("141.219.0.0/16") + if err != nil { + t.Fatal(err) + } + + var ps = &pb.PhantomSubnetsList{ + WeightedSubnets: []*pb.PhantomSubnets{ + {Weight: &w1, Subnets: []string{"192.122.190.0/24"}}, + {Weight: &w9, Subnets: []string{"141.219.0.0/16"}}, + }, + } + + for i := 1; i <= loops; i++ { + seed := make([]byte, 16) + _, err := rand.Read(seed) + if err != nil { + t.Fatalf("Failed to generate seed: %v", err) + } + + addr, err := SelectPhantom(seed, ps, nil, true) + if err != nil { + t.Fatalf("Failed to select adddress: %v -- %s, %v, %v, %v -- %v", err, hex.EncodeToString(seed), ps, "None", true, count) + } + + if net1.Contains(*addr) { + count[0]++ + } else if net2.Contains(*addr) { + count[1]++ + } else { + t.Fatalf("failed to parse pb.PhantomSubnetsList: %v, %v, %v", seed, true, ps) + } + } + t.Logf("%.2f%%, %.2f%%", float32(count[0])/float32(loops)*100.0, float32(count[1])/float32(loops)*100.0) +} + +func TestWeightedSelection(t *testing.T) { + + count := []int{0, 0} + loops := 1000 + rand.Seed(5421212341231) + w := uint32(1) + var ps = &pb.PhantomSubnetsList{ + WeightedSubnets: []*pb.PhantomSubnets{ + {Weight: &w, Subnets: []string{"1"}}, + {Weight: &w, Subnets: []string{"2"}}, + }, + } + + for i := 1; i <= loops; i++ { + seed := make([]byte, 16) + _, err := rand.Read(seed) + if err != nil { + t.Fatalf("Failed to generate seed: %v", err) + } + + sa := getSubnets(ps, seed, true) + if sa == nil { + t.Fatalf("failed to parse pb.PhantomSubnetsList: %v, %v, %v", seed, true, ps) + + } else if sa[0] == "1" { + count[0]++ + } else if sa[0] == "2" { + count[1]++ + } + + } + t.Logf("%.2f%%, %.2f%%", float32(count[0])/float32(loops)*100.0, float32(count[1])/float32(loops)*100.0) +} + +var w1 = uint32(1) +var w9 = uint32(9) +var phantomSubnets = &pb.PhantomSubnetsList{ + WeightedSubnets: []*pb.PhantomSubnets{ + {Weight: &w9, Subnets: []string{"192.122.190.0/24", "10.0.0.0/31", "2001:48a8:687f:1::/64"}}, + {Weight: &w1, Subnets: []string{"141.219.0.0/16", "35.8.0.0/16"}}, + }, +} + +func TestSelectFilter(t *testing.T) { + seed, err := hex.DecodeString("5a87133b68ea3468988a21659a12ed2ece07345c8c1a5b08459ffdea4218d12f") + require.Nil(t, err) + + p, err := SelectPhantomWeighted([]byte(seed), phantomSubnets, V4Only) + require.Nil(t, err) + //require.Equal(t, "192.122.190.130", p.String()) + require.Equal(t, "192.122.190.164", p.String()) + + p, err = SelectPhantomWeighted([]byte(seed), phantomSubnets, V6Only) + require.Nil(t, err) + //require.Equal(t, "2001:48a8:687f:1:5fa4:c34c:434e:ddd", p.String()) + require.Equal(t, "2001:48a8:687f:1:5da6:63e0:48a4:b3e", p.String()) + + p, err = SelectPhantomWeighted([]byte(seed), phantomSubnets, nil) + require.Nil(t, err) + //require.Equal(t, "2001:48a8:687f:1:5fa4:c34c:434e:ddd", p.String()) + require.Equal(t, "2001:48a8:687f:1:d8f4:45cd:3ae:fcd4", p.String()) +} + +func TestPhantomsV6OnlyFilter(t *testing.T) { + testNets := []string{"192.122.190.0/24", "2001:48a8:687f:1::/64", "2001:48a8:687f:1::/64"} + testNetsParsed, err := parseSubnets(testNets) + require.Nil(t, err) + require.Equal(t, 3, len(testNetsParsed)) + + testNetsParsed, err = V6Only(testNetsParsed) + require.Nil(t, err) + require.Equal(t, 2, len(testNetsParsed)) +} + +// TestPhantomsSeededSelectionV4Min ensures that minimal subnets work because +// they re useful to test limitations (i.e. multiple clients sharing a phantom +// address) +func TestPhantomsSeededSelectionV4Min(t *testing.T) { + subnets, err := parseSubnets([]string{"192.122.190.0/32", "2001:48a8:687f:1::/128"}) + require.Nil(t, err) + + seed, err := hex.DecodeString("5a87133b68ea3468988a21659a12ed2ece07345c8c1a5b08459ffdea4218d12f") + require.Nil(t, err) + + phantomAddr, err := selectIPAddr(seed, subnets) + require.Nil(t, err) + + possibleAddrs := []string{"192.122.190.0", "2001:48a8:687f:1::"} + require.Contains(t, possibleAddrs, phantomAddr.String()) +} + +// TestPhantomSeededSelectionFuzz ensures that all phantom subnet sizes are +// viable including small (/31, /32, etc.) subnets which were previously +// experiencing a divide by 0. +func TestPhantomSeededSelectionFuzz(t *testing.T) { + _, defaultV6, err := net.ParseCIDR("2001:48a8:687f:1::/64") + require.Nil(t, err) + + var randSeed int64 = 1234 + r := rand.New(rand.NewSource(randSeed)) + + // Add generation with only one v4 subnet that has a varying mask len + for i := 0; i <= 32; i++ { + s := "255.255.255.255/" + fmt.Sprint(i) + _, variableSubnet, err := net.ParseCIDR(s) + require.Nil(t, err) + + subnets := []*net.IPNet{defaultV6, variableSubnet} + + var seed = make([]byte, 32) + for j := 0; j < 10000; j++ { + n, err := r.Read(seed) + require.Nil(t, err) + require.Equal(t, n, 32) + + // phantomAddr, err := phantomSelector.Select(seed, newGen, false) + phantomAddr, err := selectIPAddr(seed, subnets) + require.Nil(t, err, "i=%d, j=%d, seed='%s'", i, j, hex.EncodeToString(seed)) + require.NotNil(t, phantomAddr) + } + } +} + +func ExpandSeed(seed, salt []byte, i int) []byte { + bi := make([]byte, 8) + binary.LittleEndian.PutUint64(bi, uint64(i)) + return hkdf.Extract(sha256.New, seed, append(salt, bi...)) +} + +// This test serves two functions. First, it checks if there's any duplicates +// when there should not be (generating 100k 64-bit numbers, we don't expect any duplicates) +// Second, we check if the weighting is approximately correct (within +/-0.5%) +func TestForDuplicates(t *testing.T) { + + // Constraints: + // -Only one subnet per weight + // -Must be large enough subnets (e.g. /64) to avoid birthday bound problems (100k no collision) + // -Subnets cannot overlap + var w40 = uint32(40) + var ps = &pb.PhantomSubnetsList{ + WeightedSubnets: []*pb.PhantomSubnets{ + {Weight: &w1, Subnets: []string{"2001:48a8:687f:1::/64"}}, + {Weight: &w9, Subnets: []string{"2002::/64"}}, + {Weight: &w40, Subnets: []string{"2003::/64"}}, + }, + } + + seed, _ := hex.DecodeString("5a87133b68ea3468988a21659a12ed2ece07345c8c1a5b08459ffdea4218d12f") + salt := []byte("phantom-duplicate-test") + + // Set of IPs we have seen + ipSet := map[string]int{} + + // Count of IPs in each set + netMap := map[string]int{} + weights := map[string]int{} + + totWeights := 0 + snets, err := parseSubnets(getSubnets(ps, nil, false)) + require.Nil(t, err) + for _, phantomSubnet := range ps.WeightedSubnets { + snet := phantomSubnet.Subnets[0] + weights[snet] = int(*phantomSubnet.Weight) + netMap[snet] = 0 + totWeights += int(*phantomSubnet.Weight) + } + + totTrials := 100000 + // The odds of this test generating a duplicate by chance is around 10^-10 + // (based on approximation of birthday bound n^2 / 2*m) + for i := 0; i < totTrials; i++ { + + // Get new random seed + curSeed := ExpandSeed(seed, salt, i) + + // Get phantom address + addr, err := SelectPhantom(curSeed, ps, nil, true) + if err != nil { + t.Fatalf("Failed to select adddress: %v -- %s, %v, %v, %v -- %v", err, hex.EncodeToString(curSeed), ps, "None", true, i) + } + //fmt.Printf("%s %v\n", hex.EncodeToString(curSeed), addr) + + if prev_i, ok := ipSet[addr.String()]; ok { + prevSeed := ExpandSeed(seed, salt, prev_i) + t.Fatalf("Generated duplicate IP; biased random. Both seeds %d and %d generated %v\n%d: %s\n%d: %s", + i, prev_i, addr, i, hex.EncodeToString(curSeed), prev_i, hex.EncodeToString(prevSeed)) + } + ipSet[addr.String()] = i + + for _, snet := range snets { + if snet.Contains(*addr) { + netMap[snet.String()] += 1 + } + } + } + + // Check if weights are approximately right + margin := totTrials / 200 // +/- 0.5% + for snet, count := range netMap { + expectedCount := totTrials * weights[snet] / totWeights + if count < (expectedCount-margin) || count > (expectedCount+margin) { + t.Fatalf("Generated weight outside bound: %s had %d but expected %d, off by more than %d\n", + snet, count, expectedCount, margin) + } + //fmt.Printf("%s: had %d, weight %d/%d (expected %d +/-%d)\n", snet, count, weights[snet], totWeights, expectedCount, margin) + } +} diff --git a/pkg/registrars/dns-registrar/README.md b/pkg/registrars/dns-registrar/README.md new file mode 100644 index 00000000..512fe6c4 --- /dev/null +++ b/pkg/registrars/dns-registrar/README.md @@ -0,0 +1,3 @@ +# DNS registrar + +Information for DNS registration are avaliable at the [Github wiki page](https://github.com/refraction-networking/conjure/wiki/DNS-registration). \ No newline at end of file diff --git a/pkg/registrars/dns-registrar/dns/dns.go b/pkg/registrars/dns-registrar/dns/dns.go new file mode 100644 index 00000000..6c5bfd3a --- /dev/null +++ b/pkg/registrars/dns-registrar/dns/dns.go @@ -0,0 +1,575 @@ +// Package dns deals with encoding and decoding DNS wire format. +package dns + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "strings" +) + +// The maximum number of DNS name compression pointers we are willing to follow. +// Without something like this, infinite loops are possible. +const compressionPointerLimit = 10 + +var ( + // ErrZeroLengthLabel is the error returned for names that contain a + // zero-length label, like "example..com". + ErrZeroLengthLabel = errors.New("name contains a zero-length label") + + // ErrLabelTooLong is the error returned for labels that are longer than + // 63 octets. + ErrLabelTooLong = errors.New("name contains a label longer than 63 octets") + + // ErrNameTooLong is the error returned for names whose encoded + // representation is longer than 255 octets. + ErrNameTooLong = errors.New("name is longer than 255 octets (try using a shorter base domain?)") + + // ErrReservedLabelType is the error returned when reading a label type + // prefix whose two most significant bits are not 00 or 11. + ErrReservedLabelType = errors.New("reserved label type") + + // ErrTooManyPointers is the error returned when reading a compressed + // name that has too many compression pointers. + ErrTooManyPointers = errors.New("too many compression pointers") + + // ErrTrailingBytes is the error returned when bytes remain in the parse + // buffer after parsing a message. + ErrTrailingBytes = errors.New("trailing bytes after message") + + // ErrIntegerOverflow is the error returned when trying to encode an + // integer greater than 65535 into a 16-bit field. + ErrIntegerOverflow = errors.New("integer overflow") +) + +const ( + // https://tools.ietf.org/html/rfc1035#section-3.2.2 + RRTypeTXT = 16 + // https://tools.ietf.org/html/rfc6891#section-6.1.1 + RRTypeOPT = 41 + + // https://tools.ietf.org/html/rfc1035#section-3.2.4 + ClassIN = 1 + + // https://tools.ietf.org/html/rfc1035#section-4.1.1 + RcodeNoError = 0 // a.k.a. NOERROR + RcodeFormatError = 1 // a.k.a. FORMERR + RcodeNameError = 3 // a.k.a. NXDOMAIN + RcodeNotImplemented = 4 // a.k.a. NOTIMPL + // https://tools.ietf.org/html/rfc6891#section-9 + ExtendedRcodeBadVers = 16 // a.k.a. BADVERS +) + +// Name represents a domain name, a sequence of labels each of which is 63 +// octets or less in length. +// +// https://tools.ietf.org/html/rfc1035#section-3.1 +type Name [][]byte + +// NewName returns a Name from a slice of labels, after checking the labels for +// validity. Does not include a zero-length label at the end of the slice. +func NewName(labels [][]byte) (Name, error) { + name := Name(labels) + // https://tools.ietf.org/html/rfc1035#section-2.3.4 + // Various objects and parameters in the DNS have size limits. + // labels 63 octets or less + // names 255 octets or less + for _, label := range labels { + if len(label) == 0 { + return nil, ErrZeroLengthLabel + } + if len(label) > 63 { + return nil, ErrLabelTooLong + } + } + // Check the total length. + builder := newMessageBuilder() + builder.WriteName(name) + if len(builder.Bytes()) > 255 { + return nil, fmt.Errorf("%w, current length: %v", ErrNameTooLong, len(builder.Bytes())) + } + return name, nil +} + +// ParseName returns a new Name from a string of labels separated by dots, after +// checking the name for validity. A single dot at the end of the string is +// ignored. +func ParseName(s string) (Name, error) { + b := bytes.TrimSuffix([]byte(s), []byte(".")) + if len(b) == 0 { + // bytes.Split(b, ".") would return [""] in this case + return NewName([][]byte{}) + } else { + return NewName(bytes.Split(b, []byte("."))) + } +} + +// String returns a reversible string representation of name. Labels are +// separated by dots, and any bytes in a label that are outside the set +// [0-9A-Za-z-] are replaced with a \xXX hex escape sequence. +func (name Name) String() string { + if len(name) == 0 { + return "." + } + + var buf strings.Builder + for i, label := range name { + if i > 0 { + buf.WriteByte('.') + } + for _, b := range label { + if b == '-' || + ('0' <= b && b <= '9') || + ('A' <= b && b <= 'Z') || + ('a' <= b && b <= 'z') { + buf.WriteByte(b) + } else { + fmt.Fprintf(&buf, "\\x%02x", b) + } + } + } + return buf.String() +} + +// TrimSuffix returns a Name with the given suffix removed, if it was present. +// The second return value indicates whether the suffix was present. If the +// suffix was not present, the first return value is nil. +func (name Name) TrimSuffix(suffix Name) (Name, bool) { + if len(name) < len(suffix) { + return nil, false + } + split := len(name) - len(suffix) + fore, aft := name[:split], name[split:] + for i := 0; i < len(aft); i++ { + if !bytes.Equal(bytes.ToLower(aft[i]), bytes.ToLower(suffix[i])) { + return nil, false + } + } + return fore, true +} + +// Message represents a DNS message. +// +// https://tools.ietf.org/html/rfc1035#section-4.1 +type Message struct { + ID uint16 + Flags uint16 + + Question []Question + Answer []RR + Authority []RR + Additional []RR +} + +// Opcode extracts the OPCODE part of the Flags field. +// +// https://tools.ietf.org/html/rfc1035#section-4.1.1 +func (message *Message) Opcode() uint16 { + return (message.Flags >> 11) & 0xf +} + +// Rcode extracts the RCODE part of the Flags field. +// +// https://tools.ietf.org/html/rfc1035#section-4.1.1 +func (message *Message) Rcode() uint16 { + return message.Flags & 0x000f +} + +// Question represents an entry in the question section of a message. +// +// https://tools.ietf.org/html/rfc1035#section-4.1.2 +type Question struct { + Name Name + Type uint16 + Class uint16 +} + +// RR represents a resource record. +// +// https://tools.ietf.org/html/rfc1035#section-4.1.3 +type RR struct { + Name Name + Type uint16 + Class uint16 + TTL uint32 + Data []byte +} + +// readName parses a DNS name from r. It leaves r positioned just after the +// parsed name. +func readName(r io.ReadSeeker) (Name, error) { + var labels [][]byte + // We limit the number of compression pointers we are willing to follow. + numPointers := 0 + // If we followed any compression pointers, we must finally seek to just + // past the first pointer. + var seekTo int64 +loop: + for { + var labelType byte + err := binary.Read(r, binary.BigEndian, &labelType) + if err != nil { + return nil, err + } + + switch labelType & 0xc0 { + case 0x00: + // This is an ordinary label. + // https://tools.ietf.org/html/rfc1035#section-3.1 + length := int(labelType & 0x3f) + if length == 0 { + break loop + } + label := make([]byte, length) + _, err := io.ReadFull(r, label) + if err != nil { + return nil, err + } + labels = append(labels, label) + case 0xc0: + // This is a compression pointer. + // https://tools.ietf.org/html/rfc1035#section-4.1.4 + upper := labelType & 0x3f + var lower byte + err := binary.Read(r, binary.BigEndian, &lower) + if err != nil { + return nil, err + } + offset := (uint16(upper) << 8) | uint16(lower) + + if numPointers == 0 { + // The first time we encounter a pointer, + // remember our position so we can seek back to + // it when done. + seekTo, err = r.Seek(0, io.SeekCurrent) + if err != nil { + return nil, err + } + } + numPointers++ + if numPointers > compressionPointerLimit { + return nil, ErrTooManyPointers + } + + // Follow the pointer and continue. + _, err = r.Seek(int64(offset), io.SeekStart) + if err != nil { + return nil, err + } + default: + // "The 10 and 01 combinations are reserved for future + // use." + return nil, ErrReservedLabelType + } + } + // If we followed any pointers, then seek back to just after the first + // one. + if numPointers > 0 { + _, err := r.Seek(seekTo, io.SeekStart) + if err != nil { + return nil, err + } + } + return NewName(labels) +} + +// readQuestion parses one entry from the Question section. It leaves r +// positioned just after the parsed entry. +// +// https://tools.ietf.org/html/rfc1035#section-4.1.2 +func readQuestion(r io.ReadSeeker) (Question, error) { + var question Question + var err error + question.Name, err = readName(r) + if err != nil { + return question, err + } + for _, ptr := range []*uint16{&question.Type, &question.Class} { + err := binary.Read(r, binary.BigEndian, ptr) + if err != nil { + return question, err + } + } + + return question, nil +} + +// readRR parses one resource record. It leaves r positioned just after the +// parsed resource record. +// +// https://tools.ietf.org/html/rfc1035#section-4.1.3 +func readRR(r io.ReadSeeker) (RR, error) { + var rr RR + var err error + rr.Name, err = readName(r) + if err != nil { + return rr, err + } + for _, ptr := range []*uint16{&rr.Type, &rr.Class} { + err := binary.Read(r, binary.BigEndian, ptr) + if err != nil { + return rr, err + } + } + err = binary.Read(r, binary.BigEndian, &rr.TTL) + if err != nil { + return rr, err + } + var rdLength uint16 + err = binary.Read(r, binary.BigEndian, &rdLength) + if err != nil { + return rr, err + } + rr.Data = make([]byte, rdLength) + _, err = io.ReadFull(r, rr.Data) + if err != nil { + return rr, err + } + + return rr, nil +} + +// readMessage parses a complete DNS message. It leaves r positioned just after +// the parsed message. +func readMessage(r io.ReadSeeker) (Message, error) { + var message Message + + // Header section + // https://tools.ietf.org/html/rfc1035#section-4.1.1 + var qdCount, anCount, nsCount, arCount uint16 + for _, ptr := range []*uint16{ + &message.ID, &message.Flags, + &qdCount, &anCount, &nsCount, &arCount, + } { + err := binary.Read(r, binary.BigEndian, ptr) + if err != nil { + return message, err + } + } + + // Question section + // https://tools.ietf.org/html/rfc1035#section-4.1.2 + for i := 0; i < int(qdCount); i++ { + question, err := readQuestion(r) + if err != nil { + return message, err + } + message.Question = append(message.Question, question) + } + + // Answer, Authority, and Additional sections + // https://tools.ietf.org/html/rfc1035#section-4.1.3 + for _, rec := range []struct { + ptr *[]RR + count uint16 + }{ + {&message.Answer, anCount}, + {&message.Authority, nsCount}, + {&message.Additional, arCount}, + } { + for i := 0; i < int(rec.count); i++ { + rr, err := readRR(r) + if err != nil { + return message, err + } + *rec.ptr = append(*rec.ptr, rr) + } + } + + return message, nil +} + +// MessageFromWireFormat parses a message from buf and returns a Message object. +// It returns ErrTrailingBytes if there are bytes remaining in buf after parsing +// is done. +func MessageFromWireFormat(buf []byte) (Message, error) { + r := bytes.NewReader(buf) + message, err := readMessage(r) + if err == io.EOF { + err = io.ErrUnexpectedEOF + } else if err == nil { + // Check for trailing bytes. + _, err = r.ReadByte() + if err == io.EOF { + err = nil + } else if err == nil { + err = ErrTrailingBytes + } + } + return message, err +} + +// messageBuilder manages the state of serializing a DNS message. Its main +// function is to keep track of names already written for the purpose of name +// compression. +type messageBuilder struct { + w bytes.Buffer + nameCache map[string]int +} + +// newMessageBuilder creates a new messageBuilder with an empty name cache. +func newMessageBuilder() *messageBuilder { + return &messageBuilder{ + nameCache: make(map[string]int), + } +} + +// Bytes returns the serialized DNS message as a slice of bytes. +func (builder *messageBuilder) Bytes() []byte { + return builder.w.Bytes() +} + +// WriteName appends name to the in-progress messageBuilder, employing +// compression pointers to previously written names if possible. +func (builder *messageBuilder) WriteName(name Name) { + // https://tools.ietf.org/html/rfc1035#section-3.1 + for i := range name { + // Has this suffix already been encoded in the message? + if ptr, ok := builder.nameCache[name[i:].String()]; ok && ptr&0x3fff == ptr { + // If so, we can write a compression pointer. + binary.Write(&builder.w, binary.BigEndian, uint16(0xc000|ptr)) + return + } + // Not cached; we must encode this label verbatim. Store a cache + // entry pointing to the beginning of it. + builder.nameCache[name[i:].String()] = builder.w.Len() + length := len(name[i]) + if length == 0 || length > 63 { + panic(length) + } + builder.w.WriteByte(byte(length)) + builder.w.Write(name[i]) + } + builder.w.WriteByte(0) +} + +// WriteQuestion appends a Question section entry to the in-progress +// messageBuilder. +func (builder *messageBuilder) WriteQuestion(question *Question) { + // https://tools.ietf.org/html/rfc1035#section-4.1.2 + builder.WriteName(question.Name) + binary.Write(&builder.w, binary.BigEndian, question.Type) + binary.Write(&builder.w, binary.BigEndian, question.Class) +} + +// WriteRR appends a resource record to the in-progress messageBuilder. It +// returns ErrIntegerOverflow if the length of rr.Data does not fit in 16 bits. +func (builder *messageBuilder) WriteRR(rr *RR) error { + // https://tools.ietf.org/html/rfc1035#section-4.1.3 + builder.WriteName(rr.Name) + binary.Write(&builder.w, binary.BigEndian, rr.Type) + binary.Write(&builder.w, binary.BigEndian, rr.Class) + binary.Write(&builder.w, binary.BigEndian, rr.TTL) + rdLength := uint16(len(rr.Data)) + if int(rdLength) != len(rr.Data) { + return ErrIntegerOverflow + } + binary.Write(&builder.w, binary.BigEndian, rdLength) + builder.w.Write(rr.Data) + return nil +} + +// WriteMessage appends a complete DNS message to the in-progress +// messageBuilder. It returns ErrIntegerOverflow if the number of entries in any +// section, or the length of the data in any resource record, does not fit in 16 +// bits. +func (builder *messageBuilder) WriteMessage(message *Message) error { + // Header section + // https://tools.ietf.org/html/rfc1035#section-4.1.1 + binary.Write(&builder.w, binary.BigEndian, message.ID) + binary.Write(&builder.w, binary.BigEndian, message.Flags) + for _, count := range []int{ + len(message.Question), + len(message.Answer), + len(message.Authority), + len(message.Additional), + } { + count16 := uint16(count) + if int(count16) != count { + return ErrIntegerOverflow + } + binary.Write(&builder.w, binary.BigEndian, count16) + } + + // Question section + // https://tools.ietf.org/html/rfc1035#section-4.1.2 + for _, question := range message.Question { + builder.WriteQuestion(&question) + } + + // Answer, Authority, and Additional sections + // https://tools.ietf.org/html/rfc1035#section-4.1.3 + for _, rrs := range [][]RR{message.Answer, message.Authority, message.Additional} { + for _, rr := range rrs { + err := builder.WriteRR(&rr) + if err != nil { + return err + } + } + } + + return nil +} + +// WireFormat encodes a Message as a slice of bytes in DNS wire format. It +// returns ErrIntegerOverflow if the number of entries in any section, or the +// length of the data in any resource record, does not fit in 16 bits. +func (message *Message) WireFormat() ([]byte, error) { + builder := newMessageBuilder() + err := builder.WriteMessage(message) + if err != nil { + return nil, err + } + return builder.Bytes(), nil +} + +// DecodeRDataTXT decodes TXT-DATA (as found in the RDATA for a resource record +// with TYPE=TXT) as a raw byte slice, by concatenating all the +// s it contains. +// +// https://tools.ietf.org/html/rfc1035#section-3.3.14 +func DecodeRDataTXT(p []byte) ([]byte, error) { + var buf bytes.Buffer + for { + if len(p) == 0 { + return nil, io.ErrUnexpectedEOF + } + n := int(p[0]) + p = p[1:] + if len(p) < n { + return nil, io.ErrUnexpectedEOF + } + buf.Write(p[:n]) + p = p[n:] + if len(p) == 0 { + break + } + } + return buf.Bytes(), nil +} + +// EncodeRDataTXT encodes a slice of bytes as TXT-DATA, as appropriate for the +// RDATA of a resource record with TYPE=TXT. No length restriction is enforced +// here; that must be checked at a higher level. +// +// https://tools.ietf.org/html/rfc1035#section-3.3.14 +func EncodeRDataTXT(p []byte) []byte { + // https://tools.ietf.org/html/rfc1035#section-3.3 + // https://tools.ietf.org/html/rfc1035#section-3.3.14 + // TXT data is a sequence of one or more s, where + // is a length octet followed by that number of + // octets. + var buf bytes.Buffer + for len(p) > 255 { + buf.WriteByte(255) + buf.Write(p[:255]) + p = p[255:] + } + // Must write here, even if len(p) == 0, because it's "*one or more* + // s". + buf.WriteByte(byte(len(p))) + buf.Write(p) + return buf.Bytes() +} diff --git a/pkg/registrars/dns-registrar/dns/dns_test.go b/pkg/registrars/dns-registrar/dns/dns_test.go new file mode 100644 index 00000000..3e628470 --- /dev/null +++ b/pkg/registrars/dns-registrar/dns/dns_test.go @@ -0,0 +1,597 @@ +package dns + +import ( + "bytes" + "errors" + "fmt" + "io" + "strconv" + "strings" + "testing" +) + +func namesEqual(a, b Name) bool { + if len(a) != len(b) { + return false + } + for i := 0; i < len(a); i++ { + if !bytes.Equal(a[i], b[i]) { + return false + } + } + return true +} + +func TestName(t *testing.T) { + for _, test := range []struct { + labels [][]byte + err error + s string + }{ + {[][]byte{}, nil, "."}, + {[][]byte{[]byte("test")}, nil, "test"}, + {[][]byte{[]byte("a"), []byte("b"), []byte("c")}, nil, "a.b.c"}, + + {[][]byte{{}}, ErrZeroLengthLabel, ""}, + {[][]byte{[]byte("a"), {}, []byte("c")}, ErrZeroLengthLabel, ""}, + + // 63 octets. + {[][]byte{[]byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE")}, nil, + "0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE"}, + // 64 octets. + {[][]byte{[]byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDEF")}, ErrLabelTooLong, ""}, + + // 64+64+64+62 octets. + {[][]byte{ + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE"), + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE"), + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE"), + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABC"), + }, nil, + "0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE.0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE.0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE.0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABC"}, + // 64+64+64+63 octets. + {[][]byte{ + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE"), + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE"), + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDE"), + []byte("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCD"), + }, ErrNameTooLong, ""}, + // 127 one-octet labels. + {[][]byte{ + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, + }, nil, + "0.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F.0.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F.0.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F.0.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.0.1.2.3.4.5.6.7.8.9.A.B.C.D.E"}, + // 128 one-octet labels. + {[][]byte{ + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'a'}, {'b'}, {'c'}, {'d'}, {'e'}, {'f'}, + {'0'}, {'1'}, {'2'}, {'3'}, {'4'}, {'5'}, {'6'}, {'7'}, {'8'}, {'9'}, {'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, + }, ErrNameTooLong, ""}, + } { + // Test that NewName returns proper error codes, and otherwise + // returns an equal slice of labels. + name, err := NewName(test.labels) + if err == nil && !namesEqual(name, test.labels) { + t.Errorf("%+q returned (%+q, %v), expected (%+q, %v)", + test.labels, name, err, test.labels, test.err) + continue + } else if !errors.Is(err, test.err) { + t.Errorf("%+q returned (%v), expected (%v)", + test.labels, err, test.err) + continue + } + if test.err != nil { + continue + } + + // Test that the string version of the name comes out as + // expected. + s := name.String() + if s != test.s { + t.Errorf("%+q became string %+q, expected %+q", test.labels, s, test.s) + continue + } + + // Test that parsing from a string back to a Name results in the + // original slice of labels. + name, err = ParseName(s) + if err != nil || !namesEqual(name, test.labels) { + t.Errorf("%+q parsing %+q returned (%+q, %v), expected (%+q, %v)", + test.labels, s, name, err, test.labels, nil) + continue + } + // A trailing dot should be ignored. + if !strings.HasSuffix(s, ".") { + dotName, dotErr := ParseName(s + ".") + if dotErr != err || !namesEqual(dotName, name) { + t.Errorf("%+q parsing %+q returned (%+q, %v), expected (%+q, %v)", + test.labels, s+".", dotName, dotErr, name, err) + continue + } + } + } +} + +func TestParseName(t *testing.T) { + for _, test := range []struct { + s string + name Name + err error + }{ + // This case can't be tested by TestName above because String + // will never produce "" (it produces "." instead). + {"", [][]byte{}, nil}, + } { + name, err := ParseName(test.s) + if err != test.err || (err == nil && !namesEqual(name, test.name)) { + t.Errorf("%+q returned (%+q, %v), expected (%+q, %v)", + test.s, name, err, test.name, test.err) + continue + } + } +} + +func unescapeString(s string) ([][]byte, error) { + if s == "." { + return [][]byte{}, nil + } + + var result [][]byte + for _, label := range strings.Split(s, ".") { + var buf bytes.Buffer + i := 0 + for i < len(label) { + switch label[i] { + case '\\': + if i+3 >= len(label) { + return nil, fmt.Errorf("truncated escape sequence at index %v", i) + } + if label[i+1] != 'x' { + return nil, fmt.Errorf("malformed escape sequence at index %v", i) + } + b, err := strconv.ParseUint(string(label[i+2:i+4]), 16, 8) + if err != nil { + return nil, fmt.Errorf("malformed hex sequence at index %v", i+2) + } + buf.WriteByte(byte(b)) + i += 4 + default: + buf.WriteByte(label[i]) + i++ + } + } + result = append(result, buf.Bytes()) + } + return result, nil +} + +func TestNameString(t *testing.T) { + for _, test := range []struct { + name Name + s string + }{ + {[][]byte{}, "."}, + {[][]byte{[]byte("\x00"), []byte("a.b"), []byte("c\nd\\")}, "\\x00.a\\x2eb.c\\x0ad\\x5c"}, + {[][]byte{ + []byte("\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>"), + []byte("?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}"), + []byte("~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc"), + []byte("\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb"), + []byte("\xfc\xfd\xfe\xff"), + }, "\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\\x20\\x21\\x22\\x23\\x24\\x25\\x26\\x27\\x28\\x29\\x2a\\x2b\\x2c-\\x2e\\x2f0123456789\\x3a\\x3b\\x3c\\x3d\\x3e.\\x3f\\x40ABCDEFGHIJKLMNOPQRSTUVWXYZ\\x5b\\x5c\\x5d\\x5e\\x5f\\x60abcdefghijklmnopqrstuvwxyz\\x7b\\x7c\\x7d.\\x7e\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\\xa0\\xa1\\xa2\\xa3\\xa4\\xa5\\xa6\\xa7\\xa8\\xa9\\xaa\\xab\\xac\\xad\\xae\\xaf\\xb0\\xb1\\xb2\\xb3\\xb4\\xb5\\xb6\\xb7\\xb8\\xb9\\xba\\xbb\\xbc.\\xbd\\xbe\\xbf\\xc0\\xc1\\xc2\\xc3\\xc4\\xc5\\xc6\\xc7\\xc8\\xc9\\xca\\xcb\\xcc\\xcd\\xce\\xcf\\xd0\\xd1\\xd2\\xd3\\xd4\\xd5\\xd6\\xd7\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde\\xdf\\xe0\\xe1\\xe2\\xe3\\xe4\\xe5\\xe6\\xe7\\xe8\\xe9\\xea\\xeb\\xec\\xed\\xee\\xef\\xf0\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf7\\xf8\\xf9\\xfa\\xfb.\\xfc\\xfd\\xfe\\xff"}, + } { + s := test.name.String() + if s != test.s { + t.Errorf("%+q escaped to %+q, expected %+q", test.name, s, test.s) + continue + } + unescaped, err := unescapeString(s) + if err != nil { + t.Errorf("%+q unescaping %+q resulted in error %v", test.name, s, err) + continue + } + if !namesEqual(Name(unescaped), test.name) { + t.Errorf("%+q roundtripped through %+q to %+q", test.name, s, unescaped) + continue + } + } +} + +func TestNameTrimSuffix(t *testing.T) { + for _, test := range []struct { + name, suffix string + trimmed string + ok bool + }{ + {"", "", ".", true}, + {".", ".", ".", true}, + {"abc", "", "abc", true}, + {"abc", ".", "abc", true}, + {"", "abc", ".", false}, + {".", "abc", ".", false}, + {"example.com", "com", "example", true}, + {"example.com", "net", ".", false}, + {"example.com", "example.com", ".", true}, + {"example.com", "test.com", ".", false}, + {"example.com", "xample.com", ".", false}, + {"example.com", "example", ".", false}, + {"example.com", "COM", "example", true}, + {"EXAMPLE.COM", "com", "EXAMPLE", true}, + } { + tmp, ok := mustParseName(test.name).TrimSuffix(mustParseName(test.suffix)) + trimmed := tmp.String() + if ok != test.ok || trimmed != test.trimmed { + t.Errorf("TrimSuffix %+q %+q returned (%+q, %v), expected (%+q, %v)", + test.name, test.suffix, trimmed, ok, test.trimmed, test.ok) + continue + } + } +} + +func TestReadName(t *testing.T) { + // Good tests. + for _, test := range []struct { + start int64 + end int64 + input string + s string + }{ + // Empty name. + {0, 1, "\x00abcd", "."}, + // No pointers. + {12, 25, "AAAABBBBCCCC\x07example\x03com\x00", "example.com"}, + // Backward pointer. + {25, 31, "AAAABBBBCCCC\x07example\x03com\x00\x03sub\xc0\x0c", "sub.example.com"}, + // Forward pointer. + {0, 4, "\x01a\xc0\x04\x03bcd\x00", "a.bcd"}, + // Two backwards pointers. + {31, 38, "AAAABBBBCCCC\x07example\x03com\x00\x03sub\xc0\x0c\x04sub2\xc0\x19", "sub2.sub.example.com"}, + // Forward then backward pointer. + {25, 31, "AAAABBBBCCCC\x07example\x03com\x00\x03sub\xc0\x1f\x04sub2\xc0\x0c", "sub.sub2.example.com"}, + // Overlapping codons. + {0, 4, "\x01a\xc0\x03bcd\x00", "a.bcd"}, + // Pointer to empty label. + {0, 10, "\x07example\xc0\x0a\x00", "example"}, + {1, 11, "\x00\x07example\xc0\x00", "example"}, + // Pointer to pointer to empty label. + {0, 10, "\x07example\xc0\x0a\xc0\x0c\x00", "example"}, + {1, 11, "\x00\x07example\xc0\x0c\xc0\x00", "example"}, + } { + r := bytes.NewReader([]byte(test.input)) + _, err := r.Seek(test.start, io.SeekStart) + if err != nil { + panic(err) + } + name, err := readName(r) + if err != nil { + t.Errorf("%+q returned error %s", test.input, err) + continue + } + s := name.String() + if s != test.s { + t.Errorf("%+q returned %+q, expected %+q", test.input, s, test.s) + continue + } + cur, _ := r.Seek(0, io.SeekCurrent) + if cur != test.end { + t.Errorf("%+q left offset %d, expected %d", test.input, cur, test.end) + continue + } + } + + // Bad tests. + for _, test := range []struct { + start int64 + input string + err error + }{ + {0, "", io.ErrUnexpectedEOF}, + // Reserved label type. + {0, "\x80example", ErrReservedLabelType}, + // Reserved label type. + {0, "\x40example", ErrReservedLabelType}, + // No Terminating empty label. + {0, "\x07example\x03com", io.ErrUnexpectedEOF}, + // Pointer past end of buffer. + {0, "\x07example\xc0\xff", io.ErrUnexpectedEOF}, + // Pointer to self. + {0, "\x07example\x03com\xc0\x0c", ErrTooManyPointers}, + // Pointer to self with intermediate label. + {0, "\x07example\x03com\xc0\x08", ErrTooManyPointers}, + // Two pointers that point to each other. + {0, "\xc0\x02\xc0\x00", ErrTooManyPointers}, + // Two pointers that point to each other, with intermediate labels. + {0, "\x01a\xc0\x04\x01b\xc0\x00", ErrTooManyPointers}, + // EOF while reading label. + {0, "\x0aexample", io.ErrUnexpectedEOF}, + // EOF before second byte of pointer. + {0, "\xc0", io.ErrUnexpectedEOF}, + {0, "\x07example\xc0", io.ErrUnexpectedEOF}, + } { + r := bytes.NewReader([]byte(test.input)) + _, err := r.Seek(test.start, io.SeekStart) + if err != nil { + panic(err) + } + name, err := readName(r) + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + if err != test.err { + t.Errorf("%+q returned (%+q, %v), expected %v", test.input, name, err, test.err) + continue + } + } +} + +func mustParseName(s string) Name { + name, err := ParseName(s) + if err != nil { + panic(err) + } + return name +} + +func questionsEqual(a, b *Question) bool { + if !namesEqual(a.Name, b.Name) { + return false + } + if a.Type != b.Type || a.Class != b.Class { + return false + } + return true +} + +func rrsEqual(a, b *RR) bool { + if !namesEqual(a.Name, b.Name) { + return false + } + if a.Type != b.Type || a.Class != b.Class || a.TTL != b.TTL { + return false + } + if !bytes.Equal(a.Data, b.Data) { + return false + } + return true +} + +func messagesEqual(a, b *Message) bool { + if a.ID != b.ID || a.Flags != b.Flags { + return false + } + if len(a.Question) != len(b.Question) { + return false + } + for i := 0; i < len(a.Question); i++ { + if !questionsEqual(&a.Question[i], &b.Question[i]) { + return false + } + } + for _, rec := range []struct{ rrA, rrB []RR }{ + {a.Answer, b.Answer}, + {a.Authority, b.Authority}, + {a.Additional, b.Additional}, + } { + if len(rec.rrA) != len(rec.rrB) { + return false + } + for i := 0; i < len(rec.rrA); i++ { + if !rrsEqual(&rec.rrA[i], &rec.rrB[i]) { + return false + } + } + } + return true +} + +func TestMessageFromWireFormat(t *testing.T) { + for _, test := range []struct { + buf string + expected Message + err error + }{ + { + "\x12\x34", + Message{}, + io.ErrUnexpectedEOF, + }, + { + "\x12\x34\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03www\x07example\x03com\x00\x00\x01\x00\x01", + Message{ + ID: 0x1234, + Flags: 0x0100, + Question: []Question{ + { + Name: mustParseName("www.example.com"), + Type: 1, + Class: 1, + }, + }, + Answer: []RR{}, + Authority: []RR{}, + Additional: []RR{}, + }, + nil, + }, + { + "\x12\x34\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03www\x07example\x03com\x00\x00\x01\x00\x01X", + Message{}, + ErrTrailingBytes, + }, + { + "\x12\x34\x81\x80\x00\x01\x00\x01\x00\x00\x00\x00\x03www\x07example\x03com\x00\x00\x01\x00\x01\x03www\x07example\x03com\x00\x00\x01\x00\x01\x00\x00\x00\x80\x00\x04\xc0\x00\x02\x01", + Message{ + ID: 0x1234, + Flags: 0x8180, + Question: []Question{ + { + Name: mustParseName("www.example.com"), + Type: 1, + Class: 1, + }, + }, + Answer: []RR{ + { + Name: mustParseName("www.example.com"), + Type: 1, + Class: 1, + TTL: 128, + Data: []byte{192, 0, 2, 1}, + }, + }, + Authority: []RR{}, + Additional: []RR{}, + }, + nil, + }, + } { + message, err := MessageFromWireFormat([]byte(test.buf)) + if err != test.err || (err == nil && !messagesEqual(&message, &test.expected)) { + t.Errorf("%+q\nreturned (%+v, %v)\nexpected (%+v, %v)", + test.buf, message, err, test.expected, test.err) + continue + } + } +} + +func TestMessageWireFormatRoundTrip(t *testing.T) { + for _, message := range []Message{ + { + ID: 0x1234, + Flags: 0x0100, + Question: []Question{ + { + Name: mustParseName("www.example.com"), + Type: 1, + Class: 1, + }, + { + Name: mustParseName("www2.example.com"), + Type: 2, + Class: 2, + }, + }, + Answer: []RR{ + { + Name: mustParseName("abc"), + Type: 2, + Class: 3, + TTL: 0xffffffff, + Data: []byte{1}, + }, + { + Name: mustParseName("xyz"), + Type: 2, + Class: 3, + TTL: 255, + Data: []byte{}, + }, + }, + Authority: []RR{ + { + Name: mustParseName("."), + Type: 65535, + Class: 65535, + TTL: 0, + Data: []byte("XXXXXXXXXXXXXXXXXXX"), + }, + }, + Additional: []RR{}, + }, + } { + buf, err := message.WireFormat() + if err != nil { + t.Errorf("%+v cannot make wire format: %v", message, err) + continue + } + message2, err := MessageFromWireFormat(buf) + if err != nil { + t.Errorf("%+q cannot parse wire format: %v", buf, err) + continue + } + if !messagesEqual(&message, &message2) { + t.Errorf("messages unequal\nbefore: %+v\n after: %+v", message, message2) + continue + } + } +} + +func TestDecodeRDataTXT(t *testing.T) { + for _, test := range []struct { + p []byte + decoded []byte + err error + }{ + {[]byte{}, nil, io.ErrUnexpectedEOF}, + {[]byte("\x00"), []byte{}, nil}, + {[]byte("\x01"), nil, io.ErrUnexpectedEOF}, + } { + decoded, err := DecodeRDataTXT(test.p) + if err != test.err || (err == nil && !bytes.Equal(decoded, test.decoded)) { + t.Errorf("%+q\nreturned (%+q, %v)\nexpected (%+q, %v)", + test.p, decoded, err, test.decoded, test.err) + continue + } + } +} + +func TestEncodeRDataTXT(t *testing.T) { + // Encoding 0 bytes needs to return at least a single length octet of + // zero, not an empty slice. + p := make([]byte, 0) + encoded := EncodeRDataTXT(p) + if len(encoded) < 0 { + t.Errorf("EncodeRDataTXT(%v) returned %v", p, encoded) + } + + // 255 bytes should be able to be encoded into 256 bytes. + p = make([]byte, 255) + encoded = EncodeRDataTXT(p) + if len(encoded) > 256 { + t.Errorf("EncodeRDataTXT(%d bytes) returned %d bytes", len(p), len(encoded)) + } +} + +func TestRDataTXTRoundTrip(t *testing.T) { + for _, p := range [][]byte{ + {}, + []byte("\x00"), + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, + }, + } { + rdata := EncodeRDataTXT(p) + decoded, err := DecodeRDataTXT(rdata) + if err != nil || !bytes.Equal(decoded, p) { + t.Errorf("%+q returned (%+q, %v)", p, decoded, err) + continue + } + } +} diff --git a/pkg/registrars/dns-registrar/encryption/encryption.go b/pkg/registrars/dns-registrar/encryption/encryption.go new file mode 100644 index 00000000..66cec8ae --- /dev/null +++ b/pkg/registrars/dns-registrar/encryption/encryption.go @@ -0,0 +1,79 @@ +package encryption + +import ( + "bufio" + "crypto/rand" + "encoding/hex" + "fmt" + "io" + "strings" + + "github.com/flynn/noise" + "golang.org/x/crypto/curve25519" +) + +const ( + KeyLen = 32 +) + +// cipherSuite represents 25519_ChaChaPoly_BLAKE2s. +var cipherSuite = noise.NewCipherSuite(noise.DH25519, noise.CipherChaChaPoly, noise.HashBLAKE2s) + +// NewConfig instantiates configuration settings that are common to clients and +// servers. +func NewConfig() noise.Config { + return noise.Config{ + CipherSuite: cipherSuite, + Pattern: noise.HandshakeN, + } +} + +// ReadKey reads a hex-encoded key from r. r must consist of a single line, with +// or without a '\n' line terminator. The line must consist of KeyLen +// hex-encoded bytes. +func ReadKey(r io.Reader) ([]byte, error) { + br := bufio.NewReader(io.LimitReader(r, 100)) + line, err := br.ReadString('\n') + if err == io.EOF { + err = nil + } + if err == nil { + // Check that we're at EOF. + _, err = br.ReadByte() + if err == io.EOF { + err = nil + } else if err == nil { + err = fmt.Errorf("file contains more than one line") + } + } + if err != nil { + return nil, err + } + line = strings.TrimSuffix(line, "\n") + return DecodeKey(line) +} + +// DecodeKey decodes a hex-encoded private or public key. +func DecodeKey(s string) ([]byte, error) { + key, err := hex.DecodeString(s) + if err == nil && len(key) != KeyLen { + err = fmt.Errorf("length is %d, expected %d", len(key), KeyLen) + } + return key, err +} + +// GeneratePrivkey generates a private key. The corresponding public key can be +// derived using PubkeyFromPrivkey. +func GeneratePrivkey() ([]byte, error) { + pair, err := noise.DH25519.GenerateKeypair(rand.Reader) + return pair.Private, err +} + +// PubkeyFromPrivkey returns the public key that corresponds to privkey. +func PubkeyFromPrivkey(privkey []byte) []byte { + pubkey, err := curve25519.X25519(privkey, curve25519.Basepoint) + if err != nil { + panic(err) + } + return pubkey +} diff --git a/pkg/registrars/dns-registrar/msgformat/msgformat.go b/pkg/registrars/dns-registrar/msgformat/msgformat.go new file mode 100644 index 00000000..d418e726 --- /dev/null +++ b/pkg/registrars/dns-registrar/msgformat/msgformat.go @@ -0,0 +1,46 @@ +package msgformat + +import ( + "encoding/binary" + "errors" +) + +// Add length prefix to message +func AddRequestFormat(p []byte) ([]byte, error) { + length := uint8(len(p)) + prefixed := append([]byte{length}, p...) + return prefixed, nil +} + +// Remove the length prefix +func RemoveRequestFormat(p []byte) ([]byte, error) { + if len(p) < 1 { + return nil, errors.New("invalid message length") + } + length := int(uint8(p[0])) + if 1+length > len(p) { + return nil, errors.New("invalid message length") + } + return p[1 : 1+length], nil +} + +// Add length prefix to response, using uint16 instad of uint8 for larger payload +func AddResponseFormat(p []byte) ([]byte, error) { + length := uint16(len(p)) + b := make([]byte, 2) + binary.BigEndian.PutUint16(b, length) + prefixed := append(b, p...) + return prefixed, nil +} + +// Remove the length prefix +func RemoveResponseFormat(p []byte) ([]byte, error) { + if len(p) < 2 { + return nil, errors.New("invalid message length") + } + length := int(binary.BigEndian.Uint16(p[0:2])) + if 2+length > len(p) { + return nil, errors.New("invalid message length") + } + return p[2 : 2+length], nil +} diff --git a/pkg/registrars/dns-registrar/msgformat/msgformat_test.go b/pkg/registrars/dns-registrar/msgformat/msgformat_test.go new file mode 100644 index 00000000..e0895e34 --- /dev/null +++ b/pkg/registrars/dns-registrar/msgformat/msgformat_test.go @@ -0,0 +1,42 @@ +package msgformat + +import ( + "reflect" + "testing" +) + +func TestRequestFormat(t *testing.T) { + msg := []byte("blablabla") + for i := 0; i < 3; i++ { + request := msg[0:i] + requestBuf, err := AddRequestFormat(request) + if err != nil { + t.Errorf("err: [%v]", err) + } + requestedMsg, err := RemoveRequestFormat(requestBuf) + if err != nil { + t.Errorf("err: [%v]", err) + } + if !reflect.DeepEqual(requestedMsg, request) { + t.Errorf("request [%v] != requestedMsg [%v]", request, requestedMsg) + } + } +} + +func TestResponseFormat(t *testing.T) { + msg := []byte("blablabla") + for i := 0; i < 3; i++ { + response := msg[0:i] + responseBuf, err := AddResponseFormat(response) + if err != nil { + t.Errorf("err: [%v]", err) + } + responseedMsg, err := RemoveResponseFormat(responseBuf) + if err != nil { + t.Errorf("err: [%v]", err) + } + if !reflect.DeepEqual(responseedMsg, response) { + t.Errorf("response [%v] != responseedMsg [%v]", response, responseedMsg) + } + } +} diff --git a/pkg/registrars/dns-registrar/queuepacketconn/clientid.go b/pkg/registrars/dns-registrar/queuepacketconn/clientid.go new file mode 100644 index 00000000..d19fca3d --- /dev/null +++ b/pkg/registrars/dns-registrar/queuepacketconn/clientid.go @@ -0,0 +1,28 @@ +package queuepacketconn + +import ( + "crypto/rand" + "encoding/hex" +) + +// ClientID is an abstract identifier that binds together all the communications +// belonging to a single client session, even though those communications may +// arrive from multiple IP addresses or over multiple lower-level connections. +// It plays the same role that an (IP address, port number) tuple plays in a +// net.UDPConn: it's the return address pertaining to a long-lived abstract +// client session. The client attaches its ClientID to each of its +// communications, enabling the server to disambiguate requests among its many +// clients. ClientID implements the net.Addr interface. +type ClientID [8]byte + +func NewClientID() ClientID { + var id ClientID + _, err := rand.Read(id[:]) + if err != nil { + panic(err) + } + return id +} + +func (id ClientID) Network() string { return "clientid" } +func (id ClientID) String() string { return hex.EncodeToString(id[:]) } diff --git a/pkg/registrars/dns-registrar/queuepacketconn/consts.go b/pkg/registrars/dns-registrar/queuepacketconn/consts.go new file mode 100644 index 00000000..a4782445 --- /dev/null +++ b/pkg/registrars/dns-registrar/queuepacketconn/consts.go @@ -0,0 +1,22 @@ +// Package queuepacketconn is facilities for embedding packet-based reliability +// protocols inside other protocols. +// +// https://github.com/net4people/bbs/issues/9 +package queuepacketconn + +import "errors" + +// QueueSize is the size of send and receive queues in QueuePacketConn and +// RemoteMap. +const QueueSize = 128 + +var errClosedPacketConn = errors.New("operation on closed connection") +var errNotImplemented = errors.New("not implemented") + +// DummyAddr is a placeholder net.Addr, for when a programming interface +// requires a net.Addr but there is none relevant. All DummyAddrs compare equal +// to each other. +type DummyAddr struct{} + +func (addr DummyAddr) Network() string { return "dummy" } +func (addr DummyAddr) String() string { return "dummy" } diff --git a/pkg/registrars/dns-registrar/queuepacketconn/queuepacketconn.go b/pkg/registrars/dns-registrar/queuepacketconn/queuepacketconn.go new file mode 100644 index 00000000..0552d3fb --- /dev/null +++ b/pkg/registrars/dns-registrar/queuepacketconn/queuepacketconn.go @@ -0,0 +1,163 @@ +package queuepacketconn + +import ( + "fmt" + "net" + "sync" + "sync/atomic" + "time" + + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/remotemap" +) + +// taggedPacket is a combination of a []byte and a net.Addr, encapsulating the +// return type of PacketConn.ReadFrom. +type taggedPacket struct { + P []byte + Addr net.Addr +} + +// QueuePacketConn implements net.PacketConn by storing queues of packets. There +// is one incoming queue (where packets are additionally tagged by the source +// address of the peer that sent them). There are many outgoing queues, one for +// each remote peer address that has been recently seen. The QueueIncoming +// method inserts a packet into the incoming queue, to eventually be returned by +// ReadFrom. WriteTo inserts a packet into an address-specific outgoing queue, +// which can later by accessed through the OutgoingQueue method. +type QueuePacketConn struct { + remotes *remotemap.RemoteMap + localAddr net.Addr + recvQueue chan taggedPacket + closeOnce sync.Once + closed chan struct{} + // What error to return when the QueuePacketConn is closed. + err atomic.Value +} + +// NewQueuePacketConn makes a new QueuePacketConn, set to track recent peers +// for at least a duration of timeout. +func NewQueuePacketConn(localAddr net.Addr, timeout time.Duration) *QueuePacketConn { + return &QueuePacketConn{ + remotes: remotemap.NewRemoteMap(timeout), + localAddr: localAddr, + recvQueue: make(chan taggedPacket, QueueSize), + closed: make(chan struct{}), + } +} + +// QueueIncoming queues and incoming packet and its source address, to be +// returned in a future call to ReadFrom. +func (c *QueuePacketConn) QueueIncoming(p []byte, addr net.Addr) { + select { + case <-c.closed: + // If we're closed, silently drop it. + return + default: + } + // Copy the slice so that the caller may reuse it. + buf := make([]byte, len(p)) + copy(buf, p) + select { + case c.recvQueue <- taggedPacket{buf, addr}: + default: + // Drop the incoming packet if the receive queue is full. + } +} + +// OutgoingQueue returns the queue of outgoing packets corresponding to addr, +// creating it if necessary. The contents of the queue will be packets that are +// written to the address in question using WriteTo. +func (c *QueuePacketConn) OutgoingQueue(addr net.Addr) <-chan []byte { + return c.remotes.Chan(addr) +} + +// ReadFrom returns a packet and address previously stored by QueueIncoming. +func (c *QueuePacketConn) ReadFrom(p []byte) (int, net.Addr, error) { + select { + case <-c.closed: + return 0, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)} + default: + } + select { + case <-c.closed: + return 0, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)} + case packet := <-c.recvQueue: + return copy(p, packet.P), packet.Addr, nil + } +} + +// Read calls ReadFrom to read a packet. Created to implement net.Conn interface. +// Should be only used by stream-oriented transports (DoH, DoT), will return error if this is not the case. +func (c *QueuePacketConn) Read(b []byte) (int, error) { + n, remoteAddr, err := c.ReadFrom(b) + if remoteAddr.String() != "dummy" { + return 0, fmt.Errorf("use of Read on packet-oriented transport") + } + + return n, err +} + +// WriteTo queues an outgoing packet for the given address. The queue can later +// be retrieved using the OutgoingQueue method. +func (c *QueuePacketConn) WriteTo(p []byte, addr net.Addr) (int, error) { + select { + case <-c.closed: + return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)} + default: + } + // Copy the slice so that the caller may reuse it. + buf := make([]byte, len(p)) + copy(buf, p) + select { + case c.remotes.Chan(addr) <- buf: + return len(buf), nil + default: + // Drop the outgoing packet if the send queue is full. + return len(buf), nil + } +} + +// Write calls WriteTo to read a packet. Created to implement net.Conn interface. +// This should be only used by stream-oriented transports (DoH, DoT). +func (c *QueuePacketConn) Write(b []byte) (int, error) { + return c.WriteTo(b, DummyAddr{}) +} + +// closeWithError unblocks pending operations and makes future operations fail +// with the given error. If err is nil, it becomes errClosedPacketConn. +func (c *QueuePacketConn) closeWithError(err error) error { + var newlyClosed bool + c.closeOnce.Do(func() { + newlyClosed = true + // Store the error to be returned by future PacketConn + // operations. + if err == nil { + err = errClosedPacketConn + } + c.err.Store(err) + close(c.closed) + }) + if !newlyClosed { + return &net.OpError{Op: "close", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)} + } + return nil +} + +// Close unblocks pending operations and makes future operations fail with a +// "closed connection" error. +func (c *QueuePacketConn) Close() error { + return c.closeWithError(nil) +} + +// RemoteAddr returns a stub addr. Created to implement net.Conn interface. +// This should be only used by stream-oriented transports (DoH, DoT). +func (c *QueuePacketConn) RemoteAddr() net.Addr { + return DummyAddr{} +} + +// LocalAddr returns the localAddr value that was passed to NewQueuePacketConn. +func (c *QueuePacketConn) LocalAddr() net.Addr { return c.localAddr } + +func (c *QueuePacketConn) SetDeadline(t time.Time) error { return errNotImplemented } +func (c *QueuePacketConn) SetReadDeadline(t time.Time) error { return errNotImplemented } +func (c *QueuePacketConn) SetWriteDeadline(t time.Time) error { return errNotImplemented } diff --git a/pkg/registrars/dns-registrar/remotemap/remotemap.go b/pkg/registrars/dns-registrar/remotemap/remotemap.go new file mode 100644 index 00000000..82b6c907 --- /dev/null +++ b/pkg/registrars/dns-registrar/remotemap/remotemap.go @@ -0,0 +1,152 @@ +package remotemap + +import ( + "container/heap" + "net" + "sync" + "time" +) + +const QueueSize = 128 + +// remoteRecord is a record of a recently seen remote peer, with the time it was +// last seen and queues of outgoing packets. +type remoteRecord struct { + Addr net.Addr + LastSeen time.Time + Chan chan []byte +} + +// RemoteMap manages a mapping of live remote peers, keyed by address, to their +// respective send queues. Each peer has two queues: a send queue, and a +// receive queue. +// RemoteMap's functions are safe to call from multiple goroutines. +type RemoteMap struct { + // We use an inner structure to avoid exposing public heap.Interface + // functions to users of remoteMap. + inner remoteMapInner + // Synchronizes access to inner. + lock sync.Mutex +} + +// NewRemoteMap creates a RemoteMap that expires peers after a timeout. +// +// If the timeout is 0, peers never expire. +func NewRemoteMap(timeout time.Duration) *RemoteMap { + m := &RemoteMap{ + inner: remoteMapInner{ + byAge: make([]*remoteRecord, 0), + byAddr: make(map[string]int), + }, + } + if timeout > 0 { + go func() { + for { + time.Sleep(timeout / 2) + now := time.Now() + m.lock.Lock() + m.inner.removeExpired(now, timeout) + m.lock.Unlock() + } + }() + } + return m +} + +// Returns the send channel corresponding to addr and indicates whether it is a new channel +func (m *RemoteMap) GetChan(addr net.Addr) (chan []byte, bool) { + m.lock.Lock() + defer m.lock.Unlock() + record, isNewAddr := m.inner.Lookup(addr, time.Now()) + return record.Chan, isNewAddr +} + +// Get Channel corresponding to addr +func (m *RemoteMap) Chan(addr net.Addr) chan []byte { + rv, _ := m.GetChan(addr) + return rv +} + +// remoteMapInner is the inner type of RemoteMap, implementing heap.Interface. +// byAge is the backing store, a heap ordered by LastSeen time, to facilitate +// expiring old records. byAddr is a map from addresses to heap indices, to +// allow looking up by address. Unlike RemoteMap, remoteMapInner requires +// external synchonization. +type remoteMapInner struct { + byAge []*remoteRecord + byAddr map[string]int +} + +// removeExpired removes all records whose LastSeen timestamp is more than +// timeout in the past. +func (inner *remoteMapInner) removeExpired(now time.Time, timeout time.Duration) { + for len(inner.byAge) > 0 && now.Sub(inner.byAge[0].LastSeen) >= timeout { + record := heap.Pop(inner).(*remoteRecord) + close(record.Chan) + } +} + +// Lookup finds the existing record corresponding to addr, or creates a new +// one if none exists yet. It updates the record's LastSeen time and returns the +// record. +func (inner *remoteMapInner) Lookup(addr net.Addr, now time.Time) (*remoteRecord, bool) { + var record *remoteRecord + i, ok := inner.byAddr[addr.String()] + if ok { + // Found one, update its LastSeen. + record = inner.byAge[i] + record.LastSeen = now + heap.Fix(inner, i) + } else { + // Not found, create a new one. + record = &remoteRecord{ + Addr: addr, + LastSeen: now, + Chan: make(chan []byte, QueueSize), + } + heap.Push(inner, record) + return record, true + } + return record, false +} + +// heap.Interface for remoteMapInner. + +func (inner *remoteMapInner) Len() int { + if len(inner.byAge) != len(inner.byAddr) { + panic("inconsistent remoteMap") + } + return len(inner.byAge) +} + +func (inner *remoteMapInner) Less(i, j int) bool { + return inner.byAge[i].LastSeen.Before(inner.byAge[j].LastSeen) +} + +func (inner *remoteMapInner) Swap(i, j int) { + inner.byAge[i], inner.byAge[j] = inner.byAge[j], inner.byAge[i] + inner.byAddr[inner.byAge[i].Addr.String()] = i + inner.byAddr[inner.byAge[j].Addr.String()] = j +} + +func (inner *remoteMapInner) Push(x interface{}) { + record := x.(*remoteRecord) + if _, ok := inner.byAddr[record.Addr.String()]; ok { + panic("duplicate address in remoteMap") + } + // Insert into byAddr map. + inner.byAddr[record.Addr.String()] = len(inner.byAge) + // Insert into byAge slice. + inner.byAge = append(inner.byAge, record) +} + +func (inner *remoteMapInner) Pop() interface{} { + n := len(inner.byAddr) + // Remove from byAge slice. + record := inner.byAge[n-1] + inner.byAge[n-1] = nil + inner.byAge = inner.byAge[:n-1] + // Remove from byAddr map. + delete(inner.byAddr, record.Addr.String()) + return record +} diff --git a/pkg/registrars/dns-registrar/requester/config.go b/pkg/registrars/dns-registrar/requester/config.go new file mode 100644 index 00000000..1384fb42 --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/config.go @@ -0,0 +1,63 @@ +package requester + +import ( + "fmt" + "net" +) + +type Config struct { + // TransportMethod is the transport method to be used + TransportMethod TransportMethodType + + // Target is the target addr/url for the recursive DNS server used + Target string + + // Domain is the base domain for the DNS request that the responder is authoritative for + BaseDomain string + + // Pubkey is the public key for the listening responder + Pubkey []byte + + // UtlsDistribution allows utls distribution to be specified for the utls connection used during DoH and DoT + UtlsDistribution string + + // DialTransport allows for a custom dialer to be used for the underlying TCP/UDP transport + DialTransport DialFunc +} + +// TransportMethodType declares the transport method to be used +type TransportMethodType int + +const ( + DoH TransportMethodType = iota + DoT + UDP +) + +func defaultDialTransport() DialFunc { + dialer := net.Dialer{} + return dialer.DialContext +} + +func (c *Config) dialTransport() DialFunc { + if c.DialTransport == nil { + return defaultDialTransport() + } + return c.DialTransport +} + +func validateConfig(config *Config) error { + if config == nil { + return fmt.Errorf("no config provided") + } + + if config.Target == "" { + return fmt.Errorf("no target configured") + } + + if config.BaseDomain == "" { + return fmt.Errorf("no base domain configured") + } + + return nil +} diff --git a/pkg/registrars/dns-registrar/requester/dns.go b/pkg/registrars/dns-registrar/requester/dns.go new file mode 100644 index 00000000..a589c324 --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/dns.go @@ -0,0 +1,212 @@ +package requester + +import ( + "bytes" + "crypto/rand" + "encoding/base32" + "encoding/binary" + "log" + "net" + + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/dns" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/queuepacketconn" +) + +// base32Encoding is a base32 encoding without padding. +var base32Encoding = base32.StdEncoding.WithPadding(base32.NoPadding) + +// DNSPacketConn provides a packet-sending and -receiving interface over various +// forms of DNS. It handles the details of how packets and padding are encoded +// as a DNS name in the Question section of an upstream query, and as a TXT RR +// in downstream responses. +// +// DNSPacketConn does not handle the mechanics of actually sending and receiving +// encoded DNS messages. That is rather the responsibility of some other +// net.PacketConn such as net.UDPConn, HTTPPacketConn, or TLSPacketConn, one of +// which must be provided to NewDNSPacketConn. +type DNSPacketConn struct { + domain dns.Name + // QueuePacketConn is the direct receiver of ReadFrom and WriteTo calls. + // recvLoop and sendLoop take the messages out of the receive and send + // queues and actually put them on the network. + *queuepacketconn.QueuePacketConn +} + +// NewDNSPacketConn creates a new DNSPacketConn. transport, through its WriteTo +// and ReadFrom methods, handles the actual sending and receiving the DNS +// messages encoded by DNSPacketConn. addr is the address to be passed to +// transport.WriteTo whenever a message needs to be sent. +func NewDNSPacketConn(transport net.Conn, addr net.Addr, domain dns.Name) *DNSPacketConn { + // Generate a new random ClientID. + c := &DNSPacketConn{ + domain: domain, + QueuePacketConn: queuepacketconn.NewQueuePacketConn(queuepacketconn.DummyAddr{}, 0), + } + go func() { + err := c.recvLoop(transport) + if err != nil { + log.Printf("recvLoop: %v", err) + } + }() + go func() { + err := c.sendLoop(transport, addr) + if err != nil { + log.Printf("sendLoop: %v", err) + } + }() + return c +} + +// dnsResponsePayload extracts the downstream payload of a DNS response, encoded +// into the RDATA of a TXT RR. It returns nil if the message doesn't pass format +// checks, or if the name in its Question entry is not a subdomain of domain. +func dnsResponsePayload(resp *dns.Message, domain dns.Name) []byte { + if resp.Flags&0x8000 != 0x8000 { + // QR != 1, this is not a response. + return nil + } + if resp.Flags&0x000f != dns.RcodeNoError { + return nil + } + + if len(resp.Answer) != 1 { + return nil + } + answer := resp.Answer[0] + + _, ok := answer.Name.TrimSuffix(domain) + if !ok { + // Not the name we are expecting. + return nil + } + + if answer.Type != dns.RRTypeTXT { + // We only support TYPE == TXT. + return nil + } + payload, err := dns.DecodeRDataTXT(answer.Data) + if err != nil { + return nil + } + + return payload +} + +// recvLoop repeatedly calls transport.ReadFrom to receive a DNS message, +// extracts its payload and breaks it into packets, and stores the packets in a +// queue to be returned from a future call to c.ReadFrom. +func (c *DNSPacketConn) recvLoop(transport net.Conn) error { + for { + var buf [4096]byte + n, err := transport.Read(buf[:]) + if err != nil { + if err, ok := err.(net.Error); ok { + log.Printf("ReadFrom error: %v", err) + continue + } + return err + } + + // Got a response. Try to parse it as a DNS message. + resp, err := dns.MessageFromWireFormat(buf[:n]) + if err != nil { + log.Printf("MessageFromWireFormat: %v", err) + continue + } + + payload := dnsResponsePayload(&resp, c.domain) + + c.QueuePacketConn.QueueIncoming(payload, transport.RemoteAddr()) + } +} + +// chunks breaks p into non-empty subslices of at most n bytes, greedily so that +// only final subslice has length < n. +func chunks(p []byte, n int) [][]byte { + var result [][]byte + for len(p) > 0 { + sz := len(p) + if sz > n { + sz = n + } + result = append(result, p[:sz]) + p = p[sz:] + } + return result +} + +// send sends p as a single packet encoded into a DNS query, using +// transport.WriteTo(query, addr). The length of p must be less than 224 bytes. +// +// 0. Start with the raw packet contents. +// supercalifragilisticexpialidocious +// 1. Base32-encode, without padding and in lower case. +// ingesrkokreujy6zumkse43vobsxey3bnruwm4tbm5uwy2ltoruwgzlyobuwc3djmrxwg2lpovzq +// 2. Break into labels of at most 63 octets. +// ingesrkokreujy6zumkse43vobsxey3bnruwm4tbm5uwy2ltoruwgzlyobuwc3d.jmrxwg2lpovzq +// 3. Append the domain. +// ingesrkokreujy6zumkse43vobsxey3bnruwm4tbm5uwy2ltoruwgzlyobuwc3d.jmrxwg2lpovzq.t.example.com +func (c *DNSPacketConn) send(transport net.Conn, p []byte) error { + encoded := make([]byte, base32Encoding.EncodedLen(len(p))) + base32Encoding.Encode(encoded, p) + encoded = bytes.ToLower(encoded) + labels := chunks(encoded, 63) + labels = append(labels, c.domain...) + name, err := dns.NewName(labels) + if err != nil { + return err + } + + var id uint16 + binary.Read(rand.Reader, binary.BigEndian, &id) + query := &dns.Message{ + ID: id, + Flags: 0x0100, // QR = 0, RD = 1 + Question: []dns.Question{ + { + Name: name, + Type: dns.RRTypeTXT, + Class: dns.ClassIN, + }, + }, + // EDNS(0) + Additional: []dns.RR{ + { + Name: dns.Name{}, + Type: dns.RRTypeOPT, + Class: 4096, // requester's UDP payload size + TTL: 0, // extended RCODE and flags + Data: []byte{}, + }, + }, + } + buf, err := query.WireFormat() + if err != nil { + return err + } + + _, err = transport.Write(buf) + return err +} + +// sendLoop takes packets that have been written using c.WriteTo, and sends them +// on the network using send. It also does polling with empty packets when +// requested by pollChan or after a timeout. +func (c *DNSPacketConn) sendLoop(transport net.Conn, addr net.Addr) error { + for { + var p []byte + outgoing := c.QueuePacketConn.OutgoingQueue(addr) + // Prioritize sending an actual data packet from outgoing. Only + // consider a poll when outgoing is empty. + p = <-outgoing + + // Unlike in the server, in the client we assume that because + // the data capacity of queries is so limited, it's not worth + // trying to send more than one packet per query. + err := c.send(transport, p) + if err != nil { + log.Printf("send: %v", err) + continue + } + } +} diff --git a/pkg/registrars/dns-registrar/requester/http.go b/pkg/registrars/dns-registrar/requester/http.go new file mode 100644 index 00000000..e9b0667d --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/http.go @@ -0,0 +1,175 @@ +package requester + +import ( + "bytes" + "fmt" + "io" + "log" + "net/http" + "strconv" + "sync" + "time" + + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/queuepacketconn" +) + +// A default Retry-After delay to use when there is no explicit Retry-After +// header in an HTTP response. +const defaultRetryAfter = 10 * time.Second + +// HTTPPacketConn is an HTTP-based transport for DNS messages, used for DNS over +// HTTPS (DoH). Its WriteTo and ReadFrom methods exchange DNS messages over HTTP +// requests and responses. +// +// HTTPPacketConn deals only with already formatted DNS messages. It does not +// handle encoding information into the messages. That is rather the +// responsibility of DNSPacketConn. +// +// https://tools.ietf.org/html/rfc8484 +type HTTPPacketConn struct { + // client is the http.Client used to make requests. We use this instead + // of http.DefaultClient in order to support setting a timeout and a + // uTLS fingerprint. + client *http.Client + + // urlString is the URL to which HTTP requests will be sent, for example + // "https://doh.example/dns-query". + urlString string + + // notBefore, if not zero, is a time before which we may not send any + // queries; queries are buffered or dropped until that time. notBefore + // is set when we get a 429 Too Many Requests HTTP response or other + // unexpected status code that causes us to need to slow down. It is set + // according to the Retry-After header if available, otherwise it is set + // to defaultRetryAfter in the future. notBeforeLock controls access to + // notBefore. + notBefore time.Time + notBeforeLock sync.RWMutex + + // QueuePacketConn is the direct receiver of ReadFrom and WriteTo calls. + // sendLoop, via send, removes messages from the outgoing queue that + // were placed there by WriteTo, and inserts messages into the incoming + // queue to be returned from ReadFrom. + *queuepacketconn.QueuePacketConn +} + +// NewHTTPPacketConn creates a new HTTPPacketConn configured to use the HTTP +// server at urlString as a DNS over HTTP resolver. client is the http.Client +// that will be used to make requests. urlString should include any necessary +// path components; e.g., "/dns-query". numSenders is the number of concurrent +// sender-receiver goroutines to run. +func NewHTTPPacketConn(rt http.RoundTripper, urlString string, numSenders int) (*HTTPPacketConn, error) { + c := &HTTPPacketConn{ + client: &http.Client{ + Transport: rt, + Timeout: 1 * time.Minute, + }, + urlString: urlString, + QueuePacketConn: queuepacketconn.NewQueuePacketConn(queuepacketconn.DummyAddr{}, 0), + } + for i := 0; i < numSenders; i++ { + go c.sendLoop() + } + return c, nil +} + +// send sends a message in an HTTP request, and queues the body HTTP response to +// be returned from a future call to ReadFrom. +func (c *HTTPPacketConn) send(p []byte) error { + req, err := http.NewRequest("POST", c.urlString, bytes.NewReader(p)) + if err != nil { + return err + } + req.Header.Set("Accept", "application/dns-message") + req.Header.Set("Content-Type", "application/dns-message") + req.Header.Set("User-Agent", "") // Disable default "Go-http-client/1.1". + resp, err := c.client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + switch resp.StatusCode { + case http.StatusOK: + if ct := resp.Header.Get("Content-Type"); ct != "application/dns-message" { + return fmt.Errorf("unknown HTTP response Content-Type %+q", ct) + } + body, err := io.ReadAll(io.LimitReader(resp.Body, 64000)) + if err == nil { + c.QueuePacketConn.QueueIncoming(body, queuepacketconn.DummyAddr{}) + } + // Ignore err != nil; don't report an error if we at least + // managed to send. + default: + // We primarily are thinking of 429 Too Many Requests here, but + // any other unexpected response codes will also cause us to + // rate-limit ourselves and emit a log message. + // https://developers.google.com/speed/public-dns/docs/doh/#errors + now := time.Now() + var retryAfter time.Time + if value := resp.Header.Get("Retry-After"); value != "" { + var err error + retryAfter, err = parseRetryAfter(value, now) + if err != nil { + log.Printf("cannot parse Retry-After value %+q", value) + } + } + if retryAfter.IsZero() { + // Supply a default. + retryAfter = now.Add(defaultRetryAfter) + } + if retryAfter.Before(now) { + log.Printf("got %+q, but Retry-After is %v in the past", + resp.Status, now.Sub(retryAfter)) + } else { + c.notBeforeLock.Lock() + if retryAfter.Before(c.notBefore) { + log.Printf("got %+q, but Retry-After is %v earlier than already received Retry-After", + resp.Status, c.notBefore.Sub(retryAfter)) + } else { + log.Printf("got %+q; ceasing sending for %v", + resp.Status, retryAfter.Sub(now)) + c.notBefore = retryAfter + } + c.notBeforeLock.Unlock() + } + } + + return nil +} + +// sendLoop loops over the contents of the outgoing queue and passes them to +// send. It drops packets while c.notBefore is in the future. +func (c *HTTPPacketConn) sendLoop() { + for p := range c.QueuePacketConn.OutgoingQueue(queuepacketconn.DummyAddr{}) { + // Stop sending while we are rate-limiting ourselves (as a + // result of a Retry-After response header, for example). + c.notBeforeLock.RLock() + notBefore := c.notBefore + c.notBeforeLock.RUnlock() + if wait := time.Until(notBefore); wait > 0 { + // Drop it. + continue + } + + err := c.send(p) + if err != nil { + log.Printf("sendLoop: %v", err) + } + } +} + +// parseRetryAfter parses the value of a Retry-After header as an absolute +// time.Time. +func parseRetryAfter(value string, now time.Time) (time.Time, error) { + // May be a date string or an integer number of seconds. + // https://tools.ietf.org/html/rfc7231#section-7.1.3 + if t, err := http.ParseTime(value); err == nil { + return t, nil + } + i, err := strconv.ParseUint(value, 10, 32) + if err != nil { + return time.Time{}, err + } + return now.Add(time.Duration(i) * time.Second), nil +} diff --git a/pkg/registrars/dns-registrar/requester/http_test.go b/pkg/registrars/dns-registrar/requester/http_test.go new file mode 100644 index 00000000..efec14c1 --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/http_test.go @@ -0,0 +1,47 @@ +package requester + +import ( + "testing" + "time" +) + +// mustParseTime parses a time string using the time.RFC3339 format, or panics. +func mustParseTime(value string) time.Time { + t, err := time.Parse(time.RFC3339, value) + if err != nil { + panic(err) + } + return t +} + +func TestParseRetryAfter(t *testing.T) { + now := mustParseTime("2000-01-01T06:00:00Z") + for _, test := range []struct { + value string + expected string + }{ + {"", "error"}, + {"0", now.Format(time.RFC3339)}, + {"100", "2000-01-01T06:01:40Z"}, + {"0100", "2000-01-01T06:01:40Z"}, + {"-100", "error"}, + {"9999999999999", "error"}, + {"Fri, 31 Dec 1999 23:59:59 GMT", "1999-12-31T23:59:59Z"}, + {"xxx", "error"}, + } { + result, err := parseRetryAfter(test.value, now) + if test.expected == "error" { + if err == nil { + t.Errorf("%+q returned (%v, %v), expected error", + test.value, result.Format(time.RFC3339), err) + } + } else { + expectedResult := mustParseTime(test.expected) + if err != nil || result != expectedResult { + t.Errorf("%+q returned (%v, %v), expected (%v, %v)", + test.value, result.Format(time.RFC3339), + err, expectedResult.Format(time.RFC3339), nil) + } + } + } +} diff --git a/pkg/registrars/dns-registrar/requester/requester.go b/pkg/registrars/dns-registrar/requester/requester.go new file mode 100644 index 00000000..5cff6829 --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/requester.go @@ -0,0 +1,274 @@ +package requester + +import ( + "context" + "crypto/tls" + "fmt" + "net" + "net/http" + + "github.com/flynn/noise" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/dns" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/encryption" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/msgformat" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/queuepacketconn" + utls "github.com/refraction-networking/utls" +) + +type DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + +type Requester struct { + // transport is the underlying transport used for the dns request + transport net.PacketConn + // dialTransport is used for constructing the transport on the first request + // this allows us to not dial anything until the first request, while avoid storing + // a lot of internal state in Requester + dialTransport func(dialer DialFunc) (net.PacketConn, error) + + // dialer is the dialer to be used for the underlying TCP/UDP transport + dialer DialFunc + + // remote address + remoteAddr net.Addr + + // server public key + pubkey []byte +} + +// New Requester using DoT as transport +func dialDoT(dotaddr string, utlsDistribution string, dialTransport DialFunc) (net.Conn, error) { + utlsClientHelloID, err := sampleUTLSDistribution(utlsDistribution) + if err != nil { + return nil, err + } + + var dialTLSContext func(ctx context.Context, network, addr string) (net.Conn, error) + if utlsClientHelloID == nil { + dialTLSContext = func(ctx context.Context, network, addr string) (net.Conn, error) { + conn, err := dialTransport(ctx, network, addr) + if err != nil { + return nil, err + } + return tls.Client(conn, &tls.Config{}), nil + } + } else { + dialTLSContext = func(ctx context.Context, network, addr string) (net.Conn, error) { + return utlsDialContext(ctx, network, addr, nil, utlsClientHelloID, dialTransport) + } + } + dotconn, err := NewTLSPacketConn(dotaddr, dialTLSContext) + if err != nil { + return nil, err + } + + return dotconn, nil +} + +// New Requester using DoH as transport +func dialDoH(dohurl string, utlsDistribution string, dialTransport DialFunc) (net.Conn, error) { + utlsClientHelloID, err := sampleUTLSDistribution(utlsDistribution) + if err != nil { + return nil, err + } + + var rt http.RoundTripper + if utlsClientHelloID == nil { + transport := http.DefaultTransport.(*http.Transport).Clone() + // Disable DefaultTransport's default Proxy = + // ProxyFromEnvironment setting, for conformity + // with utlsRoundTripper and with DoT mode, + // which do not take a proxy from the + // environment. + transport.DialContext = dialTransport + transport.Proxy = nil + rt = transport + } else { + rt = NewUTLSRoundTripper(nil, utlsClientHelloID, dialTransport) + } + + dohconn, err := NewHTTPPacketConn(rt, dohurl, 32) + if err != nil { + return nil, err + } + + return dohconn, nil +} + +// New Requester using UDP as transport +func dialUDP(remoteAddr string, dialContext DialFunc) (net.Conn, error) { + udpConn, err := dialContext(context.Background(), "udp", remoteAddr) + if err != nil { + return nil, fmt.Errorf("error dialing udp connection: %v", err) + } + + return udpConn, nil +} + +func resolveAddr(config *Config) (net.Addr, error) { + switch config.TransportMethod { + case DoH, DoT: + return queuepacketconn.DummyAddr{}, nil + case UDP: + addr, err := net.ResolveUDPAddr("udp", config.Target) + if err != nil { + return nil, fmt.Errorf("error resolving UDP addr: %v", err) + } + return addr, nil + } + + return nil, fmt.Errorf("invalid transport type configured") +} + +func NewRequester(config *Config) (*Requester, error) { + err := validateConfig(config) + if err != nil { + return nil, fmt.Errorf("error validaing config: %v", err) + } + + baseDomain, err := dns.ParseName(config.BaseDomain) + if err != nil { + return nil, fmt.Errorf("error parsing domain: %v", err) + } + + addr, err := resolveAddr(config) + if err != nil { + return nil, fmt.Errorf("error resolving addr from config: %v", err) + } + + dialTransport := func(dialer DialFunc) (net.PacketConn, error) { + switch config.TransportMethod { + case DoT: + conn, err := dialDoT(config.Target, config.UtlsDistribution, dialer) + if err != nil { + return nil, fmt.Errorf("error dialing DoT connection: %v", err) + } + + return NewDNSPacketConn(conn, addr, baseDomain), nil + case DoH: + conn, err := dialDoH(config.Target, config.UtlsDistribution, dialer) + if err != nil { + return nil, fmt.Errorf("error dialing DoH connection: %v", err) + } + + return NewDNSPacketConn(conn, addr, baseDomain), nil + case UDP: + conn, err := dialUDP(config.Target, dialer) + if err != nil { + return nil, fmt.Errorf("error dialing UDP connection: %v", err) + } + + return NewDNSPacketConn(conn, addr, baseDomain), nil + } + + return nil, fmt.Errorf("invalid transport type configured") + } + + return &Requester{ + dialTransport: dialTransport, + dialer: config.dialTransport(), + remoteAddr: addr, + pubkey: config.Pubkey, + }, nil +} + +// Send the payload together with noise handshake, returns noise recvCipher for decrypting response +func (r *Requester) sendHandshake(payload []byte) (*noise.CipherState, *noise.CipherState, error) { + config := encryption.NewConfig() + config.Initiator = true + config.PeerStatic = r.pubkey + handshakeState, err := noise.NewHandshakeState(config) + if err != nil { + return nil, nil, err + } + msgToSend, recvCipher, sendCipher, err := handshakeState.WriteMessage(nil, payload) + if err != nil { + return nil, nil, err + } + msgToSend, err = msgformat.AddRequestFormat([]byte(msgToSend)) + if err != nil { + return nil, nil, err + } + _, err = r.transport.WriteTo(msgToSend, r.remoteAddr) + if err != nil { + return nil, nil, err + } + return recvCipher, sendCipher, nil +} + +// SetDialer sets a custom dialer for the underlying TCP/UDP transport +func (r *Requester) SetDialer(dialer DialFunc) error { + if dialer == nil { + return fmt.Errorf("no dialer provided") + } + + r.dialer = dialer + return nil +} + +func (r *Requester) RequestAndRecv(sendBytes []byte) ([]byte, error) { + if r.transport == nil { + transport, err := r.dialTransport(r.dialer) + if err != nil { + return nil, fmt.Errorf("error dialing transport: %v", err) + } + + r.transport = transport + } + + recvCipher, _, err := r.sendHandshake(sendBytes) + if err != nil { + return nil, err + } + + var recvBuf [4096]byte + for { + _, recvAddr, err := r.transport.ReadFrom(recvBuf[:]) + if err != nil { + return nil, err + } + if recvAddr.String() == r.remoteAddr.String() { + break + } + } + + encryptedBuf, err := msgformat.RemoveResponseFormat(recvBuf[:]) + if err != nil { + return nil, err + } + + recvBytes, err := recvCipher.Decrypt(nil, nil, encryptedBuf) + if err != nil { + return nil, err + } + + return recvBytes, nil +} + +func (r *Requester) Close() error { + return r.transport.Close() +} + +// sampleUTLSDistribution parses a weighted uTLS Client Hello ID distribution +// string of the form "3*Firefox,2*Chrome,1*iOS", matches each label to a +// utls.ClientHelloID from utlsClientHelloIDMap, and randomly samples one +// utls.ClientHelloID from the distribution. +func sampleUTLSDistribution(spec string) (*utls.ClientHelloID, error) { + weights, labels, err := parseWeightedList(spec) + if err != nil { + return nil, err + } + ids := make([]*utls.ClientHelloID, 0, len(labels)) + for _, label := range labels { + var id *utls.ClientHelloID + if label == "none" { + id = nil + } else { + id = utlsLookup(label) + if id == nil { + return nil, fmt.Errorf("unknown TLS fingerprint %q", label) + } + } + ids = append(ids, id) + } + return ids[sampleWeighted(weights)], nil +} diff --git a/pkg/registrars/dns-registrar/requester/tls.go b/pkg/registrars/dns-registrar/requester/tls.go new file mode 100644 index 00000000..727811f7 --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/tls.go @@ -0,0 +1,134 @@ +package requester + +import ( + "bufio" + "context" + "encoding/binary" + "io" + "log" + "net" + "sync" + "time" + + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/queuepacketconn" +) + +const dialTimeout = 30 * time.Second + +// TLSPacketConn is a TLS- and TCP-based transport for DNS messages, used for +// DNS over TLS (DoT). Its WriteTo and ReadFrom methods exchange DNS messages +// over a TLS channel, prefixing each message with a two-octet length field as +// in DNS over TCP. +// +// TLSPacketConn deals only with already formatted DNS messages. It does not +// handle encoding information into the messages. That is rather the +// responsibility of DNSPacketConn. +// +// https://tools.ietf.org/html/rfc7858 +type TLSPacketConn struct { + // QueuePacketConn is the direct receiver of ReadFrom and WriteTo calls. + // recvLoop and sendLoop take the messages out of the receive and send + // queues and actually put them on the network. + *queuepacketconn.QueuePacketConn +} + +// NewTLSPacketConn creates a new TLSPacketConn configured to use the TLS +// server at addr as a DNS over TLS resolver. It maintains a TLS connection to +// the resolver, reconnecting as necessary. It closes the connection if any +// reconnection attempt fails. +func NewTLSPacketConn(addr string, dialTLSContext func(ctx context.Context, network, addr string) (net.Conn, error)) (*TLSPacketConn, error) { + dial := func() (net.Conn, error) { + ctx, cancel := context.WithTimeout(context.Background(), dialTimeout) + defer cancel() + return dialTLSContext(ctx, "tcp", addr) + } + // We maintain one TLS connection at a time, redialing it whenever it + // becomes disconnected. We do the first dial here, outside the + // goroutine, so that any immediate and permanent connection errors are + // reported directly to the caller of NewTLSPacketConn. + conn, err := dial() + if err != nil { + return nil, err + } + c := &TLSPacketConn{ + QueuePacketConn: queuepacketconn.NewQueuePacketConn(queuepacketconn.DummyAddr{}, 0), + } + go func() { + defer c.Close() + for { + var wg sync.WaitGroup + wg.Add(2) + go func() { + err := c.recvLoop(conn) + if err != nil { + log.Printf("recvLoop: %v", err) + } + wg.Done() + }() + go func() { + err := c.sendLoop(conn) + if err != nil { + log.Printf("sendLoop: %v", err) + } + wg.Done() + }() + wg.Wait() + conn.Close() + + // Whenever the TLS connection dies, redial a new one. + conn, err = dial() + if err != nil { + log.Printf("dial tls: %v", err) + break + } + } + }() + return c, nil +} + +// recvLoop reads length-prefixed messages from conn and passes them to the +// incoming queue. +func (c *TLSPacketConn) recvLoop(conn net.Conn) error { + br := bufio.NewReader(conn) + for { + var length uint16 + err := binary.Read(br, binary.BigEndian, &length) + if err != nil { + if err == io.EOF { + err = nil + } + return err + } + p := make([]byte, int(length)) + _, err = io.ReadFull(br, p) + if err != nil { + return err + } + c.QueuePacketConn.QueueIncoming(p, queuepacketconn.DummyAddr{}) + } +} + +// sendLoop reads messages from the outgoing queue and writes them, +// length-prefixed, to conn. +func (c *TLSPacketConn) sendLoop(conn net.Conn) error { + bw := bufio.NewWriter(conn) + for p := range c.QueuePacketConn.OutgoingQueue(queuepacketconn.DummyAddr{}) { + length := uint16(len(p)) + if int(length) != len(p) { + panic(len(p)) + } + err := binary.Write(bw, binary.BigEndian, &length) + if err != nil { + return err + } + _, err = bw.Write(p) + if err != nil { + return err + } + err = bw.Flush() + if err != nil { + return err + } + } + return nil +} diff --git a/pkg/registrars/dns-registrar/requester/utls.go b/pkg/registrars/dns-registrar/requester/utls.go new file mode 100644 index 00000000..26d00e3e --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/utls.go @@ -0,0 +1,270 @@ +package requester + +// Support code for TLS camouflage using uTLS. + +import ( + "context" + "crypto/tls" + "fmt" + "net" + "net/http" + "net/url" + "strings" + "sync" + + utls "github.com/refraction-networking/utls" + "golang.org/x/net/http2" +) + +// utlsClientHelloIDMap is a correspondence between human-readable labels and +// supported utls.ClientHelloIDs. +var utlsClientHelloIDMap = []struct { + Label string + ID *utls.ClientHelloID +}{ + {"Firefox", &utls.HelloFirefox_Auto}, + {"Firefox_55", &utls.HelloFirefox_55}, + {"Firefox_56", &utls.HelloFirefox_56}, + {"Firefox_63", &utls.HelloFirefox_63}, + {"Firefox_65", &utls.HelloFirefox_65}, + {"Chrome", &utls.HelloChrome_Auto}, + {"Chrome_58", &utls.HelloChrome_58}, + {"Chrome_62", &utls.HelloChrome_62}, + {"Chrome_70", &utls.HelloChrome_70}, + {"Chrome_72", &utls.HelloChrome_72}, + {"Chrome_83", &utls.HelloChrome_83}, + {"iOS", &utls.HelloIOS_Auto}, + {"iOS_11_1", &utls.HelloIOS_11_1}, + {"iOS_12_1", &utls.HelloIOS_12_1}, +} + +// utlsLookup returns a *utls.ClientHelloID from utlsClientHelloIDMap by a +// case-insensitive label match, or nil if there is no match. +func utlsLookup(label string) *utls.ClientHelloID { + for _, entry := range utlsClientHelloIDMap { + if strings.EqualFold(label, entry.Label) { + return entry.ID + } + } + return nil +} + +// utlsDialContext connects to the given network address and initiates a TLS +// handshake with the provided ClientHelloID, and returns the resulting TLS +// connection. +func utlsDialContext(ctx context.Context, network, addr string, config *utls.Config, id *utls.ClientHelloID, tcpDialContex func(context.Context, string, string) (net.Conn, error)) (*utls.UConn, error) { + // Set the SNI from addr, if not already set. + if config == nil { + config = &utls.Config{} + } + if config.ServerName == "" { + config = config.Clone() + host, _, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + config.ServerName = host + } + conn, err := tcpDialContex(ctx, network, addr) + if err != nil { + return nil, err + } + uconn := utls.UClient(conn, config, *id) + // Manually remove the SNI if it contains an IP address. + // https://github.com/refraction-networking/utls/issues/96 + if net.ParseIP(config.ServerName) != nil { + err := uconn.RemoveSNIExtension() + if err != nil { + uconn.Close() + return nil, err + } + } + // We must call Handshake before returning, or else the UConn may not + // actually use the selected ClientHelloID. It depends on whether a Read + // or a Write happens first. If a Read happens first, the connection + // will use the normal crypto/tls fingerprint. If a Write happens first, + // it will use the selected fingerprint as expected. + // https://github.com/refraction-networking/utls/issues/75 + err = uconn.Handshake() + if err != nil { + uconn.Close() + return nil, err + } + return uconn, nil +} + +// The goal of utlsRoundTripper is: provide an http.RoundTripper abstraction +// that retains the features of http.Transport (e.g., persistent connections and +// HTTP/2 support), while making TLS connections using uTLS in place of +// crypto/tls. The challenge is: while http.Transport provides a DialTLSContext +// hook, setting it to non-nil disables automatic HTTP/2 support in the client. +// Most of the uTLS fingerprints contain an ALPN extension containing "h2"; +// i.e., they declare support for HTTP/2. If the server also supports HTTP/2, +// then uTLS may negotiate an HTTP/2 connection without the http.Transport +// knowing it, which leads to an HTTP/1.1 client speaking to an HTTP/2 server, a +// protocol error. +// +// The code here uses an idea adapted from meek_lite in obfs4proxy: +// https://gitlab.com/yawning/obfs4/commit/4d453dab2120082b00bf6e63ab4aaeeda6b8d8a3 +// Instead of setting DialTLSContext on an http.Transport and exposing it +// directly, we expose a wrapper type, utlsRoundTripper, which contains within +// it either an http.Transport or an http2.Transport. The first time a caller +// calls RoundTrip on the wrapper, we initiate a uTLS connection +// (bootstrapConn), then peek at the ALPN-negotiated protocol: if "h2", create +// an internal http2.Transport; otherwise, create an internal http.Transport. In +// either case, set DialTLSContext (or DialTLS for http2.Transport) on the +// created Transport to a function that dials using uTLS. As a special case, the +// first time the DialTLS callback is called, it reuses bootstrapConn (the one +// made to peek at the ALPN), rather than make a new connection. +// +// Subsequent calls to RoundTripper on the wrapper just pass the requests though +// the previously created http.Transport or http2.Transport. We assume that in +// future RoundTrips, the ALPN-negotiated protocol will remain the same as it +// was in the initial RoundTrip. At this point it is the http.Transport or +// http2.Transport calling DialTLSContext, not us, so we cannot dynamically swap +// the underlying transport based on the ALPN. +// +// https://bugs.torproject.org/tpo/anti-censorship/pluggable-transports/meek/29077 +// https://github.com/refraction-networking/utls/issues/16 + +// utlsRoundTripper is an http.RoundTripper that uses uTLS (with a specified +// ClientHelloID) to make TLS connections. +// +// Can only be reused among servers which negotiate the same ALPN. +type utlsRoundTripper struct { + clientHelloID *utls.ClientHelloID + config *utls.Config + innerLock sync.Mutex + inner http.RoundTripper + tcpDialContext func(ctx context.Context, network, addr string) (net.Conn, error) +} + +// NewUTLSRoundTripper creates a utlsRoundTripper with the given TLS +// configuration and ClientHelloID. +func NewUTLSRoundTripper(config *utls.Config, id *utls.ClientHelloID, tcpDialContext func(ctx context.Context, network, addr string) (net.Conn, error)) *utlsRoundTripper { + return &utlsRoundTripper{ + clientHelloID: id, + config: config, + tcpDialContext: tcpDialContext, + // inner will be set in the first call to RoundTrip. + } +} + +func (rt *utlsRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + switch req.URL.Scheme { + case "http": + // If http, don't invoke uTLS; just pass it to an ordinary http.Transport. + transport := http.DefaultTransport.(*http.Transport).Clone() + transport.DialContext = rt.tcpDialContext + return transport.RoundTrip(req) + case "https": + default: + return nil, fmt.Errorf("unsupported URL scheme %q", req.URL.Scheme) + } + + var err error + rt.innerLock.Lock() + if rt.inner == nil { + // On the first call, make an http.Transport or http2.Transport + // as appropriate. + rt.inner, err = makeRoundTripper(req, rt.config, rt.clientHelloID, rt.tcpDialContext) + } + rt.innerLock.Unlock() + if err != nil { + return nil, err + } + + // Forward the request to the inner http.Transport or http2.Transport. + return rt.inner.RoundTrip(req) +} + +// makeRoundTripper makes a bootstrap TLS configuration using the given TLS +// configuration and ClientHelloID, and creates an http.Transport or +// http2.Transport, depending on the negotated ALPN. The Transport is set up to +// make future TLS connections using the same TLS configuration and +// ClientHelloID. +func makeRoundTripper(req *http.Request, config *utls.Config, id *utls.ClientHelloID, tcpDialContext func(ctx context.Context, network, addr string) (net.Conn, error)) (http.RoundTripper, error) { + addr, err := addrForDial(req.URL) + if err != nil { + return nil, err + } + + bootstrapConn, err := utlsDialContext(req.Context(), "tcp", addr, config, id, tcpDialContext) + if err != nil { + return nil, err + } + + // Peek at the ALPN-negotiated protocol. + protocol := bootstrapConn.ConnectionState().NegotiatedProtocol + + // Protects bootstrapConn. + var lock sync.Mutex + // This is the callback for future dials done by the inner + // http.Transport or http2.Transport. + dialTLSContext := func(ctx context.Context, network, addr string) (net.Conn, error) { + lock.Lock() + defer lock.Unlock() + + // On the first dial, reuse bootstrapConn. + if bootstrapConn != nil { + uconn := bootstrapConn + bootstrapConn = nil + return uconn, nil + } + + // Later dials make a new connection. + uconn, err := utlsDialContext(ctx, "tcp", addr, config, id, tcpDialContext) + if err != nil { + return nil, err + } + if uconn.ConnectionState().NegotiatedProtocol != protocol { + return nil, fmt.Errorf("unexpected switch from ALPN %q to %q", + protocol, uconn.ConnectionState().NegotiatedProtocol) + } + + return uconn, nil + } + + // Construct an http.Transport or http2.Transport depending on ALPN. + switch protocol { + case http2.NextProtoTLS: + // Unfortunately http2.Transport does not expose the same + // configuration options as http.Transport with regard to + // timeouts, etc., so we are at the mercy of the defaults. + // https://github.com/golang/go/issues/16581 + return &http2.Transport{ + DialTLS: func(network, addr string, _ *tls.Config) (net.Conn, error) { + // Ignore the *tls.Config parameter; use our + // static config instead. + return dialTLSContext(context.Background(), network, addr) + }, + }, nil + default: + // With http.Transport, copy important default fields from + // http.DefaultTransport, such as TLSHandshakeTimeout and + // IdleConnTimeout, before overriding DialTLSContext. + tr := http.DefaultTransport.(*http.Transport).Clone() + tr.DialTLSContext = dialTLSContext + return tr, nil + } +} + +// addrForDial extracts a host:port address from a URL, suitable for dialing. +func addrForDial(url *url.URL) (string, error) { + host := url.Hostname() + // net/http would use golang.org/x/net/idna here, to convert a possible + // internationalized domain name to ASCII. + port := url.Port() + if port == "" { + // No port? Use the default for the scheme. + switch url.Scheme { + case "http": + port = "80" + case "https": + port = "443" + default: + return "", fmt.Errorf("unsupported URL scheme %q", url.Scheme) + } + } + return net.JoinHostPort(host, port), nil +} diff --git a/pkg/registrars/dns-registrar/requester/weightedlist.go b/pkg/registrars/dns-registrar/requester/weightedlist.go new file mode 100644 index 00000000..45d2a5d9 --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/weightedlist.go @@ -0,0 +1,201 @@ +package requester + +// Random selection from weighted distributions, and strings for specifying such +// distributions. + +import ( + cryptorand "crypto/rand" + "encoding/binary" + "fmt" + mathrand "math/rand" + "strconv" + "strings" +) + +// parseWeightedList parses a list of text labels with optional numeric weights, +// and returns parallel slices of weights and labels. If a weight is omitted for +// a label, the weight is 1. +// +// An example weighted list string is "2*apple,orange,10*cookie". This example +// results in the slices [2, 1, 10] and ["apple", "orange", "cookie"]. +// Bytes may be escaped by backslashes. +// +// list ::= entry ("," entry)* +// entry ::= (weight "*")? label +func parseWeightedList(s string) ([]uint32, []string, error) { + const ( + kindEOF = iota + kindComma + kindAsterisk + kindText + kindError + ) + type token struct { + Kind int + Text string + } + + var i int + // nextToken incrementally consumes s and returns tokens. + nextToken := func() token { + if !(i < len(s)) { + return token{Kind: kindEOF} + } + if s[i] == ',' { + i++ + return token{Kind: kindComma} + } + if s[i] == '*' { + i++ + return token{Kind: kindAsterisk} + } + var text strings.Builder + for i < len(s) && s[i] != ',' && s[i] != '*' { + if s[i] == '\\' { + i++ + if !(i < len(s)) { + return token{Kind: kindError, Text: fmt.Sprintf("%q at end of string", s[i])} + } + } + text.WriteByte(s[i]) + i++ + } + return token{Kind: kindText, Text: text.String()} + } + peekToken := func() token { + saved := i + t := nextToken() + i = saved + return t + } + + const ( + stateBeginEntry = iota + stateLabel + stateEndEntry + stateDone + stateUnexpected + ) + + var weights []uint32 + var labels []string + var weightString, label string + var t token + for state := stateBeginEntry; state != stateDone; { + switch state { + // Beginning of a new entry (at the beginning of the input or + // after a comma). + case stateBeginEntry: + t = nextToken() + switch t.Kind { + case kindText: + // If the next token is an asterisk, this text + // represents a weight; otherwise it represents + // a label (with a weight of "1"). + switch peekToken().Kind { + case kindAsterisk: + nextToken() // Consume the asterisk token. + weightString = t.Text + state = stateLabel + default: + weightString = "1" + label = t.Text + state = stateEndEntry + } + default: + state = stateUnexpected + } + // weightString is assigned and we have seen an asterisk, now + // expect a text label. + case stateLabel: + t = nextToken() + switch t.Kind { + case kindText: + label = t.Text + state = stateEndEntry + default: + state = stateUnexpected + } + // weightString and label are assigned, now emit the entry and + // expect a comma or EOF. + case stateEndEntry: + w, err := strconv.ParseUint(weightString, 10, 32) + if err != nil { + return nil, nil, err + } + weights = append(weights, uint32(w)) + labels = append(labels, label) + t = nextToken() + switch t.Kind { + case kindEOF: + state = stateDone + case kindComma: + state = stateBeginEntry + default: + state = stateUnexpected + } + case stateUnexpected: + if t.Kind == kindError { + return nil, nil, fmt.Errorf("%s", t.Text) + } else { + var ttext string + switch t.Kind { + case kindEOF: + ttext = "end of string" + case kindComma: + ttext = "\",\"" + case kindAsterisk: + ttext = "\"*\"" + case kindText: + ttext = fmt.Sprintf("%+q", t.Text) + } + return nil, nil, fmt.Errorf("unexpected %s", ttext) + } + default: + panic(state) + } + } + + return weights, labels, nil +} + +// cryptoSource is a math/rand Source that reads from the crypto/rand Reader. +// The Seed method does not affect the sequence of numbers returned from the +// Int63 method. +type cryptoSource struct{} + +func (s cryptoSource) Seed(_ int64) {} + +func (s cryptoSource) Int63() int64 { + var n int64 + err := binary.Read(cryptorand.Reader, binary.BigEndian, &n) + if err != nil { + panic(err) + } + n &= (1 << 63) - 1 + return n +} + +// sampleWeighted returns the index of a randomly selected element of the +// weights slice, weighted by the values stored in the slice. Panics if +// the sum of the weights is zero or does not fit in an int64. +func sampleWeighted(weights []uint32) int { + var sum int64 = 0 + for _, w := range weights { + sum += int64(w) + if sum < int64(w) { + panic("weights overflow") + } + } + if sum == 0 { + panic("total weight is zero") + } + r := uint64(mathrand.New(&cryptoSource{}).Int63n(sum)) + for i, w := range weights { + if r < uint64(w) { + return i + } + r -= uint64(w) + } + panic("impossible") +} diff --git a/pkg/registrars/dns-registrar/requester/weightedlist_test.go b/pkg/registrars/dns-registrar/requester/weightedlist_test.go new file mode 100644 index 00000000..e45e82ee --- /dev/null +++ b/pkg/registrars/dns-registrar/requester/weightedlist_test.go @@ -0,0 +1,101 @@ +package requester + +import ( + "testing" +) + +func TestParseWeightedList(t *testing.T) { + // Good inputs. + for _, test := range []struct { + input string + expectedWeights []uint32 + expectedLabels []string + }{ + {"a", []uint32{1}, []string{"a"}}, + {"apple", []uint32{1}, []string{"apple"}}, + {"1*apple", []uint32{1}, []string{"apple"}}, + {"apple,2*carrot,1*apple", []uint32{1, 2, 1}, []string{"apple", "carrot", "apple"}}, + {"\\a", []uint32{1}, []string{"a"}}, + {"\\*", []uint32{1}, []string{"*"}}, + {"\\,", []uint32{1}, []string{","}}, + {"3\\*apple\\,car\\rot,100*orange", []uint32{1, 100}, []string{"3*apple,carrot", "orange"}}, + } { + weights, labels, err := parseWeightedList(test.input) + if err != nil { + t.Errorf("%+q resulted in error: %v", test.input, err) + continue + } + i := 0 + for ; i < len(weights) && i < len(labels) && i < len(test.expectedWeights) && i < len(test.expectedLabels); i++ { + if weights[i] != test.expectedWeights[i] { + break + } + if labels[i] != test.expectedLabels[i] { + break + } + } + if i < len(test.expectedWeights) || i < len(test.expectedLabels) { + t.Errorf("%+q: expected %v, %v, got %v, %v", test.input, + test.expectedWeights, test.expectedLabels, weights, labels) + continue + } + } + + // Bad inputs. + for _, input := range []string{ + "", + "apple*1", + ",", + ",apple", + "apple,", + "apple,,carrot", + "*", + "**", + "5*apple*5", + "-5*apple", + "5.5*apple", + } { + _, _, err := parseWeightedList(input) + if err == nil { + t.Errorf("%+q resulted in no error", input) + continue + } + } +} + +func TestSampleWeighted(t *testing.T) { + // Total weight of zero should result in a panic. + for _, weights := range [][]uint32{ + {}, + {0}, + {0, 0, 0, 0, 0}, + } { + func() { + defer func() { + r := recover() + if r == nil { + t.Errorf("%v: expected panic", weights) + } + }() + sampleWeighted(weights) + }() + } + + // If there is only one nonzero weight, it should be always selected. + for _, test := range []struct { + weights []uint32 + index int + }{ + {[]uint32{1}, 0}, + {[]uint32{1, 0, 0, 0, 0}, 0}, + {[]uint32{0, 0, 0, 0, 1}, 4}, + {[]uint32{0, 0, 0xffffffff, 0, 1}, 2}, + } { + for i := 0; i < 100; i++ { + index := sampleWeighted(test.weights) + if index != test.index { + t.Errorf("%v: expected %d, got %d", test.weights, test.index, index) + } + } + } +} diff --git a/pkg/registrars/dns-registrar/responder/responder.go b/pkg/registrars/dns-registrar/responder/responder.go new file mode 100644 index 00000000..e9c73e93 --- /dev/null +++ b/pkg/registrars/dns-registrar/responder/responder.go @@ -0,0 +1,333 @@ +package responder + +import ( + "bytes" + "encoding/base32" + "log" + "net" + + "github.com/flynn/noise" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/dns" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/encryption" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/msgformat" +) + +const ( + // How to set the TTL field in Answer resource records. + responseTTL = 60 +) + +// base32Encoding is a base32 encoding without padding. +var base32Encoding = base32.StdEncoding.WithPadding(base32.NoPadding) + +type Responder struct { + privkey []byte + domain dns.Name + transport net.PacketConn + noiseConfig noise.Config + maxUDPPayload int +} + +// Decrypt the message and pass it to processMsg, then encrypt and return the response. +func (r *Responder) craftResponse(msg []byte, processMsg func([]byte) ([]byte, error)) ([]byte, error) { + handshakeState, err := noise.NewHandshakeState(r.noiseConfig) + if err != nil { + return nil, err + } + payload, sendCipher, _, err := handshakeState.ReadMessage(nil, msg[:]) + + if err != nil { + return nil, err + } + + responseBytes, err := processMsg(payload) + if err != nil { + return nil, err + } + + response, err := sendCipher.Encrypt(nil, nil, responseBytes) + + return response, err + +} + +// responseFor constructs a response dns.Message that is appropriate for query. +// Along with the dns.Message, it returns the query's decoded data payload. If +// the returned dns.Message is nil, it means that there should be no response to +// this query. If the returned dns.Message has an Rcode() of dns.RcodeNoError, +// the message is a candidate for for carrying downstream data in a TXT record. +func (r *Responder) responseFor(query *dns.Message, domain dns.Name) (*dns.Message, []byte) { + resp := &dns.Message{ + ID: query.ID, + Flags: 0x8000, // QR = 1, RCODE = no error + Question: query.Question, + } + + if query.Flags&0x8000 != 0 { + // QR != 0, this is not a query. Don't even send a response. + return nil, nil + } + + // Check for EDNS(0) support. Include our own OPT RR only if we receive + // one from the requester. + // https://tools.ietf.org/html/rfc6891#section-6.1.1 + // "Lack of presence of an OPT record in a request MUST be taken as an + // indication that the requester does not implement any part of this + // specification and that the responder MUST NOT include an OPT record + // in its response." + payloadSize := 0 + for _, rr := range query.Additional { + if rr.Type != dns.RRTypeOPT { + continue + } + if len(resp.Additional) != 0 { + // https://tools.ietf.org/html/rfc6891#section-6.1.1 + // "If a query message with more than one OPT RR is + // received, a FORMERR (RCODE=1) MUST be returned." + resp.Flags |= dns.RcodeFormatError + log.Printf("FORMERR: more than one OPT RR") + return resp, nil + } + resp.Additional = append(resp.Additional, dns.RR{ + Name: dns.Name{}, + Type: dns.RRTypeOPT, + Class: 4096, // responder's UDP payload size + TTL: 0, + Data: []byte{}, + }) + additional := &resp.Additional[0] + + version := (rr.TTL >> 16) & 0xff + if version != 0 { + // https://tools.ietf.org/html/rfc6891#section-6.1.1 + // "If a responder does not implement the VERSION level + // of the request, then it MUST respond with + // RCODE=BADVERS." + resp.Flags |= dns.ExtendedRcodeBadVers & 0xf + additional.TTL = (dns.ExtendedRcodeBadVers >> 4) << 24 + log.Printf("BADVERS: EDNS version %d != 0", version) + return resp, nil + } + + payloadSize = int(rr.Class) + } + if payloadSize < 512 { + // https://tools.ietf.org/html/rfc6891#section-6.1.1 "Values + // lower than 512 MUST be treated as equal to 512." + payloadSize = 512 + } + // We will return RcodeFormatError if payloadSize is too small, but + // first, check the name in order to set the AA bit properly. + + // There must be exactly one question. + if len(query.Question) != 1 { + resp.Flags |= dns.RcodeFormatError + log.Printf("FORMERR: too few or too many questions (%d)", len(query.Question)) + return resp, nil + } + question := query.Question[0] + // Check the name to see if it ends in our chosen domain, and extract + // all that comes before the domain if it does. If it does not, we will + // return RcodeNameError below, but prefer to return RcodeFormatError + // for payload size if that applies as well. + prefix, ok := question.Name.TrimSuffix(domain) + if !ok { + // Not a name we are authoritative for. + resp.Flags |= dns.RcodeNameError + log.Printf("NXDOMAIN: not authoritative for %s", question.Name) + return resp, nil + } + resp.Flags |= 0x0400 // AA = 1 + + if query.Opcode() != 0 { + // We don't support OPCODE != QUERY. + resp.Flags |= dns.RcodeNotImplemented + log.Printf("NOTIMPL: unrecognized OPCODE %d", query.Opcode()) + return resp, nil + } + + if question.Type != dns.RRTypeTXT { + // We only support QTYPE == TXT. + resp.Flags |= dns.RcodeNameError + // No log message here; it's common for recursive resolvers to + // send NS or A queries when the client only asked for a TXT. I + // suspect this is related to QNAME minimization, but I'm not + // sure. https://tools.ietf.org/html/rfc7816 + // log.Printf("NXDOMAIN: QTYPE %d != TXT", question.Type) + return resp, nil + } + + encoded := bytes.ToUpper(bytes.Join(prefix, nil)) + payload := make([]byte, base32Encoding.DecodedLen(len(encoded))) + n, err := base32Encoding.Decode(payload, encoded) + if err != nil { + // Base32 error, make like the name doesn't exist. + resp.Flags |= dns.RcodeNameError + log.Printf("NXDOMAIN: base32 decoding: %v", err) + return resp, nil + } + payload = payload[:n] + + // We require clients to support EDNS(0) with a minimum payload size; + // otherwise we would have to set a small KCP MTU (only around 200 + // bytes). https://tools.ietf.org/html/rfc6891#section-7 "If there is a + // problem with processing the OPT record itself, such as an option + // value that is badly formatted or that includes out-of-range values, a + // FORMERR MUST be returned." + if payloadSize < r.maxUDPPayload { + resp.Flags |= dns.RcodeFormatError + log.Printf("FORMERR: requester payload size %d is too small (minimum %d)", payloadSize, r.maxUDPPayload) + return resp, nil + } + + return resp, payload +} + +// recvLoop repeatedly calls dnsConn.ReadFrom, extracts the packets contained in +// the incoming DNS queries, and puts them on ttConn's incoming queue. Whenever +// a query calls for a response, constructs a partial response and passes it to +// sendLoop over ch. +func (r *Responder) RecvAndRespond(getResponse func([]byte) ([]byte, error)) error { + for { + var buf [4096]byte + n, addr, err := r.transport.ReadFrom(buf[:]) + if err != nil { + if err, ok := err.(net.Error); ok { + log.Printf("ReadFrom error: %v", err) + continue + } + return err + } + + // Parse message and respond + go func() { + // Got a UDP packet. Try to parse it as a DNS message. + query, err := dns.MessageFromWireFormat(buf[:n]) + if err != nil { + log.Printf("cannot parse DNS query: %v", err) + } + + resp, payload := r.responseFor(&query, r.domain) + if resp == nil { + return + } + + var responseBuf []byte + + // invalid msg if returned payload is empty, do not process + if payload != nil { + payload, err = msgformat.RemoveRequestFormat(payload) + if err != nil { + log.Printf("RemoveFormat err: %v", err) + return + } + + responseBuf, err = r.craftResponse(payload, getResponse) + if err != nil { + log.Printf("craftResponse err: %v", err) + return + } + + responseBuf, err = msgformat.AddResponseFormat(responseBuf) + if err != nil { + log.Printf("AddFormat err: %v", err) + return + } + } + + responsePayload, err := r.dnsRespToUDPResp(resp, responseBuf) + if err != nil { + log.Printf("dnsRespToUDPResp err: %v", err) + return + } + + if len(responsePayload) > r.maxUDPPayload { + log.Printf("ERR: Response UDP payload length [%d] exceed maxUDPPayload size [%d], responding with empty response.", len(responsePayload), r.maxUDPPayload) + responsePayload, err = r.dnsRespToUDPResp(resp, []byte{}) + if err != nil { + log.Printf("dnsRespToUDPResp err: %v", err) + return + } + } + + _, err = r.transport.WriteTo(responsePayload, addr) + if err != nil { + log.Printf("WriteTo err: %v", err) + } + }() + } +} + +// Put response payload into DNS answer ready to send +func (r *Responder) dnsRespToUDPResp(resp *dns.Message, response []byte) ([]byte, error) { + if resp.Rcode() == dns.RcodeNoError && len(resp.Question) == 1 { + // If it's a non-error response, we can fill the Answer + // section with downstream packets. + + // Any changes to how responses are built need to happen + // also in computeMaxEncodedPayload. + resp.Answer = []dns.RR{ + { + Name: resp.Question[0].Name, + Type: resp.Question[0].Type, + Class: resp.Question[0].Class, + TTL: responseTTL, + Data: nil, // will be filled in below + }, + } + + resp.Answer[0].Data = dns.EncodeRDataTXT(response) + } + + buf, err := resp.WireFormat() + if err != nil { + log.Printf("resp WireFormat: %v", err) + return nil, err + } + + return buf, nil +} + +func NewDnsResponder(domain string, listenAddr string, privkey []byte) (*Responder, error) { + noiseConfig := encryption.NewConfig() + noiseConfig.Initiator = false + noiseConfig.StaticKeypair = noise.DHKey{ + Private: privkey, + Public: encryption.PubkeyFromPrivkey(privkey), + } + + basename, err := dns.ParseName(domain) + if err != nil { + return nil, err + } + + dnsConn, err := net.ListenPacket("udp", listenAddr) + if err != nil { + return nil, err + } + + // We don't send UDP payloads larger than this, in an attempt to avoid + // network-layer fragmentation. 1280 is the minimum IPv6 MTU, 40 bytes + // is the size of an IPv6 header (though without any extension headers), + // and 8 bytes is the size of a UDP header. + // + // https://dnsflagday.net/2020/#message-size-considerations + // "An EDNS buffer size of 1232 bytes will avoid fragmentation on nearly + // all current networks." + // + // On 2020-04-19, the Quad9 resolver was seen to have a UDP payload size + // of 1232. Cloudflare's was 1452, and Google's was 4096. + maxUDPPayload := 1280 - 40 - 8 + + return &Responder{ + domain: basename, + transport: dnsConn, + privkey: privkey, + noiseConfig: noiseConfig, + maxUDPPayload: maxUDPPayload, + }, nil +} + +func (r *Responder) Close() error { + return r.transport.Close() +} diff --git a/pkg/registrars/registration/api-registrar.go b/pkg/registrars/registration/api-registrar.go new file mode 100644 index 00000000..881b0ffc --- /dev/null +++ b/pkg/registrars/registration/api-registrar.go @@ -0,0 +1,232 @@ +package registration + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "strconv" + "time" + + pb "github.com/refraction-networking/conjure/proto" + "github.com/refraction-networking/gotapdance/tapdance" + "github.com/sirupsen/logrus" + "google.golang.org/protobuf/proto" +) + +// Registration strategy using a centralized REST API to +// create registrations. Only the Endpoint need be specified; +// the remaining fields are valid with their zero values and +// provide the opportunity for additional control over the process. +type APIRegistrar struct { + // endpoint to use in registration request + endpoint string + + // HTTP client to use in request + client *http.Client + + // Wether registrations should be bidirectional + bidirectional bool + + // Length of time to delay after confirming successful + // registration before attempting a connection, + // allowing for propagation throughout the stations. + connectionDelay time.Duration + + // Maximum number of retries before giving up + maxRetries int + + // A secondary registration method to use on failure. + // Because the API registration can give us definite + // indication of a failure to register, this can be + // used as a "backup" in the case of the API being + // down or being blocked. + // + // If this field is nil, no secondary registration will + // be attempted. If it is non-nil, after failing to register + // (retrying MaxRetries times) we will fall back to + // the Register method on this field. + secondaryRegistrar tapdance.Registrar + + // Logger to use. + logger logrus.FieldLogger +} + +func NewAPIRegistrar(config *Config) (*APIRegistrar, error) { + return &APIRegistrar{ + endpoint: config.Target, + bidirectional: config.Bidirectional, + connectionDelay: config.Delay, + maxRetries: config.MaxRetries, + secondaryRegistrar: config.SecondaryRegistrar, + client: config.HTTPClient, + logger: tapdance.Logger().WithField("registrar", "API"), + }, nil +} + +// registerUnidirectional sends unidirectional registration data to the registration server +func (r *APIRegistrar) registerUnidirectional(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error) { + logger := r.logger.WithFields(logrus.Fields{"type": "unidirectional", "sessionID": cjSession.IDString()}) + + reg, protoPayload, err := cjSession.UnidirectionalRegData(pb.RegistrationSource_API.Enum()) + if err != nil { + logger.Errorf("Failed to prepare registration data: %v", err) + return nil, ErrRegFailed + } + + payload, err := proto.Marshal(protoPayload) + if err != nil { + logger.Errorf("failed to marshal ClientToStation payload: %v", err) + return nil, ErrRegFailed + } + + r.setHTTPClient(reg) + + for tries := 0; tries < r.maxRetries+1; tries++ { + logger := logger.WithField("attempt", strconv.Itoa(tries+1)+"/"+strconv.Itoa(r.maxRetries+1)) + err = r.executeHTTPRequest(ctx, payload, logger) + if err != nil { + logger.Warnf("error in registration attempt: %v", err) + continue + } + logger.Debugf("registration succeeded") + return reg, nil + } + + // If we make it here, we failed API registration + logger.WithField("attempts", r.maxRetries+1).Warnf("all registration attempt(s) failed") + + if r.secondaryRegistrar != nil { + logger.Debugf("trying secondary registration method") + return r.secondaryRegistrar.Register(cjSession, ctx) + } + + return nil, ErrRegFailed +} + +// registerBidirectional sends bidirectional registration data to the registration server and reads the response +func (r *APIRegistrar) registerBidirectional(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error) { + logger := r.logger.WithFields(logrus.Fields{"type": "bidirectional", "sessionID": cjSession.IDString()}) + + reg, protoPayload, err := cjSession.BidirectionalRegData(pb.RegistrationSource_BidirectionalAPI.Enum()) + if err != nil { + logger.Errorf("Failed to prepare registration data: %v", err) + return nil, ErrRegFailed + } + + payload, err := proto.Marshal(protoPayload) + if err != nil { + logger.Errorf("failed to marshal ClientToStation payload: %v", err) + return nil, ErrRegFailed + } + + r.setHTTPClient(reg) + + for tries := 0; tries < r.maxRetries+1; tries++ { + logger := logger.WithField("attempt", strconv.Itoa(tries+1)+"/"+strconv.Itoa(r.maxRetries+1)) + + regResp, err := r.executeHTTPRequestBidirectional(ctx, payload, logger) + if err != nil { + logger.Warnf("error in registration attempt: %v", err) + continue + } + + reg.UnpackRegResp(regResp) + return reg, nil + } + + // If we make it here, we failed API registration + logger.WithField("attempts", r.maxRetries+1).Warnf("all registration attempt(s) failed") + + if r.secondaryRegistrar != nil { + logger.Debugf("trying secondary registration method") + return r.secondaryRegistrar.Register(cjSession, ctx) + } + + return nil, ErrRegFailed +} + +func (r *APIRegistrar) setHTTPClient(reg *tapdance.ConjureReg) { + if r.client == nil { + // Transports should ideally be re-used for TCP connection pooling, + // but each registration is most likely making precisely one request, + // or if it's making more than one, is most likely due to an underlying + // connection issue rather than an application-level error anyways. + t := http.DefaultTransport.(*http.Transport).Clone() + t.DialContext = reg.Dialer + r.client = &http.Client{Transport: t} + } +} + +func (r APIRegistrar) Register(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error) { + defer sleepWithContext(ctx, r.connectionDelay) + + if r.bidirectional { + return r.registerBidirectional(cjSession, ctx) + } + + return r.registerUnidirectional(cjSession, ctx) + +} + +func (r APIRegistrar) executeHTTPRequest(ctx context.Context, payload []byte, logger logrus.FieldLogger) error { + req, err := http.NewRequestWithContext(ctx, "POST", r.endpoint, bytes.NewReader(payload)) + if err != nil { + logger.Warnf("failed to create HTTP request to registration endpoint %s: %v", r.endpoint, err) + return err + } + + resp, err := r.client.Do(req) + if err != nil { + logger.Warnf("failed to do HTTP request to registration endpoint %s: %v", r.endpoint, err) + return err + } + defer resp.Body.Close() + + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + // logger.Warnf("got non-success response code %d from registration endpoint %v", resp.StatusCode, r.endpoint) + return fmt.Errorf("non-success response code %d on %s", resp.StatusCode, r.endpoint) + } + + return nil +} + +func (r APIRegistrar) executeHTTPRequestBidirectional(ctx context.Context, payload []byte, logger logrus.FieldLogger) (*pb.RegistrationResponse, error) { + // Create an instance of the ConjureReg struct to return; this will hold the updated phantom4 and phantom6 addresses received from registrar response + regResp := &pb.RegistrationResponse{} + // Make new HTTP request with given context, registrar, and paylaod + req, err := http.NewRequestWithContext(ctx, "POST", r.endpoint, bytes.NewReader(payload)) + if err != nil { + logger.Warnf("%v failed to create HTTP request to registration endpoint %s: %v", r.endpoint, err) + return regResp, err + } + + resp, err := r.client.Do(req) + if err != nil { + logger.Warnf("%v failed to do HTTP request to registration endpoint %s: %v", r.endpoint, err) + return regResp, err + } + defer resp.Body.Close() + + // Check that the HTTP request returned a success code + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + // logger.Warnf("got non-success response code %d from registration endpoint %v", resp.StatusCode, r.endpoint) + return regResp, fmt.Errorf("non-success response code %d on %s", resp.StatusCode, r.endpoint) + } + + // Read the HTTP response body into []bytes + bodyBytes, err := io.ReadAll(resp.Body) + if err != nil { + logger.Warnf("error in serializing Registration Response protobuf in bytes: %v", err) + return regResp, err + } + + // Unmarshal response body into Registration Response protobuf + if err = proto.Unmarshal(bodyBytes, regResp); err != nil { + logger.Warnf("error in storing Registration Response protobuf: %v", err) + return regResp, err + } + + return regResp, nil +} diff --git a/pkg/registrars/registration/api-registrar_test.go b/pkg/registrars/registration/api-registrar_test.go new file mode 100644 index 00000000..01ec7beb --- /dev/null +++ b/pkg/registrars/registration/api-registrar_test.go @@ -0,0 +1,145 @@ +package registration + +import ( + "bytes" + "context" + "encoding/binary" + "io" + "net" + "net/http" + "net/http/httptest" + "testing" + + transports "github.com/refraction-networking/conjure/pkg/transports/client" + pb "github.com/refraction-networking/conjure/proto" + "github.com/refraction-networking/gotapdance/tapdance" + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" +) + +func TestAPIRegistrar(t *testing.T) { + tapdance.AssetsSetDir("./assets") + + transports.EnableDefaultTransports() + transport, err := transports.New("min") + require.Nil(t, err) + + session := tapdance.MakeConjureSession("1.2.3.4:1234", transport) + + server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Fatalf("incorrect request method: expected POST, got %v", r.Method) + } + + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("failed to read request body: %v", err) + } + + payload := pb.C2SWrapper{} + err = proto.Unmarshal(body, &payload) + if err != nil { + t.Fatalf("failed to decode request body: %v", err) + } + + if payload.RegistrationPayload.GetCovertAddress() != "1.2.3.4:1234" { + t.Fatalf("incorrect covert address: expected 1.2.3.4:1234, got %s", payload.RegistrationPayload.GetCovertAddress()) + } + + if !bytes.Equal(payload.GetSharedSecret(), session.Keys.SharedSecret) { + t.Fatalf("incorrect shared secret: expected %v, got %v", session.Keys.SharedSecret, payload.GetSharedSecret()) + } + })) + + registrar := APIRegistrar{ + endpoint: server.URL, + client: server.Client(), + bidirectional: false, + logger: logrus.New(), + } + + registrar.Register(session, context.TODO()) + + server.Close() +} + +func TestAPIRegistrarBidirectional(t *testing.T) { + tapdance.AssetsSetDir("./assets") + transports.EnableDefaultTransports() + transport, err := transports.New("min") + require.Nil(t, err) + // Make Conjure session with covert address + session := tapdance.MakeConjureSession("1.2.3.4:1234", transport) + addr4 := binary.BigEndian.Uint32(net.ParseIP("127.0.0.1").To4()) + addr6 := net.ParseIP("2001:48a8:687f:1:41d3:ff12:45b:73c8") + var port uint32 = 80 + + // Create mock server + server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Check that method is what we expect + if r.Method != "POST" { + t.Fatalf("incorrect request method: expected POST, got %v", r.Method) + } + + // Read in request as server + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("failed to read request body: %v", err) + } + + // Make payload for registration + payload := pb.C2SWrapper{} + err = proto.Unmarshal(body, &payload) + if err != nil { + t.Fatalf("failed to decode request body: %v", err) + } + + if payload.RegistrationPayload.GetCovertAddress() != "1.2.3.4:1234" { + t.Fatalf("incorrect covert address: expected 1.2.3.4:1234, got %s", payload.RegistrationPayload.GetCovertAddress()) + } + + if !bytes.Equal(payload.GetSharedSecret(), session.Keys.SharedSecret) { + t.Fatalf("incorrect shared secret: expected %v, got %v", session.Keys.SharedSecret, payload.GetSharedSecret()) + } + + regResp := &pb.RegistrationResponse{ + DstPort: &port, + Ipv4Addr: &addr4, + Ipv6Addr: []byte(addr6.To16()), + } + + t.Logf("IPv6 address %v -----> %v", addr6, regResp.Ipv6Addr) + + body, _ = proto.Marshal(regResp) + w.Write(body) + })) + + registrar := APIRegistrar{ + endpoint: server.URL, + client: server.Client(), + bidirectional: true, + logger: logrus.New(), + } + + // register.Register() connects to server set up above and sends registration info + // "response" will store the RegistrationResponse protobuf that the server replies with + response, err := registrar.Register(session, context.TODO()) + if err != nil { + t.Fatalf("bidirectional registrar failed with error: %v", err) + } + + if response.Phantom4() == nil { + t.Fatal("phantom4 is nil") + } else if response.Phantom4().String() != "127.0.0.1" { + t.Fatalf("phantom4 is wrong %v", response.Phantom4().String()) + } + if response.Phantom6() == nil { + t.Fatal("phantom6 is nil") + } else if response.Phantom6().String() != "2001:48a8:687f:1:41d3:ff12:45b:73c8" { + t.Fatalf("%v phantom6 is wrong\n expected: %v", response.Phantom6().String(), "2001:48a8:687f:1:41d3:ff12:45b:73c8") + + } + + server.Close() +} diff --git a/pkg/registrars/registration/config.go b/pkg/registrars/registration/config.go new file mode 100644 index 00000000..cecd7881 --- /dev/null +++ b/pkg/registrars/registration/config.go @@ -0,0 +1,65 @@ +package registration + +import ( + "fmt" + "net/http" + "time" + + "github.com/refraction-networking/gotapdance/tapdance" +) + +type Config struct { + // DNSTransportMethod is the transport method to be used in the DNS registrar + DNSTransportMethod DNSTransportMethodType + + // Target is the target registration addr/url + Target string + + // BaseDomain is the base domain for the DNS request that the responder is authoritative for in the DNS registrar + BaseDomain string + + // Pubkey is the public key for the listening DNS registration server + Pubkey []byte + + // UTLSDistribution allows utls distribution to be specified for the utls connection used during DoH and DoT in the DNS registrar + UTLSDistribution string + + // MaxRetries is the max number of retries a registrar will attempt + MaxRetries int + + // Delay is the delay duration between retries + Delay time.Duration + + // STUNAddr is the address of STUN server used to determine the client's IPv4 address for the DNS registrar + STUNAddr string + + // Bidirectional sets wether the registrar should be bidirectional or unidirectional + Bidirectional bool + + // SecondaryRegistrar is the secondary registrar to use when the main one fails + SecondaryRegistrar tapdance.Registrar + + // HTTPClient is the HTTP client to use for the API registrar + HTTPClient *http.Client +} + +// DNSTransportMethodType declares the DNS transport method to be used +type DNSTransportMethodType int + +const ( + DoH DNSTransportMethodType = iota + DoT + UDP +) + +func validateConfig(config *Config) error { + if config == nil { + return fmt.Errorf("no config provided") + } + + if config.Target == "" { + return fmt.Errorf("no target configured") + } + + return nil +} diff --git a/pkg/registrars/registration/decoy-registrar.go b/pkg/registrars/registration/decoy-registrar.go new file mode 100644 index 00000000..b74ddc63 --- /dev/null +++ b/pkg/registrars/registration/decoy-registrar.go @@ -0,0 +1,107 @@ +package registration + +import ( + "context" + "net" + + pb "github.com/refraction-networking/conjure/proto" + "github.com/refraction-networking/gotapdance/tapdance" + "github.com/sirupsen/logrus" +) + +type DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + +type DecoyRegistrar struct { + + // dialContex is a custom dailer to use when establishing TCP connections + // to decoys. When nil, Dialer.dialContex will be used. + dialContex DialFunc + + logger logrus.FieldLogger +} + +func NewDecoyRegistrar() *DecoyRegistrar { + return &DecoyRegistrar{ + logger: tapdance.Logger(), + } +} + +func NewDecoyRegistrarWithDialer(dialer DialFunc) *DecoyRegistrar { + return &DecoyRegistrar{ + dialContex: dialer, + logger: tapdance.Logger(), + } +} + +func (r DecoyRegistrar) Register(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error) { + logger := r.logger.WithFields(logrus.Fields{"type": "unidirectional", "sessionID": cjSession.IDString()}) + + logger.Debugf("Registering V4 and V6 via DecoyRegistrar") + + reg, _, err := cjSession.UnidirectionalRegData(pb.RegistrationSource_API.Enum()) + if err != nil { + logger.Errorf("Failed to prepare registration data: %v", err) + return nil, ErrRegFailed + } + + // Choose N (width) decoys from decoylist + decoys, err := cjSession.Decoys() + if err != nil { + logger.Warnf("failed to select decoys: %v", err) + return nil, err + } + + if r.dialContex != nil { + reg.Dialer = r.dialContex + } + + // //[TODO]{priority:later} How to pass context to multiple registration goroutines? + if ctx == nil { + ctx = context.Background() + } + + width := uint(len(decoys)) + if width < cjSession.Width { + logger.Warnf("Using width %v (default %v)", width, cjSession.Width) + } + + //[reference] Send registrations to each decoy + dialErrors := make(chan error, width) + for _, decoy := range decoys { + logger.Debugf("Sending Reg: %v, %v", decoy.GetHostname(), decoy.GetIpAddrStr()) + //decoyAddr := decoy.GetIpAddrStr() + go reg.Send(ctx, decoy, dialErrors) + } + + //[reference] Dial errors happen immediately so block until all N dials complete + var unreachableCount uint = 0 + for err := range dialErrors { + if err != nil { + logger.Debugf("%v", err) + if dialErr, ok := err.(tapdance.RegError); ok && dialErr.Code() == tapdance.Unreachable { + // If we failed because ipv6 network was unreachable try v4 only. + unreachableCount++ + if unreachableCount < width { + continue + } else { + break + } + } + } + //[reference] if we succeed or fail for any other reason then the network is reachable and we can continue + break + } + + //[reference] if ALL fail to dial return error (retry in parent if ipv6 unreachable) + if unreachableCount == width { + logger.Debugf("NETWORK UNREACHABLE") + return nil, tapdance.NewRegError(tapdance.Unreachable, "All decoys failed to register -- Dial Unreachable") + } + + // randomized sleeping here to break the intraflow signal + toSleep := reg.GetRandomDuration(3000, 212, 3449) + logger.Debugf("Successfully sent registrations, sleeping for: %v", toSleep) + sleepWithContext(ctx, toSleep) + + return reg, nil +} diff --git a/pkg/registrars/registration/dns-registrar.go b/pkg/registrars/registration/dns-registrar.go new file mode 100644 index 00000000..f2329de8 --- /dev/null +++ b/pkg/registrars/registration/dns-registrar.go @@ -0,0 +1,244 @@ +package registration + +import ( + "context" + "errors" + "fmt" + "net" + "strconv" + "time" + + "github.com/pion/stun" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/requester" + pb "github.com/refraction-networking/conjure/proto" + "github.com/refraction-networking/gotapdance/tapdance" + "github.com/sirupsen/logrus" + "google.golang.org/protobuf/proto" +) + +var ( + ErrRegFailed = errors.New("registration failed") +) + +type DNSRegistrar struct { + req *requester.Requester + maxRetries int + connectionDelay time.Duration + bidirectional bool + ip []byte + logger logrus.FieldLogger +} + +func createRequester(config *Config) (*requester.Requester, error) { + switch config.DNSTransportMethod { + case UDP: + return requester.NewRequester(&requester.Config{ + TransportMethod: requester.UDP, + Target: config.Target, + BaseDomain: config.BaseDomain, + Pubkey: config.Pubkey, + }) + case DoT: + return requester.NewRequester(&requester.Config{ + TransportMethod: requester.DoT, + UtlsDistribution: config.UTLSDistribution, + Target: config.Target, + BaseDomain: config.BaseDomain, + Pubkey: config.Pubkey, + }) + case DoH: + return requester.NewRequester(&requester.Config{ + TransportMethod: requester.DoH, + UtlsDistribution: config.UTLSDistribution, + Target: config.Target, + BaseDomain: config.BaseDomain, + Pubkey: config.Pubkey, + }) + } + + return nil, fmt.Errorf("invalid DNS transport method") +} + +// NewDNSRegistrar creates a DNSRegistrar from config +func NewDNSRegistrar(config *Config) (*DNSRegistrar, error) { + req, err := createRequester(config) + if err != nil { + return nil, fmt.Errorf("error creating requester: %v", err) + } + + ip, err := getPublicIp(config.STUNAddr) + if err != nil { + return nil, fmt.Errorf("failed to get public IP: %v", err) + } + + return &DNSRegistrar{ + req: req, + ip: ip, + maxRetries: config.MaxRetries, + bidirectional: config.Bidirectional, + connectionDelay: config.Delay, + logger: tapdance.Logger().WithField("registrar", "DNS"), + }, nil +} + +// registerUnidirectional sends unidirectional registration data to the registration server +func (r *DNSRegistrar) registerUnidirectional(cjSession *tapdance.ConjureSession) (*tapdance.ConjureReg, error) { + logger := r.logger.WithFields(logrus.Fields{"type": "unidirectional", "sessionID": cjSession.IDString()}) + + reg, protoPayload, err := cjSession.UnidirectionalRegData(pb.RegistrationSource_DNS.Enum()) + if err != nil { + logger.Errorf("Failed to prepare registration data: %v", err) + return nil, ErrRegFailed + } + + if reg.Dialer != nil { + err := r.req.SetDialer(reg.Dialer) + if err != nil { + return nil, fmt.Errorf("failed to set dialer to requester: %v", err) + } + } + + protoPayload.RegistrationAddress = r.ip + + payload, err := proto.Marshal(protoPayload) + if err != nil { + logger.Errorf("failed to marshal ClientToStation payload: %v", err) + return nil, ErrRegFailed + } + + logger.Debugf("DNS payload length: %d", len(payload)) + + for i := 0; i < r.maxRetries+1; i++ { + logger := logger.WithField("attempt", strconv.Itoa(i+1)+"/"+strconv.Itoa(r.maxRetries)) + _, err := r.req.RequestAndRecv(payload) + if err != nil { + logger.Warnf("error in registration attempt: %v", err) + continue + } + + // for unidirectional registration, do not check for response and immediatly return + logger.Debugf("registration succeeded") + return reg, nil + } + + logger.WithField("maxTries", r.maxRetries).Warnf("all registration attempt(s) failed") + + return nil, ErrRegFailed + +} + +// registerBidirectional sends bidirectional registration data to the registration server and reads the response +func (r *DNSRegistrar) registerBidirectional(cjSession *tapdance.ConjureSession) (*tapdance.ConjureReg, error) { + logger := r.logger.WithFields(logrus.Fields{"type": "bidirectional", "sessionID": cjSession.IDString()}) + + reg, protoPayload, err := cjSession.BidirectionalRegData(pb.RegistrationSource_BidirectionalDNS.Enum()) + if err != nil { + logger.Errorf("Failed to prepare registration data: %v", err) + return nil, ErrRegFailed + } + + if reg.Dialer != nil { + err := r.req.SetDialer(reg.Dialer) + if err != nil { + return nil, fmt.Errorf("failed to set dialer to requester: %v", err) + } + } + + protoPayload.RegistrationAddress = r.ip + + payload, err := proto.Marshal(protoPayload) + if err != nil { + logger.Errorf("failed to marshal ClientToStation payload: %v", err) + return nil, ErrRegFailed + } + + logger.Debugf("DNS payload length: %d", len(payload)) + + for i := 0; i < r.maxRetries+1; i++ { + logger := logger.WithField("attempt", strconv.Itoa(i+1)+"/"+strconv.Itoa(r.maxRetries)) + + bdResponse, err := r.req.RequestAndRecv(payload) + if err != nil { + logger.Warnf("error in sending request to DNS registrar: %v", err) + continue + } + + dnsResp := &pb.DnsResponse{} + err = proto.Unmarshal(bdResponse, dnsResp) + if err != nil { + logger.Warnf("error in storing Registrtion Response protobuf: %v", err) + continue + } + if !dnsResp.GetSuccess() { + logger.Warnf("registrar indicates that registration failed") + continue + } + if dnsResp.GetClientconfOutdated() { + logger.Warnf("registrar indicates that ClinetConf is outdated") + } + + err = reg.UnpackRegResp(dnsResp.GetBidirectionalResponse()) + if err != nil { + logger.Warnf("failed to unpack registration response: %v", err) + continue + } + return reg, nil + } + + logger.WithField("maxTries", r.maxRetries).Warnf("all registration attemps failed") + + return nil, ErrRegFailed +} + +// Register prepares and sends the registration request. +func (r *DNSRegistrar) Register(cjSession *tapdance.ConjureSession, ctx context.Context) (*tapdance.ConjureReg, error) { + + defer sleepWithContext(ctx, r.connectionDelay) + + if r.bidirectional { + return r.registerBidirectional(cjSession) + } + return r.registerUnidirectional(cjSession) +} + +func getPublicIp(server string) ([]byte, error) { + + c, err := stun.Dial("udp4", server) + if err != nil { + return nil, errors.New("Failed to connect to STUN server: " + err.Error()) + } + + message := stun.MustBuild(stun.TransactionID, stun.BindingRequest) + + ip := net.IP{} + + err = c.Do(message, func(res stun.Event) { + if res.Error != nil { + err = res.Error + return + } + + var xorAddr stun.XORMappedAddress + err = xorAddr.GetFrom(res.Message) + if err != nil { + return + } + + ip = xorAddr.IP + }) + + if err != nil { + err = errors.New("Failed to get IP address from STUN: " + err.Error()) + } + + return ip.To4(), nil +} + +func sleepWithContext(ctx context.Context, duration time.Duration) { + timer := time.NewTimer(duration) + defer timer.Stop() + select { + case <-timer.C: + case <-ctx.Done(): + } +} diff --git a/pkg/regprocessor/auth_test.go b/pkg/regprocessor/auth_test.go index 42a59f1f..a5aad008 100644 --- a/pkg/regprocessor/auth_test.go +++ b/pkg/regprocessor/auth_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/refraction-networking/conjure/application/transports/wrapping/min" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/min" + pb "github.com/refraction-networking/conjure/proto" ) // TODO: Add monitor to RegProcessor and metrics / logging for connections diff --git a/pkg/regprocessor/regprocessor.go b/pkg/regprocessor/regprocessor.go index f3d65980..18f114db 100644 --- a/pkg/regprocessor/regprocessor.go +++ b/pkg/regprocessor/regprocessor.go @@ -13,9 +13,9 @@ import ( "sync" zmq "github.com/pebbe/zmq4" - "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/pkg/metrics" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/station/lib" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/proto" ) diff --git a/pkg/regprocessor/regprocessor_test.go b/pkg/regprocessor/regprocessor_test.go index 1a7469fc..b73d2121 100644 --- a/pkg/regprocessor/regprocessor_test.go +++ b/pkg/regprocessor/regprocessor_test.go @@ -10,9 +10,9 @@ import ( "google.golang.org/protobuf/proto" zmq "github.com/pebbe/zmq4" - "github.com/refraction-networking/conjure/application/transports/wrapping/min" "github.com/refraction-networking/conjure/pkg/metrics" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/min" + pb "github.com/refraction-networking/conjure/proto" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" ) diff --git a/pkg/apiregserver/apiregserver.go b/pkg/regserver/apiregserver/apiregserver.go similarity index 98% rename from pkg/apiregserver/apiregserver.go rename to pkg/regserver/apiregserver/apiregserver.go index 2581e459..d2df2264 100644 --- a/pkg/apiregserver/apiregserver.go +++ b/pkg/regserver/apiregserver/apiregserver.go @@ -11,10 +11,10 @@ import ( "sync" "github.com/gorilla/mux" - "github.com/refraction-networking/conjure/application/lib" "github.com/refraction-networking/conjure/pkg/metrics" "github.com/refraction-networking/conjure/pkg/regprocessor" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/station/lib" + pb "github.com/refraction-networking/conjure/proto" log "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" ) diff --git a/pkg/apiregserver/apiregserver_test.go b/pkg/regserver/apiregserver/apiregserver_test.go similarity index 99% rename from pkg/apiregserver/apiregserver_test.go rename to pkg/regserver/apiregserver/apiregserver_test.go index 38b57d72..93d9beb1 100644 --- a/pkg/apiregserver/apiregserver_test.go +++ b/pkg/regserver/apiregserver/apiregserver_test.go @@ -17,7 +17,7 @@ import ( zmq "github.com/pebbe/zmq4" "github.com/refraction-networking/conjure/pkg/metrics" "github.com/refraction-networking/conjure/pkg/regprocessor" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" diff --git a/pkg/dnsregserver/dnsregserver.go b/pkg/regserver/dnsregserver/dnsregserver.go similarity index 96% rename from pkg/dnsregserver/dnsregserver.go rename to pkg/regserver/dnsregserver/dnsregserver.go index 06522b9e..a9ea2b67 100644 --- a/pkg/dnsregserver/dnsregserver.go +++ b/pkg/regserver/dnsregserver/dnsregserver.go @@ -7,9 +7,9 @@ import ( "sync/atomic" "github.com/refraction-networking/conjure/pkg/metrics" + "github.com/refraction-networking/conjure/pkg/registrars/dns-registrar/responder" "github.com/refraction-networking/conjure/pkg/regprocessor" - "github.com/refraction-networking/gotapdance/pkg/dns-registrar/responder" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" log "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" ) diff --git a/pkg/dnsregserver/dnsregserver_test.go b/pkg/regserver/dnsregserver/dnsregserver_test.go similarity index 99% rename from pkg/dnsregserver/dnsregserver_test.go rename to pkg/regserver/dnsregserver/dnsregserver_test.go index 990fb950..788255b7 100644 --- a/pkg/dnsregserver/dnsregserver_test.go +++ b/pkg/regserver/dnsregserver/dnsregserver_test.go @@ -10,7 +10,7 @@ import ( "github.com/refraction-networking/conjure/pkg/metrics" "github.com/refraction-networking/conjure/pkg/regprocessor" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" log "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" ) diff --git a/pkg/regserver/overrides/README.md b/pkg/regserver/overrides/README.md new file mode 100644 index 00000000..3af3258f --- /dev/null +++ b/pkg/regserver/overrides/README.md @@ -0,0 +1,6 @@ +# Registration Server Overrides + +This package contains implementations for different ways that the registration server can overrides +the parameters sent by clients. In bidirectional registrations this allows / can allow us to do +things like selecting a phantom using a different algorithm, assign phantoms from a non-public set, +change transport parameters to optimize client connections, etc. diff --git a/pkg/regserver/overrides/overrides.go b/pkg/regserver/overrides/overrides.go new file mode 100644 index 00000000..215fd9a3 --- /dev/null +++ b/pkg/regserver/overrides/overrides.go @@ -0,0 +1,4 @@ +package overrides + +// This package implements the practical overrides for the RegOverrides interface in +// `pkg/core/interfaces` diff --git a/pkg/regserver/overrides/prefix_transport.go b/pkg/regserver/overrides/prefix_transport.go new file mode 100644 index 00000000..b0fd7bfd --- /dev/null +++ b/pkg/regserver/overrides/prefix_transport.go @@ -0,0 +1,216 @@ +package overrides + +/* +This file is intended to be used for assigning values to the clients in bidirectional registrations +handled by the registration-server. Overwrites will only be used (and should only be provided) if +the `allow_registrar_overrides` field in the `ClientToStation` message is set to true. + +*/ +import ( + "bufio" + "crypto/rand" + "errors" + "fmt" + "io" + "math/big" + "os" + "strconv" + "strings" + + "github.com/refraction-networking/conjure/pkg/core/interfaces" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" + "google.golang.org/protobuf/types/known/anypb" +) + +type fieldsToOverwrite struct { + prefix []byte + port int + id int +} + +type prefixIface interface { + // Includes C2SWrapper just in case we ever want to do geoip things with the client address. + // Also this allows us to write / overwrite the transport params that the station will see. + selectPrefix(io.Reader, *pb.C2SWrapper) (*fieldsToOverwrite, bool) +} + +type prefixes []prefixIface + +func (pfs prefixes) selectPrefix(r io.Reader, c2s *pb.C2SWrapper) (*fieldsToOverwrite, bool) { + if len(pfs) == 0 { + return nil, false + } else if len(pfs) == 1 { + return pfs[0].selectPrefix(r, c2s) + } + N := big.NewInt(int64(len(pfs))) + i, err := rand.Int(r, N) + if err != nil { + return nil, false + } + if pfs[int(i.Int64())] == nil { + return nil, false + } + return pfs[int(i.Int64())].selectPrefix(r, c2s) +} + +type barPrefix struct { + max, bar, id, port int + prefix []byte +} + +func (bp barPrefix) selectPrefix(r io.Reader, c2s *pb.C2SWrapper) (*fieldsToOverwrite, bool) { + if bp.bar <= 0 { + return nil, false + } + if bp.max <= 0 { + return nil, false + } + if bp.bar >= bp.max { + return &fieldsToOverwrite{bp.prefix, bp.port, bp.id}, true + } + + N := big.NewInt(int64(bp.max)) + q, err := rand.Int(r, N) + if err != nil { + return nil, false + } + B := big.NewInt(int64(bp.bar)) + if q.Cmp(B) < 0 { + return &fieldsToOverwrite{bp.prefix, bp.port, bp.id}, true + } + return nil, false +} + +func prefixesFromFile(p string) (*prefixes, error) { + fi, err := os.Open(p) + if err != nil { + return nil, err + } + // close fi on exit and check for its returned error + defer func() { + if err := fi.Close(); err != nil { + panic(err) + } + }() + + prefs, err := ParsePrefixes(fi) + if err != nil { + return nil, err + } + + return prefs.prefixes, nil +} + +// PrefixOverride allows the registration server to override the prefix chosen by the client when +// they register using the Prefix transport with `allow_registration_overrides` enabled. +type PrefixOverride struct { + prefixes *prefixes +} + +// ParsePrefixes allows prefix overrides to be parsed from an io.Reader +func ParsePrefixes(conf io.Reader) (*PrefixOverride, error) { + var prefixSelectors = []prefixIface{} + + scanner := bufio.NewScanner(conf) + for scanner.Scan() { + line := scanner.Text() + if len(line) == 0 { + continue + } else if line[0] == '#' { + continue + } + items := strings.Fields(line) + if len(items) != 5 { + return nil, fmt.Errorf("malformed line: %s", line) + } + + max, err0 := strconv.ParseInt(items[0], 0, 0) + bar, err1 := strconv.ParseInt(items[1], 0, 0) + if max == 0 && bar == 0 { + continue + } + id, err2 := strconv.ParseInt(items[2], 0, 0) + port, err3 := strconv.ParseInt(items[3], 0, 0) + for i, err := range []error{err0, err1, err2, err3} { + if err != nil { + return nil, fmt.Errorf("prefix override parse error: (%s) %w", items[i], err) + } + } + + prefixSelectors = append(prefixSelectors, barPrefix{ + int(max), + int(bar), + int(id), + int(port), + []byte(items[4]), + }) + } + return &PrefixOverride{(*prefixes)(&prefixSelectors)}, nil +} + +// NewPrefixTransportOverride returns an object that implements the Override trait specific to when +// the Prefix transport it used. If no path is provided, then a nil Override object will be returned +// along with a nil error as this is expected behavior. +func NewPrefixTransportOverride(prefixesPath string) (interfaces.RegOverride, error) { + if prefixesPath == "" { + return nil, nil + } + p, err := prefixesFromFile(prefixesPath) + if err != nil { + return nil, err + } + + return &PrefixOverride{ + prefixes: p, + }, nil +} + +// Override implements the RegOverride interface. +func (po *PrefixOverride) Override(reg *pb.C2SWrapper, randReader io.Reader) error { + if reg == nil || reg.RegistrationPayload == nil { + return ErrMissingRegistration + } else if reg.RegistrationPayload.GetTransport() != pb.TransportType_Prefix { + return ErrNotPrefixTransport + } else if po.prefixes == nil { + return nil + } + + fields, ok := po.prefixes.selectPrefix(randReader, reg) + if !ok || fields == nil { + return nil + } + + // if we have made it this far we overwrite the prefix even if the new one is empty + params := &pb.PrefixTransportParams{} + err := transports.UnmarshalAnypbTo(reg.RegistrationPayload.GetTransportParams(), params) + if err != nil { + return err + } + params.Prefix = fields.prefix + var i int32 = int32(fields.id) + params.PrefixId = &i + + if reg.RegistrationResponse == nil { + reg.RegistrationResponse = &pb.RegistrationResponse{} + } + + if fields.port > 0 { + p := uint32(fields.port) + reg.RegistrationResponse.DstPort = &p + } + + anypbParams, err := anypb.New(params) + if err != nil { + return err + } + + reg.RegistrationResponse.TransportParams = anypbParams + + return nil +} + +var ( + ErrNotPrefixTransport = errors.New("registration does not use Prefix transport") + ErrMissingRegistration = errors.New("no registration to modify") +) diff --git a/pkg/regserver/overrides/prefix_transport_test.go b/pkg/regserver/overrides/prefix_transport_test.go new file mode 100644 index 00000000..85f504c6 --- /dev/null +++ b/pkg/regserver/overrides/prefix_transport_test.go @@ -0,0 +1,225 @@ +package overrides + +import ( + "bytes" + "encoding/hex" + "io" + "io/fs" + "os" + "strings" + "syscall" + "testing" + + pb "github.com/refraction-networking/conjure/proto" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/types/known/anypb" +) + +func TestOverrideNewPrefix(t *testing.T) { + // no path provided + np, err := NewPrefixTransportOverride("") + require.Nil(t, err) + require.Nil(t, np) + + tmpdir := t.TempDir() + path := tmpdir + "/prefix_tspt.dat" + + // path provided, but file not exist + np, err = NewPrefixTransportOverride(path) + require.Nil(t, np) + e, ok := err.(*fs.PathError) + if ok && e.Err != syscall.ENOENT { + t.Fatalf("errno: %d, expected: %d", e.Err, syscall.ENOENT) + } + + f, err := os.Create(path) + require.Nil(t, err) + + // file exists, but is empty + np, err = NewPrefixTransportOverride(path) + require.Equal(t, np, &PrefixOverride{(*prefixes)(&[]prefixIface{})}) + require.Nil(t, err) + + // file exists, but incorrect format + _, err = f.Write([]byte("100")) + require.Nil(t, err) + np, err = NewPrefixTransportOverride(path) + require.Nil(t, np) + require.ErrorContains(t, err, "malformed line:") + + err = os.Truncate(path, 0) + require.Nil(t, err) + _, err = f.Seek(0, 0) + require.Nil(t, err) + + // file exists and is properly formatted. + _, err = f.Write([]byte("100 10 0x21 80 HTT\n1000 10 0x22 22 SSH")) + require.Nil(t, err) + np, err = NewPrefixTransportOverride(path) + require.Nil(t, err) + require.Equal(t, 2, len(([]prefixIface)(*(np.(*PrefixOverride).prefixes)))) +} + +func TestOverrideSelectPrefix(t *testing.T) { + + notRand := d("000000") + rr := bytes.NewReader(notRand) + + var tests = []struct { + descr string + input string + exPref string + exOk bool + exPort int + rr io.Reader + }{ + {"single prefix", "1000 10 0x21 80 HTT", "HTT", true, 80, rr}, + {"no port override", "1000 10 0x22 -1 Foo", "Foo", true, -1, rr}, + {"guaranteed selection equal", "1 1 0x22 -1 Foo", "Foo", true, -1, rr}, + {"guaranteed selection over", "1 3 0x22 -1 Foo", "Foo", true, -1, rr}, + {"guaranteed non-selection", "1 0 0x22 -1 Foo", "", false, -1, rr}, + {"two prefixes first ignored", "0 0 0x21 80 HTT\n1000 10 0x22 22 SSH", "SSH", true, 22, rr}, + {"two prefixes select first", "1000 10 0x21 80 HTT\n1000 10 0x22 22 SSH", "HTT", true, 80, rr}, + {"two prefixes select second", "1000 10 0x21 80 HTT\n1000 10 0x22 22 SSH", "SSH", true, 22, bytes.NewReader(d("01000000"))}, + {"comment line and single prefix", "#this is a comment\n1000 10 0x22 22 SSH", "SSH", true, 22, rr}, + } + + for _, tt := range tests { + t.Run(tt.descr, func(t *testing.T) { + r := strings.NewReader(tt.input) + prefs, err := ParsePrefixes(r) + require.Nil(t, err) + + require.NotNil(t, prefs) + + p, ok := prefs.prefixes.selectPrefix(tt.rr, nil) + require.Equal(t, tt.exOk, ok) + if !ok { + require.Nil(t, p) + return + } + require.Equal(t, tt.exPref, string(p.prefix)) + require.Equal(t, tt.exPort, p.port) + }) + _, err := rr.Seek(0, io.SeekStart) + require.Nil(t, err) + } +} + +type expected struct { + wantErr bool + wantedErr error + port uint32 + prefix []byte +} + +func TestPrefixOverride_Override(t *testing.T) { + var po = &PrefixOverride{} + var c *pb.C2SWrapper + var out expected + var i = 0 + test := func(t *testing.T) { + i += 1 + rr := bytes.NewReader(d("00000000")) + err := po.Override(c, rr) + + if out.wantErr { + require.ErrorIs(t, err, out.wantedErr, "t.Run %d", i) + return + } + require.Nil(t, err) + require.NotNil(t, c.RegistrationResponse) + require.Equal(t, uint32(out.port), c.RegistrationResponse.GetDstPort()) + // require.Equal(t, out.prefix, c.) + } + + out = expected{true, ErrMissingRegistration, 0, nil} + t.Run("select using uninitialized PrefixOverride", test) + + c = &pb.C2SWrapper{} + T := true + params := &pb.GenericTransportParams{} + p, err := anypb.New(params) + require.Nil(t, err) + + ttMin := pb.TransportType_Min + reg := &pb.ClientToStation{ + AllowRegistrarOverrides: &T, + TransportParams: p, + Transport: &ttMin, + } + c.RegistrationPayload = reg + + out = expected{true, ErrNotPrefixTransport, 0, []byte{}} + t.Run("registration wrong tt and params", test) + + ttPrefix := pb.TransportType_Prefix + paramsPref, _ := anypb.New(&pb.PrefixTransportParams{}) + c.RegistrationPayload.Transport = &ttPrefix + c.RegistrationPayload.TransportParams = paramsPref + + out = expected{true, nil, 0, []byte{}} + t.Run("empty prefix override set", test) + + conf := strings.NewReader("100 1 0x22 22 SSH") + po, err = ParsePrefixes(conf) + require.Nil(t, err) + + out = expected{false, nil, 22, []byte("SSH")} + t.Run("select from single prefix", test) + + conf = strings.NewReader("100 1 0x22 -1 ABC") + po, err = ParsePrefixes(conf) + require.Nil(t, err) + tmpPort := uint32(1024) + c.RegistrationResponse.DstPort = &tmpPort + + out = expected{false, nil, 1024, []byte("ABC")} + t.Run("select prefix with port override disabled", test) +} + +func d(s string) []byte { + x, e := hex.DecodeString(s) + if e != nil { + panic(e) + } + return x +} + +// type out struct { +// id int32 +// port +// } +// type fields struct { +// prefixes *prefixes +// } +// type args struct { +// reg *pb.ClientToStation +// resp *pb.RegistrationResponse +// } +// tests := []struct { +// name string +// fields fields +// args args +// want out +// wantErr bool +// wantedErr error +// }{ +// // TODO: Add test cases. +// } +// for _, tt := range tests { +// t.Run(tt.name, func(t *testing.T) { +// po := &PrefixOverride{ +// prefixes: tt.fields.prefixes, +// } +// err := po.Override(tt.args.reg, tt.args.resp) +// if (err != nil) != tt.wantErr { +// t.Errorf("PrefixOverride.Override() error = %v, wantErr %v", err, tt.wantErr) +// return +// } +// if !reflect.DeepEqual( tt.want) { +// t.Errorf("PrefixOverride.Override() = %v, want %v", got, tt.want) +// } +// }) +// } +// } diff --git a/application/geoip/empty.go b/pkg/station/geoip/empty.go similarity index 100% rename from application/geoip/empty.go rename to pkg/station/geoip/empty.go diff --git a/application/geoip/geoip.go b/pkg/station/geoip/geoip.go similarity index 100% rename from application/geoip/geoip.go rename to pkg/station/geoip/geoip.go diff --git a/application/geoip/geoip_test.go b/pkg/station/geoip/geoip_test.go similarity index 100% rename from application/geoip/geoip_test.go rename to pkg/station/geoip/geoip_test.go diff --git a/application/lib/buffer_conn.go b/pkg/station/lib/buffer_conn.go similarity index 100% rename from application/lib/buffer_conn.go rename to pkg/station/lib/buffer_conn.go diff --git a/application/lib/config.go b/pkg/station/lib/config.go similarity index 100% rename from application/lib/config.go rename to pkg/station/lib/config.go diff --git a/application/lib/config_test.go b/pkg/station/lib/config_test.go similarity index 81% rename from application/lib/config_test.go rename to pkg/station/lib/config_test.go index e27448a4..525fee60 100644 --- a/application/lib/config_test.go +++ b/pkg/station/lib/config_test.go @@ -5,13 +5,14 @@ import ( "testing" "github.com/BurntSushi/toml" + "github.com/refraction-networking/conjure/internal/conjurepath" "github.com/stretchr/testify/require" ) // TestConfigParse double checks to ensure that the identity struct reflection // trick works and that the fields are accessible. func TestConfigParse(t *testing.T) { - os.Setenv("CJ_STATION_CONFIG", "../config.toml") + os.Setenv("CJ_STATION_CONFIG", conjurepath.Root+"/application/config.toml") var c Config _, err := toml.DecodeFile(os.Getenv("CJ_STATION_CONFIG"), &c) diff --git a/application/lib/conjure.go b/pkg/station/lib/conjure.go similarity index 97% rename from application/lib/conjure.go rename to pkg/station/lib/conjure.go index af3aa384..13f6014c 100644 --- a/application/lib/conjure.go +++ b/pkg/station/lib/conjure.go @@ -9,7 +9,7 @@ import ( "golang.org/x/crypto/curve25519" "golang.org/x/crypto/hkdf" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" ) type Obfs4Keys struct { diff --git a/application/lib/detector_channel.go b/pkg/station/lib/detector_channel.go similarity index 93% rename from application/lib/detector_channel.go rename to pkg/station/lib/detector_channel.go index 51de378f..02405623 100644 --- a/application/lib/detector_channel.go +++ b/pkg/station/lib/detector_channel.go @@ -8,7 +8,7 @@ import ( "github.com/go-redis/redis/v8" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/log" ) var client *redis.Client diff --git a/application/lib/phantom_selector.go b/pkg/station/lib/phantom_selector.go similarity index 100% rename from application/lib/phantom_selector.go rename to pkg/station/lib/phantom_selector.go diff --git a/application/lib/phantom_selector_test.go b/pkg/station/lib/phantom_selector_test.go similarity index 100% rename from application/lib/phantom_selector_test.go rename to pkg/station/lib/phantom_selector_test.go diff --git a/application/lib/phantoms.go b/pkg/station/lib/phantoms.go similarity index 100% rename from application/lib/phantoms.go rename to pkg/station/lib/phantoms.go diff --git a/application/lib/phantoms_test.go b/pkg/station/lib/phantoms_test.go similarity index 100% rename from application/lib/phantoms_test.go rename to pkg/station/lib/phantoms_test.go diff --git a/application/lib/proxies.go b/pkg/station/lib/proxies.go similarity index 99% rename from application/lib/proxies.go rename to pkg/station/lib/proxies.go index 8034a9a7..d62f3e8f 100644 --- a/application/lib/proxies.go +++ b/pkg/station/lib/proxies.go @@ -13,7 +13,7 @@ import ( "syscall" "time" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/log" ) const proxyStallTimeout = 30 * time.Second diff --git a/application/lib/proxies_test.go b/pkg/station/lib/proxies_test.go similarity index 99% rename from application/lib/proxies_test.go rename to pkg/station/lib/proxies_test.go index eacb2539..ed2f8e6b 100644 --- a/application/lib/proxies_test.go +++ b/pkg/station/lib/proxies_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/log" ) var errNotExist = errors.New("not implemented") diff --git a/application/lib/registration.go b/pkg/station/lib/registration.go similarity index 99% rename from application/lib/registration.go rename to pkg/station/lib/registration.go index 8d5f9699..8cc7b445 100644 --- a/application/lib/registration.go +++ b/pkg/station/lib/registration.go @@ -14,11 +14,11 @@ import ( "sync" "time" - "github.com/refraction-networking/conjure/application/geoip" - "github.com/refraction-networking/conjure/application/liveness" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/geoip" + "github.com/refraction-networking/conjure/pkg/station/liveness" + "github.com/refraction-networking/conjure/pkg/station/log" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/proto" ) diff --git a/application/lib/registration_config.go b/pkg/station/lib/registration_config.go similarity index 97% rename from application/lib/registration_config.go rename to pkg/station/lib/registration_config.go index 8cf6ad85..2456733f 100644 --- a/application/lib/registration_config.go +++ b/pkg/station/lib/registration_config.go @@ -5,8 +5,8 @@ import ( "regexp" "strconv" - "github.com/refraction-networking/conjure/application/geoip" - "github.com/refraction-networking/conjure/application/liveness" + "github.com/refraction-networking/conjure/pkg/station/geoip" + "github.com/refraction-networking/conjure/pkg/station/liveness" ) // RegConfig contains all configuration options directly related to processing diff --git a/application/lib/registration_config_test.go b/pkg/station/lib/registration_config_test.go similarity index 100% rename from application/lib/registration_config_test.go rename to pkg/station/lib/registration_config_test.go diff --git a/application/lib/registration_ingest.go b/pkg/station/lib/registration_ingest.go similarity index 98% rename from application/lib/registration_ingest.go rename to pkg/station/lib/registration_ingest.go index 13eb8dfe..cf493920 100644 --- a/application/lib/registration_ingest.go +++ b/pkg/station/lib/registration_ingest.go @@ -10,12 +10,12 @@ import ( "sync" "time" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" - "github.com/refraction-networking/conjure/application/liveness" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/liveness" + "github.com/refraction-networking/conjure/pkg/station/log" ) const ( diff --git a/application/lib/registration_ingest_test.go b/pkg/station/lib/registration_ingest_test.go similarity index 86% rename from application/lib/registration_ingest_test.go rename to pkg/station/lib/registration_ingest_test.go index 056ed436..4f454a13 100644 --- a/application/lib/registration_ingest_test.go +++ b/pkg/station/lib/registration_ingest_test.go @@ -6,9 +6,9 @@ import ( "os" "testing" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/log" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" "github.com/stretchr/testify/require" ) @@ -55,26 +55,26 @@ func TestIngestPortHandlingFunctionality(t *testing.T) { require.Nil(t, err) goodCases := []struct { - v uint + v uint t pb.TransportType p *pb.GenericTransportParams expected uint16 }{ // registrations that provide no transport parameters should be allowed so we are backward // compatible with clients from before the addition of the transport parameters field. - {v:randomizeDstPortMinVersion, t: transportType, p: nil, expected: 443}, + {v: randomizeDstPortMinVersion, t: transportType, p: nil, expected: 443}, // Allow transports that support fixed destination port to disable randomization - {v:randomizeDstPortMinVersion, t: transportType, p: &pb.GenericTransportParams{RandomizeDstPort: &fl}, expected: 443}, + {v: randomizeDstPortMinVersion, t: transportType, p: &pb.GenericTransportParams{RandomizeDstPort: &fl}, expected: 443}, // Allow transports that support randomized destination port to enable randomization through // transport parameter in the registration. - {v:randomizeDstPortMinVersion, t: transportType, p: &pb.GenericTransportParams{RandomizeDstPort: &tr}, expected: 444}, + {v: randomizeDstPortMinVersion, t: transportType, p: &pb.GenericTransportParams{RandomizeDstPort: &tr}, expected: 444}, // If a client with a low library version requests randomization it will be ignored as their // client should not support randomization. This is handled by the transport so this is // just an example. - {v:0, t: transportType, p: &pb.GenericTransportParams{RandomizeDstPort: &tr}, expected: 443}, + {v: 0, t: transportType, p: &pb.GenericTransportParams{RandomizeDstPort: &tr}, expected: 443}, } seed, _ := hex.DecodeString("0000000000000000000000000000000000000000000000000000000000000000") diff --git a/application/lib/registration_stats.go b/pkg/station/lib/registration_stats.go similarity index 99% rename from application/lib/registration_stats.go rename to pkg/station/lib/registration_stats.go index 8939545c..edaebb39 100644 --- a/application/lib/registration_stats.go +++ b/pkg/station/lib/registration_stats.go @@ -6,8 +6,8 @@ import ( "sync/atomic" "time" - "github.com/refraction-networking/conjure/application/log" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/station/log" + pb "github.com/refraction-networking/conjure/proto" ) // RegistrationStats track metrics relating to registration management and lifecycle diff --git a/application/lib/registration_test.go b/pkg/station/lib/registration_test.go similarity index 99% rename from application/lib/registration_test.go rename to pkg/station/lib/registration_test.go index 778e66d3..1a1fecee 100644 --- a/application/lib/registration_test.go +++ b/pkg/station/lib/registration_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" ) diff --git a/application/lib/stats.go b/pkg/station/lib/stats.go similarity index 98% rename from application/lib/stats.go rename to pkg/station/lib/stats.go index 879b3d01..6d306bcc 100644 --- a/application/lib/stats.go +++ b/pkg/station/lib/stats.go @@ -7,8 +7,8 @@ import ( "sync/atomic" "time" - "github.com/refraction-networking/conjure/application/log" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/station/log" + pb "github.com/refraction-networking/conjure/proto" ) type stats interface { diff --git a/application/lib/test/phantom_subnets.toml b/pkg/station/lib/test/phantom_subnets.toml similarity index 100% rename from application/lib/test/phantom_subnets.toml rename to pkg/station/lib/test/phantom_subnets.toml diff --git a/application/lib/test/phantom_subnets_update.toml b/pkg/station/lib/test/phantom_subnets_update.toml similarity index 100% rename from application/lib/test/phantom_subnets_update.toml rename to pkg/station/lib/test/phantom_subnets_update.toml diff --git a/application/lib/transports.go b/pkg/station/lib/transports.go similarity index 98% rename from application/lib/transports.go rename to pkg/station/lib/transports.go index 965b873a..4439a75e 100644 --- a/application/lib/transports.go +++ b/pkg/station/lib/transports.go @@ -5,7 +5,7 @@ import ( "context" "net" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/types/known/anypb" ) diff --git a/application/lib/transports_mock.go b/pkg/station/lib/transports_mock.go similarity index 96% rename from application/lib/transports_mock.go rename to pkg/station/lib/transports_mock.go index b3891534..c5c36996 100644 --- a/application/lib/transports_mock.go +++ b/pkg/station/lib/transports_mock.go @@ -4,7 +4,7 @@ import ( "bytes" "net" - pb "github.com/refraction-networking/gotapdance/protobuf" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" ) diff --git a/application/lib/zmq_proxy.go b/pkg/station/lib/zmq_proxy.go similarity index 99% rename from application/lib/zmq_proxy.go rename to pkg/station/lib/zmq_proxy.go index ae28c5e4..6ea08d00 100644 --- a/application/lib/zmq_proxy.go +++ b/pkg/station/lib/zmq_proxy.go @@ -13,7 +13,7 @@ import ( zmq "github.com/pebbe/zmq4" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/log" ) // ZMQConfig - Configuration options relevant to the ZMQ Proxy utility diff --git a/application/lib/zmq_proxy_test.go b/pkg/station/lib/zmq_proxy_test.go similarity index 100% rename from application/lib/zmq_proxy_test.go rename to pkg/station/lib/zmq_proxy_test.go diff --git a/application/liveness/README.md b/pkg/station/liveness/README.md similarity index 100% rename from application/liveness/README.md rename to pkg/station/liveness/README.md diff --git a/application/liveness/cache_lru.go b/pkg/station/liveness/cache_lru.go similarity index 100% rename from application/liveness/cache_lru.go rename to pkg/station/liveness/cache_lru.go diff --git a/application/liveness/cache_map.go b/pkg/station/liveness/cache_map.go similarity index 100% rename from application/liveness/cache_map.go rename to pkg/station/liveness/cache_map.go diff --git a/application/liveness/cache_test.go b/pkg/station/liveness/cache_test.go similarity index 100% rename from application/liveness/cache_test.go rename to pkg/station/liveness/cache_test.go diff --git a/application/liveness/cached.go b/pkg/station/liveness/cached.go similarity index 99% rename from application/liveness/cached.go rename to pkg/station/liveness/cached.go index f2141438..778883d6 100644 --- a/application/liveness/cached.go +++ b/pkg/station/liveness/cached.go @@ -8,7 +8,7 @@ import ( "sync/atomic" "time" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/log" ) // CachedLivenessTester implements LivenessTester interface with caching, diff --git a/application/liveness/liveness.go b/pkg/station/liveness/liveness.go similarity index 99% rename from application/liveness/liveness.go rename to pkg/station/liveness/liveness.go index 363f927d..1750eb89 100644 --- a/application/liveness/liveness.go +++ b/pkg/station/liveness/liveness.go @@ -8,7 +8,7 @@ import ( "sync/atomic" "time" - "github.com/refraction-networking/conjure/application/log" + "github.com/refraction-networking/conjure/pkg/station/log" ) // ErrCachedPhantom provides a constant expected error returned for cached diff --git a/application/liveness/liveness_test.go b/pkg/station/liveness/liveness_test.go similarity index 100% rename from application/liveness/liveness_test.go rename to pkg/station/liveness/liveness_test.go diff --git a/application/liveness/uncached.go b/pkg/station/liveness/uncached.go similarity index 100% rename from application/liveness/uncached.go rename to pkg/station/liveness/uncached.go diff --git a/application/log/logger.go b/pkg/station/log/logger.go similarity index 100% rename from application/log/logger.go rename to pkg/station/log/logger.go diff --git a/application/transports/anypb_nourl.go b/pkg/transports/anypb_nourl.go similarity index 100% rename from application/transports/anypb_nourl.go rename to pkg/transports/anypb_nourl.go diff --git a/application/transports/anypb_nourl_test.go b/pkg/transports/anypb_nourl_test.go similarity index 91% rename from application/transports/anypb_nourl_test.go rename to pkg/transports/anypb_nourl_test.go index 4467cb36..16ee85bf 100644 --- a/application/transports/anypb_nourl_test.go +++ b/pkg/transports/anypb_nourl_test.go @@ -4,8 +4,8 @@ import ( "math/rand" "testing" - "github.com/refraction-networking/conjure/application/transports" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" diff --git a/pkg/transports/client/transports.go b/pkg/transports/client/transports.go new file mode 100644 index 00000000..495f88ed --- /dev/null +++ b/pkg/transports/client/transports.go @@ -0,0 +1,107 @@ +package transports + +import ( + "errors" + + cj "github.com/refraction-networking/conjure/pkg/core/interfaces" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/min" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/obfs4" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/prefix" + pb "github.com/refraction-networking/conjure/proto" +) + +var transportsByName map[string]cj.Transport = make(map[string]cj.Transport) +var transportsByID map[pb.TransportType]cj.Transport = make(map[pb.TransportType]cj.Transport) + +var ( + // ErrAlreadyRegistered error when registering a transport that matches + // an already registered ID or name. + ErrAlreadyRegistered = errors.New("transport already registered") + + // ErrUnknownTransport provided id or name does npt match any enabled + // transport. + ErrUnknownTransport = errors.New("unknown transport") +) + +// New returns a new Transport +func New(name string) (cj.Transport, error) { + transport, ok := transportsByName[name] + if !ok { + return nil, ErrUnknownTransport + } + + return transport, nil +} + +// NewWithParams returns a new Transport and attempts to set the parameters provided +func NewWithParams(name string, params any) (cj.Transport, error) { + transport, ok := transportsByName[name] + if !ok { + return nil, ErrUnknownTransport + } + + err := transport.SetParams(params) + return transport, err +} + +// GetTransportByName returns transport by name +func GetTransportByName(name string) (cj.Transport, bool) { + t, ok := transportsByName[name] + return t, ok +} + +// GetTransportByID returns transport by name +func GetTransportByID(id pb.TransportType) (cj.Transport, bool) { + t, ok := transportsByID[id] + return t, ok +} + +var defaultTransports = []cj.Transport{ + &min.ClientTransport{}, + &obfs4.ClientTransport{}, + &prefix.ClientTransport{}, +} + +// AddTransport adds new transport +func AddTransport(t cj.Transport) error { + name := t.Name() + id := t.ID() + + if _, ok := transportsByName[name]; ok { + return ErrAlreadyRegistered + } else if _, ok := transportsByID[id]; ok { + return ErrAlreadyRegistered + } + + transportsByName[name] = t + transportsByID[id] = t + return nil +} + +// EnableDefaultTransports initializes the library with default transports +func EnableDefaultTransports() error { + var err error + for _, t := range defaultTransports { + err = AddTransport(t) + if err != nil { + return err + } + } + + return nil +} + +func init() { + EnableDefaultTransports() +} + +func ConfigFromTransportType(transportType pb.TransportType, randomizePortDefault bool) (cj.Transport, error) { + switch transportType { + case pb.TransportType_Min: + return &min.ClientTransport{Parameters: &pb.GenericTransportParams{RandomizeDstPort: &randomizePortDefault}}, nil + case pb.TransportType_Obfs4: + return &obfs4.ClientTransport{Parameters: &pb.GenericTransportParams{RandomizeDstPort: &randomizePortDefault}}, nil + default: + return nil, errors.New("unknown transport by TransportType try using TransportConfig") + } +} diff --git a/pkg/transports/client/transports_test.go b/pkg/transports/client/transports_test.go new file mode 100644 index 00000000..11513f2d --- /dev/null +++ b/pkg/transports/client/transports_test.go @@ -0,0 +1,53 @@ +package transports + +import ( + // "net/pipe" + "testing" + + cj "github.com/refraction-networking/conjure/pkg/core/interfaces" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/min" + pb "github.com/refraction-networking/conjure/proto" + "github.com/stretchr/testify/require" +) + +func TestTransportParameterFunctionality(t *testing.T) { + tr := true + fl := false + paramsRandomize := &pb.GenericTransportParams{ + RandomizeDstPort: &tr, + } + paramsStatic := &pb.GenericTransportParams{ + RandomizeDstPort: &fl, + } + + transport := &min.ClientTransport{} + + // If params is unset it returns nil + params := transport.GetParams() + require.Nil(t, params) + + transport.Parameters = paramsRandomize + + // Once params are set it returns a protobuf message that can be cast and parsed or otherwise + // operated upon + params = transport.GetParams() + require.Equal(t, true, params.(*pb.GenericTransportParams).GetRandomizeDstPort()) + + // We can then set the parameters if the proper parameters structure is provided even using + // the generic transport interface. + var gt cj.Transport = transport + err := gt.SetParams(paramsStatic) + require.Nil(t, err) + + // The updated parameters are reflected when we get the parameters, again returning a protobuf + // message that can be cast and parsed or otherwise operated upon. + params = transport.GetParams() + require.Nil(t, err) + require.Equal(t, false, params.(*pb.GenericTransportParams).GetRandomizeDstPort()) + + // if an improper object (any) is provided the cast in min will fail and SetParams will return + // an error. + badParams := struct{}{} + err = gt.SetParams(badParams) + require.EqualError(t, err, "unable to parse params") +} diff --git a/application/transports/obfuscate.go b/pkg/transports/obfuscate.go similarity index 99% rename from application/transports/obfuscate.go rename to pkg/transports/obfuscate.go index 33a8bee6..a5760fde 100644 --- a/application/transports/obfuscate.go +++ b/pkg/transports/obfuscate.go @@ -10,7 +10,7 @@ import ( "fmt" "strconv" - "github.com/refraction-networking/gotapdance/ed25519/extra25519" + "github.com/refraction-networking/conjure/pkg/ed25519/extra25519" "golang.org/x/crypto/curve25519" ) diff --git a/application/transports/obfuscate_test.go b/pkg/transports/obfuscate_test.go similarity index 94% rename from application/transports/obfuscate_test.go rename to pkg/transports/obfuscate_test.go index 32819960..099ee9be 100644 --- a/application/transports/obfuscate_test.go +++ b/pkg/transports/obfuscate_test.go @@ -5,8 +5,8 @@ import ( "crypto/rand" "testing" - "github.com/refraction-networking/gotapdance/ed25519" - "github.com/refraction-networking/gotapdance/ed25519/extra25519" + "github.com/refraction-networking/conjure/pkg/ed25519" + "github.com/refraction-networking/conjure/pkg/ed25519/extra25519" "github.com/stretchr/testify/require" "golang.org/x/crypto/curve25519" ) diff --git a/application/transports/transports.go b/pkg/transports/transports.go similarity index 100% rename from application/transports/transports.go rename to pkg/transports/transports.go diff --git a/application/transports/wrapping/internal/tests/phantom_subnets.toml b/pkg/transports/wrapping/internal/tests/phantom_subnets.toml similarity index 100% rename from application/transports/wrapping/internal/tests/phantom_subnets.toml rename to pkg/transports/wrapping/internal/tests/phantom_subnets.toml diff --git a/application/transports/wrapping/internal/tests/phantom_subnets_min.toml b/pkg/transports/wrapping/internal/tests/phantom_subnets_min.toml similarity index 100% rename from application/transports/wrapping/internal/tests/phantom_subnets_min.toml rename to pkg/transports/wrapping/internal/tests/phantom_subnets_min.toml diff --git a/application/transports/wrapping/internal/tests/tests.go b/pkg/transports/wrapping/internal/tests/tests.go similarity index 95% rename from application/transports/wrapping/internal/tests/tests.go rename to pkg/transports/wrapping/internal/tests/tests.go index e50f984a..f1dd1eea 100644 --- a/application/transports/wrapping/internal/tests/tests.go +++ b/pkg/transports/wrapping/internal/tests/tests.go @@ -6,8 +6,8 @@ import ( "os" "sync" - dd "github.com/refraction-networking/conjure/application/lib" - pb "github.com/refraction-networking/gotapdance/protobuf" + dd "github.com/refraction-networking/conjure/pkg/station/lib" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/grpc/test/bufconn" ) diff --git a/application/transports/wrapping/min/client.go b/pkg/transports/wrapping/min/client.go similarity index 95% rename from application/transports/wrapping/min/client.go rename to pkg/transports/wrapping/min/client.go index 20212f4f..c2fa0f21 100644 --- a/application/transports/wrapping/min/client.go +++ b/pkg/transports/wrapping/min/client.go @@ -5,9 +5,9 @@ import ( "io" "net" - "github.com/refraction-networking/conjure/application/transports" core "github.com/refraction-networking/conjure/pkg/core" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/proto" ) diff --git a/application/transports/wrapping/min/min.go b/pkg/transports/wrapping/min/min.go similarity index 95% rename from application/transports/wrapping/min/min.go rename to pkg/transports/wrapping/min/min.go index e18d6931..536aaeac 100644 --- a/application/transports/wrapping/min/min.go +++ b/pkg/transports/wrapping/min/min.go @@ -5,9 +5,9 @@ import ( "fmt" "net" - cj "github.com/refraction-networking/conjure/application/lib" - "github.com/refraction-networking/conjure/application/transports" - pb "github.com/refraction-networking/gotapdance/protobuf" + cj "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/types/known/anypb" ) diff --git a/application/transports/wrapping/min/min_test.go b/pkg/transports/wrapping/min/min_test.go similarity index 89% rename from application/transports/wrapping/min/min_test.go rename to pkg/transports/wrapping/min/min_test.go index c8e23177..3d7ca261 100644 --- a/application/transports/wrapping/min/min_test.go +++ b/pkg/transports/wrapping/min/min_test.go @@ -11,15 +11,15 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/anypb" - "github.com/refraction-networking/conjure/application/transports" - "github.com/refraction-networking/conjure/application/transports/wrapping/internal/tests" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/internal/conjurepath" + "github.com/refraction-networking/conjure/pkg/transports" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/internal/tests" + pb "github.com/refraction-networking/conjure/proto" ) func TestSuccessfulWrap(t *testing.T) { - cwd, _ := os.Getwd() - testSubnetPath := cwd + "/../../../lib/test/phantom_subnets.toml" - os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) + root := conjurepath.Root + os.Setenv("PHANTOM_SUBNET_LOCATION", root+"/pkg/transports/wrapping/internal/tests/phantom_subnets.toml") var transport Transport manager := tests.SetupRegistrationManager(tests.Transport{Index: pb.TransportType_Min, Transport: transport}) diff --git a/application/transports/wrapping/obfs4/client.go b/pkg/transports/wrapping/obfs4/client.go similarity index 96% rename from application/transports/wrapping/obfs4/client.go rename to pkg/transports/wrapping/obfs4/client.go index db8bc1d9..74b4803c 100644 --- a/application/transports/wrapping/obfs4/client.go +++ b/pkg/transports/wrapping/obfs4/client.go @@ -6,9 +6,9 @@ import ( "net" pt "git.torproject.org/pluggable-transports/goptlib.git" - "github.com/refraction-networking/conjure/application/transports" "github.com/refraction-networking/conjure/pkg/core" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" "gitlab.com/yawning/obfs4.git/transports/obfs4" "google.golang.org/protobuf/proto" diff --git a/application/transports/wrapping/obfs4/keys.go b/pkg/transports/wrapping/obfs4/keys.go similarity index 100% rename from application/transports/wrapping/obfs4/keys.go rename to pkg/transports/wrapping/obfs4/keys.go diff --git a/application/transports/wrapping/obfs4/obfs4.go b/pkg/transports/wrapping/obfs4/obfs4.go similarity index 96% rename from application/transports/wrapping/obfs4/obfs4.go rename to pkg/transports/wrapping/obfs4/obfs4.go index 8c1c71f4..a6ee0a8f 100644 --- a/application/transports/wrapping/obfs4/obfs4.go +++ b/pkg/transports/wrapping/obfs4/obfs4.go @@ -6,9 +6,9 @@ import ( "net" pt "git.torproject.org/pluggable-transports/goptlib.git" - cj "github.com/refraction-networking/conjure/application/lib" - "github.com/refraction-networking/conjure/application/transports" - pb "github.com/refraction-networking/gotapdance/protobuf" + cj "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" "gitlab.com/yawning/obfs4.git/common/drbg" "gitlab.com/yawning/obfs4.git/common/ntor" "gitlab.com/yawning/obfs4.git/transports/obfs4" diff --git a/application/transports/wrapping/obfs4/obfs4_test.go b/pkg/transports/wrapping/obfs4/obfs4_test.go similarity index 93% rename from application/transports/wrapping/obfs4/obfs4_test.go rename to pkg/transports/wrapping/obfs4/obfs4_test.go index 38bc2df7..e0781621 100644 --- a/application/transports/wrapping/obfs4/obfs4_test.go +++ b/pkg/transports/wrapping/obfs4/obfs4_test.go @@ -13,10 +13,11 @@ import ( "testing" "time" - dd "github.com/refraction-networking/conjure/application/lib" - "github.com/refraction-networking/conjure/application/transports" - "github.com/refraction-networking/conjure/application/transports/wrapping/internal/tests" - pb "github.com/refraction-networking/gotapdance/protobuf" + "github.com/refraction-networking/conjure/internal/conjurepath" + dd "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/transports" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/internal/tests" + pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/types/known/anypb" pt "git.torproject.org/pluggable-transports/goptlib.git" @@ -54,10 +55,7 @@ func wrapConnection(conn net.Conn, nodeID, publicKey string, wrapped chan (net.C func TestSuccessfulWrap(t *testing.T) { var err error - - cwd, err := os.Getwd() - require.Nil(t, err) - testSubnetPath := cwd + "/../internal/tests/phantom_subnets.toml" + testSubnetPath := conjurepath.Root + "/pkg/transports/wrapping/internal/tests/phantom_subnets.toml" os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) var transport Transport @@ -257,7 +255,7 @@ func TestObfs4StateDir(t *testing.T) { args.Add("node-id", nodeID.Hex()) args.Add("private-key", serverKeypair.Private().Hex()) seed, err := drbg.NewSeed() - require.Nil(t, err, "failed to create DRBG seed" ) + require.Nil(t, err, "failed to create DRBG seed") args.Add("drbg-seed", seed.Hex()) @@ -269,14 +267,13 @@ func TestObfs4StateDir(t *testing.T) { require.NoFileExists(t, "./obfs4_state.json") require.NoFileExists(t, "./obfs4_bridgeline.txt") - stateDir, err := os.MkdirTemp("", "") require.Nil(t, err) server, err = obfs4Transport.ServerFactory(stateDir, &args) require.Nil(t, err, "server factory failed") require.NotNil(t, server) - require.FileExists(t, path.Join(stateDir, "./obfs4_state.json")) + require.FileExists(t, path.Join(stateDir, "./obfs4_state.json")) require.FileExists(t, path.Join(stateDir, "./obfs4_bridgeline.txt")) } @@ -284,7 +281,7 @@ func TestTryParamsToDstPort(t *testing.T) { clv := randomizeDstPortMinVersion seed, _ := hex.DecodeString("0000000000000000000000000000000000") - cases := []struct{ + cases := []struct { r bool p uint16 }{{true, 57045}, {false, 443}} diff --git a/application/transports/wrapping/obfs4/utils.go b/pkg/transports/wrapping/obfs4/utils.go similarity index 100% rename from application/transports/wrapping/obfs4/utils.go rename to pkg/transports/wrapping/obfs4/utils.go diff --git a/pkg/transports/wrapping/prefix/client.go b/pkg/transports/wrapping/prefix/client.go new file mode 100644 index 00000000..d474e989 --- /dev/null +++ b/pkg/transports/wrapping/prefix/client.go @@ -0,0 +1,134 @@ +package prefix + +import ( + "fmt" + "io" + "net" + + "github.com/refraction-networking/conjure/pkg/core" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" + "google.golang.org/protobuf/proto" +) + +// ClientTransport implements the client side transport interface for the Min transport. The +// significant difference is that there is an instance of this structure per client session, where +// the station side Transport struct has one instance to be re-used for all sessions. +type ClientTransport struct { + // Parameters are fields that will be shared with the station in the registration + Parameters *pb.PrefixTransportParams + + // // state tracks fields internal to the registrar that survive for the lifetime + // // of the transport session without being shared - i.e. local derived keys. + // state any + + Prefix Prefix + TagObfuscator transports.Obfuscator + + connectTag []byte + stationPublicKey [32]byte +} + +// Prefix struct used selected by, or given to the client. +type Prefix struct { + Bytes []byte + ID PrefixID + + // // Function allowing encoding / transformation of obfuscated ID bytes after they have been + // // obfuscated. Examples - base64 encode, padding + // [FUTURE WORK] + // tagEncode() func([]byte) ([]byte, int, error) + + // // Function allowing encoding / transformation of stream bytes after they have been. Examples + // // - base64 encode, padding + // [FUTURE WORK] + // streamEncode() func([]byte) ([]byte, int, error) +} + +// DefaultPrefixes provides the prefixes supported by default for use when by the client. +var DefaultPrefixes = []Prefix{} + +// Name returns the human-friendly name of the transport, implementing the Transport interface. +func (t *ClientTransport) Name() string { + return "prefix_" + t.Prefix.ID.Name() +} + +// String returns a string identifier for the Transport for logging (including string formatters) +func (t *ClientTransport) String() string { + return "prefix_" + t.Prefix.ID.Name() +} + +// ID provides an identifier that will be sent to the conjure station during the registration so +// that the station knows what transport to expect connecting to the chosen phantom. +func (*ClientTransport) ID() pb.TransportType { + return pb.TransportType_Prefix +} + +// GetParams returns a generic protobuf with any parameters from both the registration and the +// transport. +func (t *ClientTransport) GetParams() proto.Message { + return t.Parameters +} + +// SetParams allows the caller to set parameters associated with the transport, returning an +// error if the provided generic message is not compatible. +func (t *ClientTransport) SetParams(p any) error { + params, ok := p.(*pb.PrefixTransportParams) + if !ok { + return fmt.Errorf("unable to parse params") + } + t.Parameters = params + + return nil +} + +// GetDstPort returns the destination port that the client should open the phantom connection to +func (t *ClientTransport) GetDstPort(seed []byte, params any) (uint16, error) { + if t.Parameters == nil || !t.Parameters.GetRandomizeDstPort() { + return 443, nil + } + + return transports.PortSelectorRange(portRangeMin, portRangeMax, seed) +} + +// Build is specific to the Prefix transport, providing a utility function for building the +// prefix that the client should write to the wire before sending any client bytes. +func (t *ClientTransport) Build() ([]byte, error) { + // Send hmac(seed, str) bytes to indicate to station (min transport) + prefix := t.Prefix.Bytes + + obfuscatedID, err := t.TagObfuscator.Obfuscate(t.connectTag, t.stationPublicKey[:]) + if err != nil { + return nil, err + } + return append(prefix, obfuscatedID...), nil +} + +// PrepareKeys provides an opportunity for the transport to integrate the station public key +// as well as bytes from the deterministic random generator associated with the registration +// that this ClientTransport is attached to. +func (t *ClientTransport) PrepareKeys(pubkey [32]byte, sharedSecret []byte, hkdf io.Reader) error { + t.connectTag = core.ConjureHMAC(sharedSecret, "PrefixTransportHMACString") + t.stationPublicKey = pubkey + return nil +} + +// WrapConn gives the transport the opportunity to perform a handshake and wrap / transform the +// incoming and outgoing bytes send by the implementing client. +func (t *ClientTransport) WrapConn(conn net.Conn) (net.Conn, error) { + // Send hmac(seed, str) bytes to indicate to station (min transport) generated during Prepare(...) + + // // Send hmac(seed, str) bytes to indicate to station (min transport) + // connectTag := core.ConjureHMAC(reg.keys.SharedSecret, "PrefixTransportHMACString") + + prefix, err := t.Build() + if err != nil { + return nil, fmt.Errorf("failed to build prefix: %w", err) + } + + _, err = conn.Write(prefix) + if err != nil { + return nil, err + } + return conn, nil +} diff --git a/pkg/transports/wrapping/prefix/prefix.go b/pkg/transports/wrapping/prefix/prefix.go new file mode 100644 index 00000000..c901b10f --- /dev/null +++ b/pkg/transports/wrapping/prefix/prefix.go @@ -0,0 +1,378 @@ +package prefix + +import ( + "bytes" + "errors" + "fmt" + "net" + + "github.com/refraction-networking/conjure/pkg/core" + dd "github.com/refraction-networking/conjure/pkg/station/lib" + "github.com/refraction-networking/conjure/pkg/transports" + pb "github.com/refraction-networking/conjure/proto" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" +) + +const ( + // Earliest client library version ID that supports destination port randomization + randomizeDstPortMinVersion uint = 3 + + // port range boundaries for prefix transport when randomizing + portRangeMin = 1024 + portRangeMax = 65535 +) + +const minTagLength = 64 + +// const minTagLengthBase64 = 88 + +// prefix provides the elements required for independent prefixes to be usable as part of the +// transport used by the server specifically. +type prefix struct { + // // Regular expression to match + // *regexp.Regexp + + // // Function allowing decode / transformation of obfuscated ID bytes before attempting to + // // de-obfuscate them. Example - base64 decode. + // // [FUTURE WORK] + // tagDecode func([]byte) ([]byte, int, error) + + // // Function allowing decode / transformation stream bytes before attempting to forward them. + // // Example - base64 decode. + // // [FUTURE WORK] + // streamDecode func([]byte) ([]byte, int, error) + + // Static string to match to rule out protocols without using a regex. + StaticMatch []byte + + // Offset in a byte array where we expect the identifier to start. + Offset int + + // Minimum length to guarantee we have received the whole identifier + // (i.e. return ErrTryAgain) + MinLen int + + // Maximum length after which we can rule out prefix if we have not found a known identifier + // (i.e. return ErrNotTransport) + MaxLen int + + // Minimum client library version that supports this prefix + MinVer uint +} + +// PrefixID provide an integer Identifier for each individual prefixes allowing clients to indicate +// to the station the prefix they intend to connect with. +type PrefixID int + +const ( + Min PrefixID = iota + GetLong + PostLong + HTTPResp + TLSClientHello + TLSServerHello + TLSAlertWarning + TLSAlertFatal + DNSOverTCP + OpenSSH2 + // GetShort +) + +var ( + // ErrUnknownPrefix indicates that the provided Prefix ID is unknown to the transport object. + ErrUnknownPrefix = errors.New("unknown / unsupported prefix") +) + +// Name returns the human-friendly name of the prefix. +func (id PrefixID) Name() string { + switch id { + case Min: + return "Min" + + case GetLong: + return "GetLong" + case PostLong: + return "PostLong" + case HTTPResp: + return "HTTPResp" + case TLSClientHello: + return "TLSClientHello" + case TLSServerHello: + return "TLSServerHello" + case TLSAlertWarning: + return "TLSAlertWarning" + case TLSAlertFatal: + return "TLSAlertFatal" + case DNSOverTCP: + return "DNSOverTCP" + case OpenSSH2: + return "OpenSSH2" + // case GetShort: + // return "GetShort" + default: + return "other" + } +} + +// defaultPrefixes provides the prefixes supported by default for use when +// initializing the prefix transport. +var defaultPrefixes = map[PrefixID]prefix{ + // // HTTP GET base64 in url min tag length 88 because 64 bytes base64 encoded should be length 88 + // GetShort: {base64TagDecode, []byte("GET /"), 5, 5 + 88, 5 + 88, randomizeDstPortMinVersion}, + // HTTP GET + GetLong: {[]byte("GET / HTTP/1.1\r\n"), 16, 16 + minTagLength, 16 + minTagLength, randomizeDstPortMinVersion}, + // HTTP POST + PostLong: {[]byte("POST / HTTP/1.1\r\n"), 17, 17 + minTagLength, 17 + minTagLength, randomizeDstPortMinVersion}, + // HTTP Response + HTTPResp: {[]byte("HTTP/1.1 200\r\n"), 14, 14 + minTagLength, 14 + minTagLength, randomizeDstPortMinVersion}, + // TLS Client Hello + TLSClientHello: {[]byte("\x16\x03\x01\x40\x00\x01"), 6, 6 + minTagLength, 6 + minTagLength, randomizeDstPortMinVersion}, + // TLS Server Hello + TLSServerHello: {[]byte("\x16\x03\x03\x40\x00\x02\r\n"), 8, 8 + minTagLength, 8 + minTagLength, randomizeDstPortMinVersion}, + // TLS Alert Warning + TLSAlertWarning: {[]byte("\x15\x03\x01\x00\x02"), 5, 5 + minTagLength, 5 + minTagLength, randomizeDstPortMinVersion}, + // TLS Alert Fatal + TLSAlertFatal: {[]byte("\x15\x03\x02\x00\x02"), 5, 5 + minTagLength, 5 + minTagLength, randomizeDstPortMinVersion}, + // DNS over TCP + DNSOverTCP: {[]byte("\x05\xDC\x5F\xE0\x01\x20"), 6, 6 + minTagLength, 6 + minTagLength, randomizeDstPortMinVersion}, + // SSH-2.0-OpenSSH_8.9p1 + OpenSSH2: {[]byte("SSH-2.0-OpenSSH_8.9p1"), 21, 21 + minTagLength, 21 + minTagLength, randomizeDstPortMinVersion}, + //Min - Empty prefix + Min: {[]byte{}, 0, minTagLength, minTagLength, randomizeDstPortMinVersion}, +} + +// Transport provides a struct implementing the Transport, WrappingTransport, +// PortRandomizingTransport, and FixedPortTransport interfaces. +type Transport struct { + SupportedPrefixes map[PrefixID]prefix + TagObfuscator transports.Obfuscator + Privkey [32]byte +} + +// Name returns the human-friendly name of the transport, implementing the +// Transport interface.. +func (Transport) Name() string { return "PrefixTransport" } + +// LogPrefix returns the prefix used when including this transport in logs, +// implementing the Transport interface. +func (Transport) LogPrefix() string { return "PREF" } + +// GetIdentifier takes in a registration and returns an identifier for it. This +// identifier should be unique for each registration on a given phantom; +// registrations on different phantoms can have the same identifier. +func (Transport) GetIdentifier(d *dd.DecoyRegistration) string { + return string(core.ConjureHMAC(d.Keys.SharedSecret, "PrefixTransportHMACString")) +} + +// GetProto returns the next layer protocol that the transport uses. Implements +// the Transport interface. +func (Transport) GetProto() pb.IPProto { + return pb.IPProto_Tcp +} + +// ParseParams gives the specific transport an option to parse a generic object +// into parameters provided by the client during registration. +func (t Transport) ParseParams(libVersion uint, data *anypb.Any) (any, error) { + if data == nil { + return nil, nil + } + + // For backwards compatibility we create a generic transport params object + // for transports that existed before the transportParams fields existed. + if libVersion < randomizeDstPortMinVersion { + f := false + return &pb.PrefixTransportParams{ + RandomizeDstPort: &f, + }, nil + } + + var m = &pb.PrefixTransportParams{} + err := anypb.UnmarshalTo(data, m, proto.UnmarshalOptions{}) + + // Check if this is a prefix that we know how to parse, if not, drop the registration because + // we will be unable to pick up. + if _, ok := t.SupportedPrefixes[PrefixID(m.GetPrefixId())]; !ok { + return nil, fmt.Errorf("%w: %d", ErrUnknownPrefix, m.GetPrefixId()) + } + + return m, err +} + +// GetDstPort Given the library version, a seed, and a generic object +// containing parameters the transport should be able to return the +// destination port that a clients phantom connection will attempt to reach +func (Transport) GetDstPort(libVersion uint, seed []byte, params any) (uint16, error) { + + if libVersion < randomizeDstPortMinVersion { + return 443, nil + } + + if params == nil { + return 443, nil + } + + parameters, ok := params.(*pb.PrefixTransportParams) + if !ok { + return 0, fmt.Errorf("bad parameters provided") + } + + if parameters.GetRandomizeDstPort() { + return transports.PortSelectorRange(portRangeMin, portRangeMax, seed) + } + + return 443, nil +} + +// WrapConnection attempts to wrap the given connection in the transport. It +// takes the information gathered so far on the connection in data, attempts to +// identify itself, and if it positively identifies itself wraps the connection +// in the transport, returning a connection that's ready to be used by others. +// +// If the returned error is nil or non-nil and non-{ transports.ErrTryAgain, +// transports.ErrNotTransport }, the caller may no longer use data or conn. +func (t Transport) WrapConnection(data *bytes.Buffer, c net.Conn, originalDst net.IP, regManager *dd.RegistrationManager) (*dd.DecoyRegistration, net.Conn, error) { + if data.Len() < minTagLength { + return nil, nil, transports.ErrTryAgain + } + + reg, err := t.tryFindReg(data, originalDst, regManager) + if err != nil { + return nil, nil, err + } + + return reg, transports.PrependToConn(c, data), nil +} + +func (t Transport) tryFindReg(data *bytes.Buffer, originalDst net.IP, regManager *dd.RegistrationManager) (*dd.DecoyRegistration, error) { + if data.Len() == 0 { + return nil, transports.ErrTryAgain + } + + err := transports.ErrNotTransport + for _, prefix := range t.SupportedPrefixes { + if len(prefix.StaticMatch) > 0 { + matchLen := min(len(prefix.StaticMatch), data.Len()) + if !bytes.Equal(prefix.StaticMatch[:matchLen], data.Bytes()[:matchLen]) { + continue + } + } + + if data.Len() < prefix.MinLen { + // the data we have received matched at least one static prefix, but was not long + // enough to extract the tag - go back and read more, continue checking if any + // of the other prefixes match. If not we want to indicate to read more, not + // give up because we may receive the rest of the match. + err = transports.ErrTryAgain + continue + } + + if data.Len() < prefix.Offset+minTagLength && data.Len() < prefix.MaxLen { + err = transports.ErrTryAgain + continue + } else if data.Len() < prefix.MaxLen { + continue + } + + var obfuscatedID []byte + var forwardBy = minTagLength + // var errN error + // if prefix.fn != nil { + // obfuscatedID, forwardBy, errN = prefix.tagDecode(data.Bytes()[prefix.Offset:]) + // if errN != nil || len(obfuscatedID) != minTagLength { + // continue + // } + // } else { + obfuscatedID = data.Bytes()[prefix.Offset : prefix.Offset+minTagLength] + // } + + hmacID, err := t.TagObfuscator.TryReveal(obfuscatedID, t.Privkey) + if err != nil || hmacID == nil { + continue + } + + reg, ok := regManager.GetRegistrations(originalDst)[string(hmacID)] + if !ok { + continue + } + + // We don't want to forward the prefix or Tag bytes, but if any message + // remains we do want to forward it. + data.Next(prefix.Offset + forwardBy) + + return reg, nil + } + + return nil, err +} + +// New Given a private key this builds the server side transport with an EMPTY set of supported +// prefixes. The optional filepath specifies a file from which to read extra prefixes. If provided +// only the first variadic string will be used to attempt to parse prefixes. There can be no +// colliding PrefixIDs - within the file first defined takes precedence. +func New(privkey [32]byte, filepath ...string) (*Transport, error) { + var prefixes map[PrefixID]prefix = make(map[PrefixID]prefix) + var err error + if len(filepath) > 0 && filepath[0] != "" { + prefixes, err = tryParsePrefixes(filepath[0]) + if err != nil { + return nil, err + } + } + return &Transport{ + Privkey: privkey, + SupportedPrefixes: prefixes, + TagObfuscator: transports.CTRObfuscator{}, + }, nil +} + +// Default Given a private key this builds the server side transport with the DEFAULT set of supported +// prefixes. The optional filepath specifies a file from which to read extra prefixes. +// If provided only the first variadic string will be used to attempt to parse prefixes. There can +// be no colliding PrefixIDs - file defined prefixes take precedent over defaults, and within the +// file first defined takes precedence. +func Default(privkey [32]byte, filepath ...string) (*Transport, error) { + t, err := New(privkey, filepath...) + if err != nil { + return nil, err + } + + for k, v := range defaultPrefixes { + if _, ok := t.SupportedPrefixes[k]; !ok { + t.SupportedPrefixes[k] = v + } + } + return t, nil +} + +func tryParsePrefixes(filepath string) (map[PrefixID]prefix, error) { + return nil, nil +} + +func init() { + // if at any point we need to do init on the prefixes (i.e compiling regular expressions) it + // should happen here. + for ID, p := range defaultPrefixes { + DefaultPrefixes = append(DefaultPrefixes, Prefix{p.StaticMatch, ID}) + } +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +// func base64TagDecode(encoded []byte) ([]byte, int, error) { +// if len(encoded) < minTagLengthBase64 { +// return nil, 0, fmt.Errorf("not enough to decode") +// } +// buf := make([]byte, minTagLengthBase64) +// n, err := base64.StdEncoding.Decode(buf, encoded[:minTagLengthBase64]) +// if err != nil { +// return nil, 0, err +// } + +// return buf[:n], minTagLengthBase64, nil +// } diff --git a/pkg/transports/wrapping/prefix/prefix_test.go b/pkg/transports/wrapping/prefix/prefix_test.go new file mode 100644 index 00000000..811a1720 --- /dev/null +++ b/pkg/transports/wrapping/prefix/prefix_test.go @@ -0,0 +1,250 @@ +package prefix + +import ( + "bytes" + "crypto/rand" + "encoding/hex" + "errors" + "io" + "os" + "testing" + + "github.com/stretchr/testify/require" + "golang.org/x/crypto/curve25519" + "google.golang.org/protobuf/types/known/anypb" + + "github.com/refraction-networking/conjure/internal/conjurepath" + "github.com/refraction-networking/conjure/pkg/core" + "github.com/refraction-networking/conjure/pkg/ed25519" + "github.com/refraction-networking/conjure/pkg/ed25519/extra25519" + "github.com/refraction-networking/conjure/pkg/transports" + "github.com/refraction-networking/conjure/pkg/transports/wrapping/internal/tests" + pb "github.com/refraction-networking/conjure/proto" +) + +func TestSuccessfulWrap(t *testing.T) { + testSubnetPath := conjurepath.Root + "/pkg/station/lib/test/phantom_subnets.toml" + os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) + + _, private, _ := ed25519.GenerateKey(rand.Reader) + + var curve25519Public, curve25519Private [32]byte + extra25519.PrivateKeyToCurve25519(&curve25519Private, private) + curve25519.ScalarBaseMult(&curve25519Public, &curve25519Private) + + var transport = Transport{ + TagObfuscator: transports.CTRObfuscator{}, + Privkey: curve25519Private, + SupportedPrefixes: defaultPrefixes, + } + manager := tests.SetupRegistrationManager(tests.Transport{Index: pb.TransportType_Prefix, Transport: transport}) + c2p, sfp, reg := tests.SetupPhantomConnections(manager, pb.TransportType_Prefix, randomizeDstPortMinVersion) + defer c2p.Close() + defer sfp.Close() + require.NotNil(t, reg) + + hmacID := core.ConjureHMAC(reg.Keys.SharedSecret, "PrefixTransportHMACString") + message := []byte(`test message!`) + + for _, prefix := range defaultPrefixes { + // if prefix.fn != nil { + // // skip prefixes that do a special decoding for this test + // continue + // } + + obfuscatedID, err := transport.TagObfuscator.Obfuscate(hmacID, curve25519Public[:]) + require.Nil(t, err) + // t.Logf("hmacid - %s\nobfuscated id - %s", hex.EncodeToString(hmacID), hex.EncodeToString(obfuscatedID)) + _, err = c2p.Write(append(prefix.StaticMatch, append(obfuscatedID, message...)...)) + require.Nil(t, err) + + var buf [4096]byte + var buffer bytes.Buffer + n, _ := sfp.Read(buf[:]) + buffer.Write(buf[:n]) + + _, wrapped, err := transport.WrapConnection(&buffer, sfp, reg.PhantomIp, manager) + require.Nil(t, err, "error getting wrapped connection") + + received := make([]byte, len(message)) + _, err = io.ReadFull(wrapped, received) + require.Nil(t, err, "failed reading from connection") + require.True(t, bytes.Equal(message, received), "%s\n%s\n%s", string(message), string(received), prefix.StaticMatch) + } +} + +func TestUnsuccessfulWrap(t *testing.T) { + var transport = Transport{ + TagObfuscator: transports.CTRObfuscator{}, + Privkey: [32]byte{}, + SupportedPrefixes: defaultPrefixes, + } + + manager := tests.SetupRegistrationManager(tests.Transport{Index: pb.TransportType_Prefix, Transport: transport}) + c2p, sfp, reg := tests.SetupPhantomConnections(manager, pb.TransportType_Prefix, randomizeDstPortMinVersion) + defer c2p.Close() + defer sfp.Close() + + // Write enough bytes that it can tell the message is definitively not associated with any prefix + randMsg := make([]byte, 100) + n, _ := rand.Read(randMsg) + _, err := c2p.Write(randMsg[:n]) + require.Nil(t, err) + + var buf [1500]byte + var buffer bytes.Buffer + n, _ = sfp.Read(buf[:]) + + buffer.Write(buf[:n]) + + _, _, err = transport.WrapConnection(&buffer, sfp, reg.PhantomIp, manager) + if !errors.Is(err, transports.ErrNotTransport) { + t.Fatalf("expected ErrNotTransport, got %v", err) + } +} + +func TestTryAgain(t *testing.T) { + var transport = Transport{ + TagObfuscator: transports.CTRObfuscator{}, + Privkey: [32]byte{}, + SupportedPrefixes: defaultPrefixes, + } + var err error + manager := tests.SetupRegistrationManager(tests.Transport{Index: pb.TransportType_Prefix, Transport: transport}) + c2p, sfp, reg := tests.SetupPhantomConnections(manager, pb.TransportType_Prefix, randomizeDstPortMinVersion) + defer c2p.Close() + defer sfp.Close() + + msgBuf := make([]byte, 100) + // Start out matching an expected prefix + // Should match Min prefix until 64 bytes and GET prefix until 64+16 bytes + copy(msgBuf[:], []byte("GET / HTTP/1.1\r\n")) + + var buf [100]byte + var buffer bytes.Buffer + for _, b := range msgBuf[:minTagLength+16-1] { + _, err = c2p.Write([]byte{b}) + require.Nil(t, err) + + n, _ := sfp.Read(buf[:]) + buffer.Write(buf[:n]) + + _, _, err = transport.WrapConnection(&buffer, sfp, reg.PhantomIp, manager) + if !errors.Is(err, transports.ErrTryAgain) { + t.Fatalf("expected ErrTryAgain, got %v", err) + } + } + + _, err = c2p.Write(msgBuf[minTagLength+16-1:]) + require.Nil(t, err) + + n, _ := sfp.Read(buf[:]) + buffer.Write(buf[:n]) + _, _, err = transport.WrapConnection(&buffer, sfp, reg.PhantomIp, manager) + if !errors.Is(err, transports.ErrNotTransport) { + t.Fatalf("expected ErrNotTransport, got %v", err) + } +} + +func TestTryParamsToDstPort(t *testing.T) { + clv := randomizeDstPortMinVersion + seed, _ := hex.DecodeString("0000000000000000000000000000000000") + + cases := []struct { + r bool + p uint16 + }{{true, 58047}, {false, 443}} + + transport, err := Default([32]byte{}) + require.Nil(t, err) + + // for id, _ := range transport.SupportedPrefixes { + // t.Log(id.Name()) + // } + + for _, testCase := range cases { + ct := ClientTransport{Parameters: &pb.PrefixTransportParams{RandomizeDstPort: &testCase.r}} + + rawParams, err := anypb.New(ct.GetParams()) + require.Nil(t, err) + + params, err := transport.ParseParams(clv, rawParams) + require.Nil(t, err) + + port, err := transport.GetDstPort(clv, seed, params) + require.Nil(t, err) + require.Equal(t, testCase.p, port) + } +} + +func TestTryParseParamsBadPrefixID(t *testing.T) { + clv := randomizeDstPortMinVersion + + // Dont Add anything to supported Transports + transport, err := New([32]byte{}) + require.Nil(t, err) + + ct := ClientTransport{Parameters: &pb.PrefixTransportParams{}} + + rawParams, err := anypb.New(ct.GetParams()) + require.Nil(t, err) + + // Any transport Id will be unknown + _, err = transport.ParseParams(clv, rawParams) + require.ErrorIs(t, err, ErrUnknownPrefix) +} + +/* +func TestSuccessfulWrapBase64(t *testing.T) { + testSubnetPath := os.Getenv("GOPATH") + "/src/github.com/refraction-networking/conjure/application/lib/test/phantom_subnets.toml" + os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) + + _, private, _ := ed25519.GenerateKey(rand.Reader) + + var curve25519Public, curve25519Private [32]byte + extra25519.PrivateKeyToCurve25519(&curve25519Private, private) + curve25519.ScalarBaseMult(&curve25519Public, &curve25519Private) + + var transport = Transport{ + TagObfuscator: transports.CTRObfuscator{}, + Privkey: curve25519Private, + SupportedPrefixes: defaultPrefixes, + } + manager := tests.SetupRegistrationManager(tests.Transport{Index: pb.TransportType_Prefix, Transport: transport}) + c2p, sfp, reg := tests.SetupPhantomConnections(manager, pb.TransportType_Prefix) + defer c2p.Close() + defer sfp.Close() + require.NotNil(t, reg) + + hmacID := reg.Keys.ConjureHMAC("PrefixTransportHMACString") + message := []byte(`test message!`) + + prefix := defaultPrefixes[0] + + obfuscatedID, err := transport.TagObfuscator.Obfuscate(hmacID, curve25519Public[:]) + require.Nil(t, err) + + encodedID := base64.StdEncoding.EncodeToString(obfuscatedID) + + decodedID, _, err := prefix.fn([]byte(encodedID)) + require.Nil(t, err) + require.True(t, bytes.Equal(decodedID, obfuscatedID)) + + _, err = c2p.Write(append(prefix.StaticMatch, append([]byte(encodedID), message...)...)) + require.Nil(t, err) + + var buf [4096]byte + var buffer bytes.Buffer + n, _ := sfp.Read(buf[:]) + buffer.Write(buf[:n]) + + _, wrapped, err := transport.WrapConnection(&buffer, sfp, reg.PhantomIp, manager) + require.Nil(t, err, "error getting wrapped connection") + + received := make([]byte, len(message)) + _, err = io.ReadFull(wrapped, received) + require.Nil(t, err, "failed reading from connection") + require.True(t, bytes.Equal(message, received), "%s\n%s\n%s", string(message), string(received), prefix.StaticMatch) + +} +*/ diff --git a/proto/Makefile b/proto/Makefile index 071db89f..4b29732b 100644 --- a/proto/Makefile +++ b/proto/Makefile @@ -1,6 +1,6 @@ # Makefile for generating the language-specific protobuf modules -PROTOC = /usr/bin/protoc +PROTOC = protoc SRC = signalling.proto @@ -8,13 +8,13 @@ GO_OUT = signalling.pb.go RUST_OUT = signalling.rs RUST_OUT_PATH = ../src/$(RUST_OUT) -default: $(RUST_OUT_PATH) +default: $(RUST_OUT_PATH) $(GO_OUT) $(GO_OUT): $(SRC) - $(PROTOC) $(SRC) --go_out . + $(PROTOC) $(SRC) --go_out . --go_opt=M"signalling.proto=./;cjproto" signalling.proto $(RUST_OUT_PATH): $(SRC) - PATH=$(PATH):$(HOME)/.cargo/bin:/root/.cargo/bin $(PROTOC) $(SRC) --rust_out . && cp $(RUST_OUT) $(RUST_OUT_PATH) + $(PROTOC) $(SRC) --rust_out . && cp $(RUST_OUT) $(RUST_OUT_PATH) $(PYTHON_OUT_PATH): $(SRC) $(PROTOC) --python_out=. $(SRC) && cp $(PYTHON_OUT) $(PYTHON_OUT_PATH) diff --git a/proto/extensions.go b/proto/extensions.go new file mode 100644 index 00000000..40e88deb --- /dev/null +++ b/proto/extensions.go @@ -0,0 +1,43 @@ +package cjproto + +// Package tdproto, in addition to generated functions, has some manual extensions. + +import ( + "encoding/binary" + "net" +) + +// InitTLSDecoySpec creates TLSDecoySpec from ip address and server name. +// Other feilds, such as Pubkey, Timeout and Tcpwin are left unset. + +// InitTLSDecoySpec creates TLSDecoySpec from ip address and server name. +// Other feilds, such as Pubkey, Timeout and Tcpwin are left unset. +func InitTLSDecoySpec(ip string, sni string) *TLSDecoySpec { + _ip := net.ParseIP(ip) + var ipUint32 *uint32 + var ipv6Bytes []byte + if _ip.To4() != nil { + ipUint32 = new(uint32) + *ipUint32 = binary.BigEndian.Uint32(net.ParseIP(ip).To4()) + } else if _ip.To16() != nil { + ipv6Bytes = _ip + } + tlsDecoy := TLSDecoySpec{Hostname: &sni, Ipv4Addr: ipUint32, Ipv6Addr: ipv6Bytes} + return &tlsDecoy +} + +// GetIpAddrStr returns IP address of TLSDecoySpec as a string. +func (ds *TLSDecoySpec) GetIpAddrStr() string { + if ds == nil { + return "" + } + if ds.Ipv4Addr != nil { + _ip := make(net.IP, 4) + binary.BigEndian.PutUint32(_ip, ds.GetIpv4Addr()) + return net.JoinHostPort(_ip.To4().String(), "443") + } + if ds.Ipv6Addr != nil { + return net.JoinHostPort(net.IP(ds.Ipv6Addr).String(), "443") + } + return "" +} diff --git a/proto/proto_test.go b/proto/proto_test.go new file mode 100644 index 00000000..86002289 --- /dev/null +++ b/proto/proto_test.go @@ -0,0 +1,38 @@ +package cjproto + +import ( + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" +) + +// Write a small go test using your APIMessage (serialize/deserialize) +func TestBidirectionalAPIResponse(t *testing.T) { + c2s := RegistrationResponse{} + addr := uint32(12345) + c2s.Ipv4Addr = &addr + port := uint32(10) + c2s.DstPort = &port + + // Serialize + marsh, err := proto.Marshal(&c2s) + require.Nil(t, err) + + // Deserialize + deser := RegistrationResponse{} + err = proto.Unmarshal(marsh, &deser) + require.Nil(t, err) + require.Equal(t, addr, deser.GetIpv4Addr()) + require.Equal(t, port, deser.GetDstPort()) +} + +// TestProtoLibVer validates that the accessor method returns a default value for +// fields that are unset in a protobuf and that our initial incremented +// ClientLibraryVersion should be 1. +func TestProtoLibVer(t *testing.T) { + c2s := ClientToStation{} + + defaultLibVer := c2s.GetClientLibVersion() + require.Equal(t, uint32(0), defaultLibVer) +} diff --git a/proto/signalling.pb.go b/proto/signalling.pb.go new file mode 100644 index 00000000..c57b3e79 --- /dev/null +++ b/proto/signalling.pb.go @@ -0,0 +1,2961 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v3.20.3 +// source: signalling.proto + +// TODO: We're using proto2 because it's the default on Ubuntu 16.04. +// At some point we will want to migrate to proto3, but we are not +// using any proto3 features yet. + +package cjproto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type KeyType int32 + +const ( + KeyType_AES_GCM_128 KeyType = 90 + KeyType_AES_GCM_256 KeyType = 91 // not supported atm +) + +// Enum value maps for KeyType. +var ( + KeyType_name = map[int32]string{ + 90: "AES_GCM_128", + 91: "AES_GCM_256", + } + KeyType_value = map[string]int32{ + "AES_GCM_128": 90, + "AES_GCM_256": 91, + } +) + +func (x KeyType) Enum() *KeyType { + p := new(KeyType) + *p = x + return p +} + +func (x KeyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyType) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[0].Descriptor() +} + +func (KeyType) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[0] +} + +func (x KeyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *KeyType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = KeyType(num) + return nil +} + +// Deprecated: Use KeyType.Descriptor instead. +func (KeyType) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{0} +} + +type DnsRegMethod int32 + +const ( + DnsRegMethod_UDP DnsRegMethod = 1 + DnsRegMethod_DOT DnsRegMethod = 2 + DnsRegMethod_DOH DnsRegMethod = 3 +) + +// Enum value maps for DnsRegMethod. +var ( + DnsRegMethod_name = map[int32]string{ + 1: "UDP", + 2: "DOT", + 3: "DOH", + } + DnsRegMethod_value = map[string]int32{ + "UDP": 1, + "DOT": 2, + "DOH": 3, + } +) + +func (x DnsRegMethod) Enum() *DnsRegMethod { + p := new(DnsRegMethod) + *p = x + return p +} + +func (x DnsRegMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DnsRegMethod) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[1].Descriptor() +} + +func (DnsRegMethod) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[1] +} + +func (x DnsRegMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *DnsRegMethod) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = DnsRegMethod(num) + return nil +} + +// Deprecated: Use DnsRegMethod.Descriptor instead. +func (DnsRegMethod) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{1} +} + +// State transitions of the client +type C2S_Transition int32 + +const ( + C2S_Transition_C2S_NO_CHANGE C2S_Transition = 0 + C2S_Transition_C2S_SESSION_INIT C2S_Transition = 1 // connect me to squid + C2S_Transition_C2S_SESSION_COVERT_INIT C2S_Transition = 11 // connect me to provided covert + C2S_Transition_C2S_EXPECT_RECONNECT C2S_Transition = 2 + C2S_Transition_C2S_SESSION_CLOSE C2S_Transition = 3 + C2S_Transition_C2S_YIELD_UPLOAD C2S_Transition = 4 + C2S_Transition_C2S_ACQUIRE_UPLOAD C2S_Transition = 5 + C2S_Transition_C2S_EXPECT_UPLOADONLY_RECONN C2S_Transition = 6 + C2S_Transition_C2S_ERROR C2S_Transition = 255 +) + +// Enum value maps for C2S_Transition. +var ( + C2S_Transition_name = map[int32]string{ + 0: "C2S_NO_CHANGE", + 1: "C2S_SESSION_INIT", + 11: "C2S_SESSION_COVERT_INIT", + 2: "C2S_EXPECT_RECONNECT", + 3: "C2S_SESSION_CLOSE", + 4: "C2S_YIELD_UPLOAD", + 5: "C2S_ACQUIRE_UPLOAD", + 6: "C2S_EXPECT_UPLOADONLY_RECONN", + 255: "C2S_ERROR", + } + C2S_Transition_value = map[string]int32{ + "C2S_NO_CHANGE": 0, + "C2S_SESSION_INIT": 1, + "C2S_SESSION_COVERT_INIT": 11, + "C2S_EXPECT_RECONNECT": 2, + "C2S_SESSION_CLOSE": 3, + "C2S_YIELD_UPLOAD": 4, + "C2S_ACQUIRE_UPLOAD": 5, + "C2S_EXPECT_UPLOADONLY_RECONN": 6, + "C2S_ERROR": 255, + } +) + +func (x C2S_Transition) Enum() *C2S_Transition { + p := new(C2S_Transition) + *p = x + return p +} + +func (x C2S_Transition) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (C2S_Transition) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[2].Descriptor() +} + +func (C2S_Transition) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[2] +} + +func (x C2S_Transition) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *C2S_Transition) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = C2S_Transition(num) + return nil +} + +// Deprecated: Use C2S_Transition.Descriptor instead. +func (C2S_Transition) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{2} +} + +// State transitions of the server +type S2C_Transition int32 + +const ( + S2C_Transition_S2C_NO_CHANGE S2C_Transition = 0 + S2C_Transition_S2C_SESSION_INIT S2C_Transition = 1 // connected to squid + S2C_Transition_S2C_SESSION_COVERT_INIT S2C_Transition = 11 // connected to covert host + S2C_Transition_S2C_CONFIRM_RECONNECT S2C_Transition = 2 + S2C_Transition_S2C_SESSION_CLOSE S2C_Transition = 3 + // TODO should probably also allow EXPECT_RECONNECT here, for DittoTap + S2C_Transition_S2C_ERROR S2C_Transition = 255 +) + +// Enum value maps for S2C_Transition. +var ( + S2C_Transition_name = map[int32]string{ + 0: "S2C_NO_CHANGE", + 1: "S2C_SESSION_INIT", + 11: "S2C_SESSION_COVERT_INIT", + 2: "S2C_CONFIRM_RECONNECT", + 3: "S2C_SESSION_CLOSE", + 255: "S2C_ERROR", + } + S2C_Transition_value = map[string]int32{ + "S2C_NO_CHANGE": 0, + "S2C_SESSION_INIT": 1, + "S2C_SESSION_COVERT_INIT": 11, + "S2C_CONFIRM_RECONNECT": 2, + "S2C_SESSION_CLOSE": 3, + "S2C_ERROR": 255, + } +) + +func (x S2C_Transition) Enum() *S2C_Transition { + p := new(S2C_Transition) + *p = x + return p +} + +func (x S2C_Transition) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (S2C_Transition) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[3].Descriptor() +} + +func (S2C_Transition) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[3] +} + +func (x S2C_Transition) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *S2C_Transition) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = S2C_Transition(num) + return nil +} + +// Deprecated: Use S2C_Transition.Descriptor instead. +func (S2C_Transition) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{3} +} + +// Should accompany all S2C_ERROR messages. +type ErrorReasonS2C int32 + +const ( + ErrorReasonS2C_NO_ERROR ErrorReasonS2C = 0 + ErrorReasonS2C_COVERT_STREAM ErrorReasonS2C = 1 // Squid TCP connection broke + ErrorReasonS2C_CLIENT_REPORTED ErrorReasonS2C = 2 // You told me something was wrong, client + ErrorReasonS2C_CLIENT_PROTOCOL ErrorReasonS2C = 3 // You messed up, client (e.g. sent a bad protobuf) + ErrorReasonS2C_STATION_INTERNAL ErrorReasonS2C = 4 // I broke + ErrorReasonS2C_DECOY_OVERLOAD ErrorReasonS2C = 5 // Everything's fine, but don't use this decoy right now + ErrorReasonS2C_CLIENT_STREAM ErrorReasonS2C = 100 // My stream to you broke. (This is impossible to send) + ErrorReasonS2C_CLIENT_TIMEOUT ErrorReasonS2C = 101 // You never came back. (This is impossible to send) +) + +// Enum value maps for ErrorReasonS2C. +var ( + ErrorReasonS2C_name = map[int32]string{ + 0: "NO_ERROR", + 1: "COVERT_STREAM", + 2: "CLIENT_REPORTED", + 3: "CLIENT_PROTOCOL", + 4: "STATION_INTERNAL", + 5: "DECOY_OVERLOAD", + 100: "CLIENT_STREAM", + 101: "CLIENT_TIMEOUT", + } + ErrorReasonS2C_value = map[string]int32{ + "NO_ERROR": 0, + "COVERT_STREAM": 1, + "CLIENT_REPORTED": 2, + "CLIENT_PROTOCOL": 3, + "STATION_INTERNAL": 4, + "DECOY_OVERLOAD": 5, + "CLIENT_STREAM": 100, + "CLIENT_TIMEOUT": 101, + } +) + +func (x ErrorReasonS2C) Enum() *ErrorReasonS2C { + p := new(ErrorReasonS2C) + *p = x + return p +} + +func (x ErrorReasonS2C) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorReasonS2C) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[4].Descriptor() +} + +func (ErrorReasonS2C) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[4] +} + +func (x ErrorReasonS2C) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ErrorReasonS2C) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ErrorReasonS2C(num) + return nil +} + +// Deprecated: Use ErrorReasonS2C.Descriptor instead. +func (ErrorReasonS2C) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{4} +} + +type TransportType int32 + +const ( + TransportType_Null TransportType = 0 + TransportType_Min TransportType = 1 // Send a 32-byte HMAC id to let the station distinguish registrations to same host + TransportType_Obfs4 TransportType = 2 + TransportType_DTLS TransportType = 3 // UDP transport: DTLS + TransportType_Prefix TransportType = 4 // dynamic prefix transport (and updated Min) + TransportType_uTLS TransportType = 5 // uTLS based transport + TransportType_Format TransportType = 6 // Formatting transport - format first, format all + TransportType_WASM TransportType = 7 // WebAssembly + TransportType_FTE TransportType = 8 // Format transforming encryption + TransportType_Quic TransportType = 9 // quic transport? + TransportType_Webrtc TransportType = 99 // UDP transport: WebRTC DataChannel +) + +// Enum value maps for TransportType. +var ( + TransportType_name = map[int32]string{ + 0: "Null", + 1: "Min", + 2: "Obfs4", + 3: "DTLS", + 4: "Prefix", + 5: "uTLS", + 6: "Format", + 7: "WASM", + 8: "FTE", + 9: "Quic", + 99: "Webrtc", + } + TransportType_value = map[string]int32{ + "Null": 0, + "Min": 1, + "Obfs4": 2, + "DTLS": 3, + "Prefix": 4, + "uTLS": 5, + "Format": 6, + "WASM": 7, + "FTE": 8, + "Quic": 9, + "Webrtc": 99, + } +) + +func (x TransportType) Enum() *TransportType { + p := new(TransportType) + *p = x + return p +} + +func (x TransportType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransportType) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[5].Descriptor() +} + +func (TransportType) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[5] +} + +func (x TransportType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *TransportType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = TransportType(num) + return nil +} + +// Deprecated: Use TransportType.Descriptor instead. +func (TransportType) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{5} +} + +type RegistrationSource int32 + +const ( + RegistrationSource_Unspecified RegistrationSource = 0 + RegistrationSource_Detector RegistrationSource = 1 + RegistrationSource_API RegistrationSource = 2 + RegistrationSource_DetectorPrescan RegistrationSource = 3 + RegistrationSource_BidirectionalAPI RegistrationSource = 4 + RegistrationSource_DNS RegistrationSource = 5 + RegistrationSource_BidirectionalDNS RegistrationSource = 6 +) + +// Enum value maps for RegistrationSource. +var ( + RegistrationSource_name = map[int32]string{ + 0: "Unspecified", + 1: "Detector", + 2: "API", + 3: "DetectorPrescan", + 4: "BidirectionalAPI", + 5: "DNS", + 6: "BidirectionalDNS", + } + RegistrationSource_value = map[string]int32{ + "Unspecified": 0, + "Detector": 1, + "API": 2, + "DetectorPrescan": 3, + "BidirectionalAPI": 4, + "DNS": 5, + "BidirectionalDNS": 6, + } +) + +func (x RegistrationSource) Enum() *RegistrationSource { + p := new(RegistrationSource) + *p = x + return p +} + +func (x RegistrationSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RegistrationSource) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[6].Descriptor() +} + +func (RegistrationSource) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[6] +} + +func (x RegistrationSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *RegistrationSource) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = RegistrationSource(num) + return nil +} + +// Deprecated: Use RegistrationSource.Descriptor instead. +func (RegistrationSource) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{6} +} + +type StationOperations int32 + +const ( + StationOperations_Unknown StationOperations = 0 + StationOperations_New StationOperations = 1 + StationOperations_Update StationOperations = 2 + StationOperations_Clear StationOperations = 3 +) + +// Enum value maps for StationOperations. +var ( + StationOperations_name = map[int32]string{ + 0: "Unknown", + 1: "New", + 2: "Update", + 3: "Clear", + } + StationOperations_value = map[string]int32{ + "Unknown": 0, + "New": 1, + "Update": 2, + "Clear": 3, + } +) + +func (x StationOperations) Enum() *StationOperations { + p := new(StationOperations) + *p = x + return p +} + +func (x StationOperations) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StationOperations) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[7].Descriptor() +} + +func (StationOperations) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[7] +} + +func (x StationOperations) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *StationOperations) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = StationOperations(num) + return nil +} + +// Deprecated: Use StationOperations.Descriptor instead. +func (StationOperations) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{7} +} + +type IPProto int32 + +const ( + IPProto_Unk IPProto = 0 + IPProto_Tcp IPProto = 1 + IPProto_Udp IPProto = 2 +) + +// Enum value maps for IPProto. +var ( + IPProto_name = map[int32]string{ + 0: "Unk", + 1: "Tcp", + 2: "Udp", + } + IPProto_value = map[string]int32{ + "Unk": 0, + "Tcp": 1, + "Udp": 2, + } +) + +func (x IPProto) Enum() *IPProto { + p := new(IPProto) + *p = x + return p +} + +func (x IPProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IPProto) Descriptor() protoreflect.EnumDescriptor { + return file_signalling_proto_enumTypes[8].Descriptor() +} + +func (IPProto) Type() protoreflect.EnumType { + return &file_signalling_proto_enumTypes[8] +} + +func (x IPProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *IPProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = IPProto(num) + return nil +} + +// Deprecated: Use IPProto.Descriptor instead. +func (IPProto) EnumDescriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{8} +} + +type PubKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A public key, as used by the station. + Key []byte `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + Type *KeyType `protobuf:"varint,2,opt,name=type,enum=conjure.KeyType" json:"type,omitempty"` +} + +func (x *PubKey) Reset() { + *x = PubKey{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PubKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubKey) ProtoMessage() {} + +func (x *PubKey) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. +func (*PubKey) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{0} +} + +func (x *PubKey) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *PubKey) GetType() KeyType { + if x != nil && x.Type != nil { + return *x.Type + } + return KeyType_AES_GCM_128 +} + +type TLSDecoySpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hostname/SNI to use for this host + // + // The hostname is the only required field, although other + // fields are expected to be present in most cases. + Hostname *string `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"` + // The 32-bit ipv4 address, in network byte order + // + // If the IPv4 address is absent, then it may be resolved via + // DNS by the client, or the client may discard this decoy spec + // if local DNS is untrusted, or the service may be multihomed. + Ipv4Addr *uint32 `protobuf:"fixed32,2,opt,name=ipv4addr" json:"ipv4addr,omitempty"` + // The 128-bit ipv6 address, in network byte order + Ipv6Addr []byte `protobuf:"bytes,6,opt,name=ipv6addr" json:"ipv6addr,omitempty"` + // The Tapdance station public key to use when contacting this + // decoy + // + // If omitted, the default station public key (if any) is used. + Pubkey *PubKey `protobuf:"bytes,3,opt,name=pubkey" json:"pubkey,omitempty"` + // The maximum duration, in milliseconds, to maintain an open + // connection to this decoy (because the decoy may close the + // connection itself after this length of time) + // + // If omitted, a default of 30,000 milliseconds is assumed. + Timeout *uint32 `protobuf:"varint,4,opt,name=timeout" json:"timeout,omitempty"` + // The maximum TCP window size to attempt to use for this decoy. + // + // If omitted, a default of 15360 is assumed. + // + // TODO: the default is based on the current heuristic of only + // using decoys that permit windows of 15KB or larger. If this + // heuristic changes, then this default doesn't make sense. + Tcpwin *uint32 `protobuf:"varint,5,opt,name=tcpwin" json:"tcpwin,omitempty"` +} + +func (x *TLSDecoySpec) Reset() { + *x = TLSDecoySpec{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TLSDecoySpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TLSDecoySpec) ProtoMessage() {} + +func (x *TLSDecoySpec) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TLSDecoySpec.ProtoReflect.Descriptor instead. +func (*TLSDecoySpec) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{1} +} + +func (x *TLSDecoySpec) GetHostname() string { + if x != nil && x.Hostname != nil { + return *x.Hostname + } + return "" +} + +func (x *TLSDecoySpec) GetIpv4Addr() uint32 { + if x != nil && x.Ipv4Addr != nil { + return *x.Ipv4Addr + } + return 0 +} + +func (x *TLSDecoySpec) GetIpv6Addr() []byte { + if x != nil { + return x.Ipv6Addr + } + return nil +} + +func (x *TLSDecoySpec) GetPubkey() *PubKey { + if x != nil { + return x.Pubkey + } + return nil +} + +func (x *TLSDecoySpec) GetTimeout() uint32 { + if x != nil && x.Timeout != nil { + return *x.Timeout + } + return 0 +} + +func (x *TLSDecoySpec) GetTcpwin() uint32 { + if x != nil && x.Tcpwin != nil { + return *x.Tcpwin + } + return 0 +} + +type ClientConf struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DecoyList *DecoyList `protobuf:"bytes,1,opt,name=decoy_list,json=decoyList" json:"decoy_list,omitempty"` + Generation *uint32 `protobuf:"varint,2,opt,name=generation" json:"generation,omitempty"` + DefaultPubkey *PubKey `protobuf:"bytes,3,opt,name=default_pubkey,json=defaultPubkey" json:"default_pubkey,omitempty"` + PhantomSubnetsList *PhantomSubnetsList `protobuf:"bytes,4,opt,name=phantom_subnets_list,json=phantomSubnetsList" json:"phantom_subnets_list,omitempty"` + ConjurePubkey *PubKey `protobuf:"bytes,5,opt,name=conjure_pubkey,json=conjurePubkey" json:"conjure_pubkey,omitempty"` + DnsRegConf *DnsRegConf `protobuf:"bytes,6,opt,name=dns_reg_conf,json=dnsRegConf" json:"dns_reg_conf,omitempty"` +} + +func (x *ClientConf) Reset() { + *x = ClientConf{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientConf) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientConf) ProtoMessage() {} + +func (x *ClientConf) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientConf.ProtoReflect.Descriptor instead. +func (*ClientConf) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{2} +} + +func (x *ClientConf) GetDecoyList() *DecoyList { + if x != nil { + return x.DecoyList + } + return nil +} + +func (x *ClientConf) GetGeneration() uint32 { + if x != nil && x.Generation != nil { + return *x.Generation + } + return 0 +} + +func (x *ClientConf) GetDefaultPubkey() *PubKey { + if x != nil { + return x.DefaultPubkey + } + return nil +} + +func (x *ClientConf) GetPhantomSubnetsList() *PhantomSubnetsList { + if x != nil { + return x.PhantomSubnetsList + } + return nil +} + +func (x *ClientConf) GetConjurePubkey() *PubKey { + if x != nil { + return x.ConjurePubkey + } + return nil +} + +func (x *ClientConf) GetDnsRegConf() *DnsRegConf { + if x != nil { + return x.DnsRegConf + } + return nil +} + +// Configuration for DNS registrar +type DnsRegConf struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DnsRegMethod *DnsRegMethod `protobuf:"varint,1,req,name=dns_reg_method,json=dnsRegMethod,enum=conjure.DnsRegMethod" json:"dns_reg_method,omitempty"` + Target *string `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` + Domain *string `protobuf:"bytes,3,req,name=domain" json:"domain,omitempty"` + Pubkey []byte `protobuf:"bytes,4,opt,name=pubkey" json:"pubkey,omitempty"` + UtlsDistribution *string `protobuf:"bytes,5,opt,name=utls_distribution,json=utlsDistribution" json:"utls_distribution,omitempty"` + StunServer *string `protobuf:"bytes,6,opt,name=stun_server,json=stunServer" json:"stun_server,omitempty"` +} + +func (x *DnsRegConf) Reset() { + *x = DnsRegConf{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsRegConf) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsRegConf) ProtoMessage() {} + +func (x *DnsRegConf) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsRegConf.ProtoReflect.Descriptor instead. +func (*DnsRegConf) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{3} +} + +func (x *DnsRegConf) GetDnsRegMethod() DnsRegMethod { + if x != nil && x.DnsRegMethod != nil { + return *x.DnsRegMethod + } + return DnsRegMethod_UDP +} + +func (x *DnsRegConf) GetTarget() string { + if x != nil && x.Target != nil { + return *x.Target + } + return "" +} + +func (x *DnsRegConf) GetDomain() string { + if x != nil && x.Domain != nil { + return *x.Domain + } + return "" +} + +func (x *DnsRegConf) GetPubkey() []byte { + if x != nil { + return x.Pubkey + } + return nil +} + +func (x *DnsRegConf) GetUtlsDistribution() string { + if x != nil && x.UtlsDistribution != nil { + return *x.UtlsDistribution + } + return "" +} + +func (x *DnsRegConf) GetStunServer() string { + if x != nil && x.StunServer != nil { + return *x.StunServer + } + return "" +} + +type DecoyList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TlsDecoys []*TLSDecoySpec `protobuf:"bytes,1,rep,name=tls_decoys,json=tlsDecoys" json:"tls_decoys,omitempty"` +} + +func (x *DecoyList) Reset() { + *x = DecoyList{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecoyList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecoyList) ProtoMessage() {} + +func (x *DecoyList) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecoyList.ProtoReflect.Descriptor instead. +func (*DecoyList) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{4} +} + +func (x *DecoyList) GetTlsDecoys() []*TLSDecoySpec { + if x != nil { + return x.TlsDecoys + } + return nil +} + +type PhantomSubnetsList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WeightedSubnets []*PhantomSubnets `protobuf:"bytes,1,rep,name=weighted_subnets,json=weightedSubnets" json:"weighted_subnets,omitempty"` +} + +func (x *PhantomSubnetsList) Reset() { + *x = PhantomSubnetsList{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PhantomSubnetsList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PhantomSubnetsList) ProtoMessage() {} + +func (x *PhantomSubnetsList) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PhantomSubnetsList.ProtoReflect.Descriptor instead. +func (*PhantomSubnetsList) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{5} +} + +func (x *PhantomSubnetsList) GetWeightedSubnets() []*PhantomSubnets { + if x != nil { + return x.WeightedSubnets + } + return nil +} + +type PhantomSubnets struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Weight *uint32 `protobuf:"varint,1,opt,name=weight" json:"weight,omitempty"` + Subnets []string `protobuf:"bytes,2,rep,name=subnets" json:"subnets,omitempty"` +} + +func (x *PhantomSubnets) Reset() { + *x = PhantomSubnets{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PhantomSubnets) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PhantomSubnets) ProtoMessage() {} + +func (x *PhantomSubnets) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PhantomSubnets.ProtoReflect.Descriptor instead. +func (*PhantomSubnets) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{6} +} + +func (x *PhantomSubnets) GetWeight() uint32 { + if x != nil && x.Weight != nil { + return *x.Weight + } + return 0 +} + +func (x *PhantomSubnets) GetSubnets() []string { + if x != nil { + return x.Subnets + } + return nil +} + +// Deflated ICE Candidate by seed2sdp package +type WebRTCICECandidate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // IP is represented in its 16-byte form + IpUpper *uint64 `protobuf:"varint,1,req,name=ip_upper,json=ipUpper" json:"ip_upper,omitempty"` + IpLower *uint64 `protobuf:"varint,2,req,name=ip_lower,json=ipLower" json:"ip_lower,omitempty"` + // Composed info includes port, tcptype (unset if not tcp), candidate type (host, srflx, prflx), protocol (TCP/UDP), and component (RTP/RTCP) + ComposedInfo *uint32 `protobuf:"varint,3,req,name=composed_info,json=composedInfo" json:"composed_info,omitempty"` +} + +func (x *WebRTCICECandidate) Reset() { + *x = WebRTCICECandidate{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebRTCICECandidate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebRTCICECandidate) ProtoMessage() {} + +func (x *WebRTCICECandidate) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebRTCICECandidate.ProtoReflect.Descriptor instead. +func (*WebRTCICECandidate) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{7} +} + +func (x *WebRTCICECandidate) GetIpUpper() uint64 { + if x != nil && x.IpUpper != nil { + return *x.IpUpper + } + return 0 +} + +func (x *WebRTCICECandidate) GetIpLower() uint64 { + if x != nil && x.IpLower != nil { + return *x.IpLower + } + return 0 +} + +func (x *WebRTCICECandidate) GetComposedInfo() uint32 { + if x != nil && x.ComposedInfo != nil { + return *x.ComposedInfo + } + return 0 +} + +// Deflated SDP for WebRTC by seed2sdp package +type WebRTCSDP struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *uint32 `protobuf:"varint,1,req,name=type" json:"type,omitempty"` + Candidates []*WebRTCICECandidate `protobuf:"bytes,2,rep,name=candidates" json:"candidates,omitempty"` // there could be multiple candidates +} + +func (x *WebRTCSDP) Reset() { + *x = WebRTCSDP{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebRTCSDP) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebRTCSDP) ProtoMessage() {} + +func (x *WebRTCSDP) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebRTCSDP.ProtoReflect.Descriptor instead. +func (*WebRTCSDP) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{8} +} + +func (x *WebRTCSDP) GetType() uint32 { + if x != nil && x.Type != nil { + return *x.Type + } + return 0 +} + +func (x *WebRTCSDP) GetCandidates() []*WebRTCICECandidate { + if x != nil { + return x.Candidates + } + return nil +} + +// WebRTCSignal includes a deflated SDP and a seed +type WebRTCSignal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Seed *string `protobuf:"bytes,1,req,name=seed" json:"seed,omitempty"` + Sdp *WebRTCSDP `protobuf:"bytes,2,req,name=sdp" json:"sdp,omitempty"` +} + +func (x *WebRTCSignal) Reset() { + *x = WebRTCSignal{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebRTCSignal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebRTCSignal) ProtoMessage() {} + +func (x *WebRTCSignal) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebRTCSignal.ProtoReflect.Descriptor instead. +func (*WebRTCSignal) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{9} +} + +func (x *WebRTCSignal) GetSeed() string { + if x != nil && x.Seed != nil { + return *x.Seed + } + return "" +} + +func (x *WebRTCSignal) GetSdp() *WebRTCSDP { + if x != nil { + return x.Sdp + } + return nil +} + +type StationToClient struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Should accompany (at least) SESSION_INIT and CONFIRM_RECONNECT. + ProtocolVersion *uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion" json:"protocol_version,omitempty"` + // There might be a state transition. May be absent; absence should be + // treated identically to NO_CHANGE. + StateTransition *S2C_Transition `protobuf:"varint,2,opt,name=state_transition,json=stateTransition,enum=conjure.S2C_Transition" json:"state_transition,omitempty"` + // The station can send client config info piggybacked + // on any message, as it sees fit + ConfigInfo *ClientConf `protobuf:"bytes,3,opt,name=config_info,json=configInfo" json:"config_info,omitempty"` + // If state_transition == S2C_ERROR, this field is the explanation. + ErrReason *ErrorReasonS2C `protobuf:"varint,4,opt,name=err_reason,json=errReason,enum=conjure.ErrorReasonS2C" json:"err_reason,omitempty"` + // Signals client to stop connecting for following amount of seconds + TmpBackoff *uint32 `protobuf:"varint,5,opt,name=tmp_backoff,json=tmpBackoff" json:"tmp_backoff,omitempty"` + // Sent in SESSION_INIT, identifies the station that picked up + StationId *string `protobuf:"bytes,6,opt,name=station_id,json=stationId" json:"station_id,omitempty"` + // Random-sized junk to defeat packet size fingerprinting. + Padding []byte `protobuf:"bytes,100,opt,name=padding" json:"padding,omitempty"` +} + +func (x *StationToClient) Reset() { + *x = StationToClient{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StationToClient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StationToClient) ProtoMessage() {} + +func (x *StationToClient) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StationToClient.ProtoReflect.Descriptor instead. +func (*StationToClient) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{10} +} + +func (x *StationToClient) GetProtocolVersion() uint32 { + if x != nil && x.ProtocolVersion != nil { + return *x.ProtocolVersion + } + return 0 +} + +func (x *StationToClient) GetStateTransition() S2C_Transition { + if x != nil && x.StateTransition != nil { + return *x.StateTransition + } + return S2C_Transition_S2C_NO_CHANGE +} + +func (x *StationToClient) GetConfigInfo() *ClientConf { + if x != nil { + return x.ConfigInfo + } + return nil +} + +func (x *StationToClient) GetErrReason() ErrorReasonS2C { + if x != nil && x.ErrReason != nil { + return *x.ErrReason + } + return ErrorReasonS2C_NO_ERROR +} + +func (x *StationToClient) GetTmpBackoff() uint32 { + if x != nil && x.TmpBackoff != nil { + return *x.TmpBackoff + } + return 0 +} + +func (x *StationToClient) GetStationId() string { + if x != nil && x.StationId != nil { + return *x.StationId + } + return "" +} + +func (x *StationToClient) GetPadding() []byte { + if x != nil { + return x.Padding + } + return nil +} + +type RegistrationFlags struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UploadOnly *bool `protobuf:"varint,1,opt,name=upload_only,json=uploadOnly" json:"upload_only,omitempty"` + DarkDecoy *bool `protobuf:"varint,2,opt,name=dark_decoy,json=darkDecoy" json:"dark_decoy,omitempty"` + ProxyHeader *bool `protobuf:"varint,3,opt,name=proxy_header,json=proxyHeader" json:"proxy_header,omitempty"` + Use_TIL *bool `protobuf:"varint,4,opt,name=use_TIL,json=useTIL" json:"use_TIL,omitempty"` + Prescanned *bool `protobuf:"varint,5,opt,name=prescanned" json:"prescanned,omitempty"` +} + +func (x *RegistrationFlags) Reset() { + *x = RegistrationFlags{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistrationFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistrationFlags) ProtoMessage() {} + +func (x *RegistrationFlags) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistrationFlags.ProtoReflect.Descriptor instead. +func (*RegistrationFlags) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{11} +} + +func (x *RegistrationFlags) GetUploadOnly() bool { + if x != nil && x.UploadOnly != nil { + return *x.UploadOnly + } + return false +} + +func (x *RegistrationFlags) GetDarkDecoy() bool { + if x != nil && x.DarkDecoy != nil { + return *x.DarkDecoy + } + return false +} + +func (x *RegistrationFlags) GetProxyHeader() bool { + if x != nil && x.ProxyHeader != nil { + return *x.ProxyHeader + } + return false +} + +func (x *RegistrationFlags) GetUse_TIL() bool { + if x != nil && x.Use_TIL != nil { + return *x.Use_TIL + } + return false +} + +func (x *RegistrationFlags) GetPrescanned() bool { + if x != nil && x.Prescanned != nil { + return *x.Prescanned + } + return false +} + +type ClientToStation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProtocolVersion *uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion" json:"protocol_version,omitempty"` + // The client reports its decoy list's version number here, which the + // station can use to decide whether to send an updated one. The station + // should always send a list if this field is set to 0. + DecoyListGeneration *uint32 `protobuf:"varint,2,opt,name=decoy_list_generation,json=decoyListGeneration" json:"decoy_list_generation,omitempty"` + StateTransition *C2S_Transition `protobuf:"varint,3,opt,name=state_transition,json=stateTransition,enum=conjure.C2S_Transition" json:"state_transition,omitempty"` + // The position in the overall session's upload sequence where the current + // YIELD=>ACQUIRE switchover is happening. + UploadSync *uint64 `protobuf:"varint,4,opt,name=upload_sync,json=uploadSync" json:"upload_sync,omitempty"` + // High level client library version used for indicating feature support, or + // lack therof. + ClientLibVersion *uint32 `protobuf:"varint,5,opt,name=client_lib_version,json=clientLibVersion" json:"client_lib_version,omitempty"` + // Indicates whether the client will allow the registrar to provide alternative parameters that + // may work better in substitute for the deterministically selected parameters. This only works + // for bidirectional registration methods where the client receives a RegistrationResponse. + AllowRegistrarOverrides *bool `protobuf:"varint,6,opt,name=allow_registrar_overrides,json=allowRegistrarOverrides" json:"allow_registrar_overrides,omitempty"` + // List of decoys that client have unsuccessfully tried in current session. + // Could be sent in chunks + FailedDecoys []string `protobuf:"bytes,10,rep,name=failed_decoys,json=failedDecoys" json:"failed_decoys,omitempty"` + Stats *SessionStats `protobuf:"bytes,11,opt,name=stats" json:"stats,omitempty"` + // NullTransport, MinTransport, Obfs4Transport, etc. Transport type we want from phantom proxy + Transport *TransportType `protobuf:"varint,12,opt,name=transport,enum=conjure.TransportType" json:"transport,omitempty"` + TransportParams *anypb.Any `protobuf:"bytes,13,opt,name=transport_params,json=transportParams" json:"transport_params,omitempty"` + // Station is only required to check this variable during session initialization. + // If set, station must facilitate connection to said target by itself, i.e. write into squid + // socket an HTTP/SOCKS/any other connection request. + // covert_address must have exactly one ':' colon, that separates host (literal IP address or + // resolvable hostname) and port + // TODO: make it required for initialization, and stop connecting any client straight to squid? + CovertAddress *string `protobuf:"bytes,20,opt,name=covert_address,json=covertAddress" json:"covert_address,omitempty"` + // Used in dark decoys to signal which dark decoy it will connect to. + MaskedDecoyServerName *string `protobuf:"bytes,21,opt,name=masked_decoy_server_name,json=maskedDecoyServerName" json:"masked_decoy_server_name,omitempty"` + // Used to indicate to server if client is registering v4, v6 or both + V6Support *bool `protobuf:"varint,22,opt,name=v6_support,json=v6Support" json:"v6_support,omitempty"` + V4Support *bool `protobuf:"varint,23,opt,name=v4_support,json=v4Support" json:"v4_support,omitempty"` + // A collection of optional flags for the registration. + Flags *RegistrationFlags `protobuf:"bytes,24,opt,name=flags" json:"flags,omitempty"` + // Transport Extensions + // TODO(jmwample) - move to WebRTC specific transport params protobuf message. + WebrtcSignal *WebRTCSignal `protobuf:"bytes,31,opt,name=webrtc_signal,json=webrtcSignal" json:"webrtc_signal,omitempty"` + // Random-sized junk to defeat packet size fingerprinting. + Padding []byte `protobuf:"bytes,100,opt,name=padding" json:"padding,omitempty"` +} + +func (x *ClientToStation) Reset() { + *x = ClientToStation{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientToStation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientToStation) ProtoMessage() {} + +func (x *ClientToStation) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientToStation.ProtoReflect.Descriptor instead. +func (*ClientToStation) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{12} +} + +func (x *ClientToStation) GetProtocolVersion() uint32 { + if x != nil && x.ProtocolVersion != nil { + return *x.ProtocolVersion + } + return 0 +} + +func (x *ClientToStation) GetDecoyListGeneration() uint32 { + if x != nil && x.DecoyListGeneration != nil { + return *x.DecoyListGeneration + } + return 0 +} + +func (x *ClientToStation) GetStateTransition() C2S_Transition { + if x != nil && x.StateTransition != nil { + return *x.StateTransition + } + return C2S_Transition_C2S_NO_CHANGE +} + +func (x *ClientToStation) GetUploadSync() uint64 { + if x != nil && x.UploadSync != nil { + return *x.UploadSync + } + return 0 +} + +func (x *ClientToStation) GetClientLibVersion() uint32 { + if x != nil && x.ClientLibVersion != nil { + return *x.ClientLibVersion + } + return 0 +} + +func (x *ClientToStation) GetAllowRegistrarOverrides() bool { + if x != nil && x.AllowRegistrarOverrides != nil { + return *x.AllowRegistrarOverrides + } + return false +} + +func (x *ClientToStation) GetFailedDecoys() []string { + if x != nil { + return x.FailedDecoys + } + return nil +} + +func (x *ClientToStation) GetStats() *SessionStats { + if x != nil { + return x.Stats + } + return nil +} + +func (x *ClientToStation) GetTransport() TransportType { + if x != nil && x.Transport != nil { + return *x.Transport + } + return TransportType_Null +} + +func (x *ClientToStation) GetTransportParams() *anypb.Any { + if x != nil { + return x.TransportParams + } + return nil +} + +func (x *ClientToStation) GetCovertAddress() string { + if x != nil && x.CovertAddress != nil { + return *x.CovertAddress + } + return "" +} + +func (x *ClientToStation) GetMaskedDecoyServerName() string { + if x != nil && x.MaskedDecoyServerName != nil { + return *x.MaskedDecoyServerName + } + return "" +} + +func (x *ClientToStation) GetV6Support() bool { + if x != nil && x.V6Support != nil { + return *x.V6Support + } + return false +} + +func (x *ClientToStation) GetV4Support() bool { + if x != nil && x.V4Support != nil { + return *x.V4Support + } + return false +} + +func (x *ClientToStation) GetFlags() *RegistrationFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *ClientToStation) GetWebrtcSignal() *WebRTCSignal { + if x != nil { + return x.WebrtcSignal + } + return nil +} + +func (x *ClientToStation) GetPadding() []byte { + if x != nil { + return x.Padding + } + return nil +} + +type PrefixTransportParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Prefix Identifier + PrefixId *int32 `protobuf:"varint,1,opt,name=prefix_id,json=prefixId" json:"prefix_id,omitempty"` + // Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) + // as the station cannot take this into account when attempting to identify a connection. + Prefix []byte `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"` + // Indicates whether the client has elected to use destination port randomization. Should be + // checked against selected transport to ensure that destination port randomization is + // supported. + RandomizeDstPort *bool `protobuf:"varint,13,opt,name=randomize_dst_port,json=randomizeDstPort" json:"randomize_dst_port,omitempty"` +} + +func (x *PrefixTransportParams) Reset() { + *x = PrefixTransportParams{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrefixTransportParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrefixTransportParams) ProtoMessage() {} + +func (x *PrefixTransportParams) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrefixTransportParams.ProtoReflect.Descriptor instead. +func (*PrefixTransportParams) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{13} +} + +func (x *PrefixTransportParams) GetPrefixId() int32 { + if x != nil && x.PrefixId != nil { + return *x.PrefixId + } + return 0 +} + +func (x *PrefixTransportParams) GetPrefix() []byte { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *PrefixTransportParams) GetRandomizeDstPort() bool { + if x != nil && x.RandomizeDstPort != nil { + return *x.RandomizeDstPort + } + return false +} + +type GenericTransportParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the client has elected to use destination port randomization. Should be + // checked against selected transport to ensure that destination port randomization is + // supported. + RandomizeDstPort *bool `protobuf:"varint,13,opt,name=randomize_dst_port,json=randomizeDstPort" json:"randomize_dst_port,omitempty"` +} + +func (x *GenericTransportParams) Reset() { + *x = GenericTransportParams{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenericTransportParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericTransportParams) ProtoMessage() {} + +func (x *GenericTransportParams) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericTransportParams.ProtoReflect.Descriptor instead. +func (*GenericTransportParams) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{14} +} + +func (x *GenericTransportParams) GetRandomizeDstPort() bool { + if x != nil && x.RandomizeDstPort != nil { + return *x.RandomizeDstPort + } + return false +} + +type C2SWrapper struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SharedSecret []byte `protobuf:"bytes,1,opt,name=shared_secret,json=sharedSecret" json:"shared_secret,omitempty"` + RegistrationPayload *ClientToStation `protobuf:"bytes,3,opt,name=registration_payload,json=registrationPayload" json:"registration_payload,omitempty"` + RegistrationSource *RegistrationSource `protobuf:"varint,4,opt,name=registration_source,json=registrationSource,enum=conjure.RegistrationSource" json:"registration_source,omitempty"` + // client source address when receiving a registration + RegistrationAddress []byte `protobuf:"bytes,6,opt,name=registration_address,json=registrationAddress" json:"registration_address,omitempty"` + // Decoy address used when registering over Decoy registrar + DecoyAddress []byte `protobuf:"bytes,7,opt,name=decoy_address,json=decoyAddress" json:"decoy_address,omitempty"` + // The next three fields allow an independent registrar (trusted by a station w/ a zmq keypair) to + // share the registration overrides that it assigned to the client with the station(s). + // Registration Respose is here to allow a parsed object with direct access to the fields within. + // RegRespBytes provides a serialized verion of the Registration response so that the signature of + // the Bidirectional registrar can be validated before a station applies any overrides present in + // the Registration Response. + // + // If you are reading this in the future and you want to extend the functionality here it might + // make sense to make the RegistrationResponse that is sent to the client a distinct message from + // the one that gets sent to the stations. + RegistrationResponse *RegistrationResponse `protobuf:"bytes,8,opt,name=registration_response,json=registrationResponse" json:"registration_response,omitempty"` + RegRespBytes []byte `protobuf:"bytes,9,opt,name=RegRespBytes" json:"RegRespBytes,omitempty"` + RegRespSignature []byte `protobuf:"bytes,10,opt,name=RegRespSignature" json:"RegRespSignature,omitempty"` +} + +func (x *C2SWrapper) Reset() { + *x = C2SWrapper{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *C2SWrapper) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*C2SWrapper) ProtoMessage() {} + +func (x *C2SWrapper) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use C2SWrapper.ProtoReflect.Descriptor instead. +func (*C2SWrapper) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{15} +} + +func (x *C2SWrapper) GetSharedSecret() []byte { + if x != nil { + return x.SharedSecret + } + return nil +} + +func (x *C2SWrapper) GetRegistrationPayload() *ClientToStation { + if x != nil { + return x.RegistrationPayload + } + return nil +} + +func (x *C2SWrapper) GetRegistrationSource() RegistrationSource { + if x != nil && x.RegistrationSource != nil { + return *x.RegistrationSource + } + return RegistrationSource_Unspecified +} + +func (x *C2SWrapper) GetRegistrationAddress() []byte { + if x != nil { + return x.RegistrationAddress + } + return nil +} + +func (x *C2SWrapper) GetDecoyAddress() []byte { + if x != nil { + return x.DecoyAddress + } + return nil +} + +func (x *C2SWrapper) GetRegistrationResponse() *RegistrationResponse { + if x != nil { + return x.RegistrationResponse + } + return nil +} + +func (x *C2SWrapper) GetRegRespBytes() []byte { + if x != nil { + return x.RegRespBytes + } + return nil +} + +func (x *C2SWrapper) GetRegRespSignature() []byte { + if x != nil { + return x.RegRespSignature + } + return nil +} + +type SessionStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FailedDecoysAmount *uint32 `protobuf:"varint,20,opt,name=failed_decoys_amount,json=failedDecoysAmount" json:"failed_decoys_amount,omitempty"` // how many decoys were tried before success + // Applicable to whole session: + TotalTimeToConnect *uint32 `protobuf:"varint,31,opt,name=total_time_to_connect,json=totalTimeToConnect" json:"total_time_to_connect,omitempty"` // includes failed attempts + // Last (i.e. successful) decoy: + RttToStation *uint32 `protobuf:"varint,33,opt,name=rtt_to_station,json=rttToStation" json:"rtt_to_station,omitempty"` // measured during initial handshake + TlsToDecoy *uint32 `protobuf:"varint,38,opt,name=tls_to_decoy,json=tlsToDecoy" json:"tls_to_decoy,omitempty"` // includes tcp to decoy + TcpToDecoy *uint32 `protobuf:"varint,39,opt,name=tcp_to_decoy,json=tcpToDecoy" json:"tcp_to_decoy,omitempty"` // measured when establishing tcp connection to decot +} + +func (x *SessionStats) Reset() { + *x = SessionStats{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SessionStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionStats) ProtoMessage() {} + +func (x *SessionStats) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionStats.ProtoReflect.Descriptor instead. +func (*SessionStats) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{16} +} + +func (x *SessionStats) GetFailedDecoysAmount() uint32 { + if x != nil && x.FailedDecoysAmount != nil { + return *x.FailedDecoysAmount + } + return 0 +} + +func (x *SessionStats) GetTotalTimeToConnect() uint32 { + if x != nil && x.TotalTimeToConnect != nil { + return *x.TotalTimeToConnect + } + return 0 +} + +func (x *SessionStats) GetRttToStation() uint32 { + if x != nil && x.RttToStation != nil { + return *x.RttToStation + } + return 0 +} + +func (x *SessionStats) GetTlsToDecoy() uint32 { + if x != nil && x.TlsToDecoy != nil { + return *x.TlsToDecoy + } + return 0 +} + +func (x *SessionStats) GetTcpToDecoy() uint32 { + if x != nil && x.TcpToDecoy != nil { + return *x.TcpToDecoy + } + return 0 +} + +type StationToDetector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PhantomIp *string `protobuf:"bytes,1,opt,name=phantom_ip,json=phantomIp" json:"phantom_ip,omitempty"` + ClientIp *string `protobuf:"bytes,2,opt,name=client_ip,json=clientIp" json:"client_ip,omitempty"` + TimeoutNs *uint64 `protobuf:"varint,3,opt,name=timeout_ns,json=timeoutNs" json:"timeout_ns,omitempty"` + Operation *StationOperations `protobuf:"varint,4,opt,name=operation,enum=conjure.StationOperations" json:"operation,omitempty"` + DstPort *uint32 `protobuf:"varint,10,opt,name=dst_port,json=dstPort" json:"dst_port,omitempty"` + SrcPort *uint32 `protobuf:"varint,11,opt,name=src_port,json=srcPort" json:"src_port,omitempty"` + Proto *IPProto `protobuf:"varint,12,opt,name=proto,enum=conjure.IPProto" json:"proto,omitempty"` +} + +func (x *StationToDetector) Reset() { + *x = StationToDetector{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StationToDetector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StationToDetector) ProtoMessage() {} + +func (x *StationToDetector) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StationToDetector.ProtoReflect.Descriptor instead. +func (*StationToDetector) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{17} +} + +func (x *StationToDetector) GetPhantomIp() string { + if x != nil && x.PhantomIp != nil { + return *x.PhantomIp + } + return "" +} + +func (x *StationToDetector) GetClientIp() string { + if x != nil && x.ClientIp != nil { + return *x.ClientIp + } + return "" +} + +func (x *StationToDetector) GetTimeoutNs() uint64 { + if x != nil && x.TimeoutNs != nil { + return *x.TimeoutNs + } + return 0 +} + +func (x *StationToDetector) GetOperation() StationOperations { + if x != nil && x.Operation != nil { + return *x.Operation + } + return StationOperations_Unknown +} + +func (x *StationToDetector) GetDstPort() uint32 { + if x != nil && x.DstPort != nil { + return *x.DstPort + } + return 0 +} + +func (x *StationToDetector) GetSrcPort() uint32 { + if x != nil && x.SrcPort != nil { + return *x.SrcPort + } + return 0 +} + +func (x *StationToDetector) GetProto() IPProto { + if x != nil && x.Proto != nil { + return *x.Proto + } + return IPProto_Unk +} + +// Adding message response from Station to Client for bidirectional API +type RegistrationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ipv4Addr *uint32 `protobuf:"fixed32,1,opt,name=ipv4addr" json:"ipv4addr,omitempty"` + // The 128-bit ipv6 address, in network byte order + Ipv6Addr []byte `protobuf:"bytes,2,opt,name=ipv6addr" json:"ipv6addr,omitempty"` + // Respond with randomized port + DstPort *uint32 `protobuf:"varint,3,opt,name=dst_port,json=dstPort" json:"dst_port,omitempty"` + // Future: station provides client with secret, want chanel present + // Leave null for now + ServerRandom []byte `protobuf:"bytes,4,opt,name=serverRandom" json:"serverRandom,omitempty"` + // If registration wrong, populate this error string + Error *string `protobuf:"bytes,5,opt,name=error" json:"error,omitempty"` + // ClientConf field (optional) + ClientConf *ClientConf `protobuf:"bytes,6,opt,name=clientConf" json:"clientConf,omitempty"` + // Transport Params to if `allow_registrar_overrides` is set. + TransportParams *anypb.Any `protobuf:"bytes,10,opt,name=transport_params,json=transportParams" json:"transport_params,omitempty"` +} + +func (x *RegistrationResponse) Reset() { + *x = RegistrationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistrationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistrationResponse) ProtoMessage() {} + +func (x *RegistrationResponse) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistrationResponse.ProtoReflect.Descriptor instead. +func (*RegistrationResponse) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{18} +} + +func (x *RegistrationResponse) GetIpv4Addr() uint32 { + if x != nil && x.Ipv4Addr != nil { + return *x.Ipv4Addr + } + return 0 +} + +func (x *RegistrationResponse) GetIpv6Addr() []byte { + if x != nil { + return x.Ipv6Addr + } + return nil +} + +func (x *RegistrationResponse) GetDstPort() uint32 { + if x != nil && x.DstPort != nil { + return *x.DstPort + } + return 0 +} + +func (x *RegistrationResponse) GetServerRandom() []byte { + if x != nil { + return x.ServerRandom + } + return nil +} + +func (x *RegistrationResponse) GetError() string { + if x != nil && x.Error != nil { + return *x.Error + } + return "" +} + +func (x *RegistrationResponse) GetClientConf() *ClientConf { + if x != nil { + return x.ClientConf + } + return nil +} + +func (x *RegistrationResponse) GetTransportParams() *anypb.Any { + if x != nil { + return x.TransportParams + } + return nil +} + +// response from dns +type DnsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success *bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"` + ClientconfOutdated *bool `protobuf:"varint,2,opt,name=clientconf_outdated,json=clientconfOutdated" json:"clientconf_outdated,omitempty"` + BidirectionalResponse *RegistrationResponse `protobuf:"bytes,3,opt,name=bidirectional_response,json=bidirectionalResponse" json:"bidirectional_response,omitempty"` +} + +func (x *DnsResponse) Reset() { + *x = DnsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_signalling_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsResponse) ProtoMessage() {} + +func (x *DnsResponse) ProtoReflect() protoreflect.Message { + mi := &file_signalling_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsResponse.ProtoReflect.Descriptor instead. +func (*DnsResponse) Descriptor() ([]byte, []int) { + return file_signalling_proto_rawDescGZIP(), []int{19} +} + +func (x *DnsResponse) GetSuccess() bool { + if x != nil && x.Success != nil { + return *x.Success + } + return false +} + +func (x *DnsResponse) GetClientconfOutdated() bool { + if x != nil && x.ClientconfOutdated != nil { + return *x.ClientconfOutdated + } + return false +} + +func (x *DnsResponse) GetBidirectionalResponse() *RegistrationResponse { + if x != nil { + return x.BidirectionalResponse + } + return nil +} + +var File_signalling_proto protoreflect.FileDescriptor + +var file_signalling_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0c, 0x54, 0x4c, 0x53, + 0x44, 0x65, 0x63, 0x6f, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, + 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, 0x12, 0x27, 0x0a, + 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x63, 0x70, 0x77, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x06, 0x74, 0x63, 0x70, 0x77, 0x69, 0x6e, 0x22, 0xd5, 0x02, 0x0a, 0x0a, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6f, 0x79, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, + 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0e, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x62, + 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x14, 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x75, + 0x62, 0x6e, 0x65, 0x74, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x68, 0x61, 0x6e, 0x74, + 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x12, 0x70, + 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, + 0x75, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6a, + 0x75, 0x72, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x0c, 0x64, 0x6e, 0x73, + 0x5f, 0x72, 0x65, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x0a, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x43, 0x6f, 0x6e, 0x66, + 0x22, 0xdf, 0x01, 0x0a, 0x0a, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x12, + 0x3b, 0x0a, 0x0e, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, + 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0c, + 0x64, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x74, 0x6c, 0x73, 0x5f, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x75, 0x74, 0x6c, 0x73, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x75, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x75, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x22, 0x41, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x34, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x54, 0x4c, + 0x53, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x74, 0x6c, 0x73, 0x44, + 0x65, 0x63, 0x6f, 0x79, 0x73, 0x22, 0x58, 0x0a, 0x12, 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, + 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x10, 0x77, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, + 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x0f, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x22, + 0x42, 0x0a, 0x0e, 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, + 0x6e, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x73, 0x22, 0x6f, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x49, 0x43, 0x45, + 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x70, 0x5f, + 0x75, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x69, 0x70, 0x55, + 0x70, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x70, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x69, 0x70, 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x12, + 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5c, 0x0a, 0x09, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x44, + 0x50, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, + 0x75, 0x72, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x49, 0x43, 0x45, 0x43, 0x61, 0x6e, + 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x73, 0x22, 0x48, 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x03, 0x73, 0x64, 0x70, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x57, 0x65, + 0x62, 0x52, 0x54, 0x43, 0x53, 0x44, 0x50, 0x52, 0x03, 0x73, 0x64, 0x70, 0x22, 0xc8, 0x02, 0x0a, + 0x0f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x10, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, + 0x53, 0x32, 0x43, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x34, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, + 0x75, 0x72, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x53, + 0x32, 0x43, 0x52, 0x09, 0x65, 0x72, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x6d, 0x70, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6d, 0x70, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xaf, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1d, + 0x0a, 0x0a, 0x64, 0x61, 0x72, 0x6b, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x64, 0x61, 0x72, 0x6b, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x12, 0x21, 0x0a, + 0x0c, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x5f, 0x54, 0x49, 0x4c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x75, 0x73, 0x65, 0x54, 0x49, 0x4c, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, + 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, + 0x72, 0x65, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x22, 0xae, 0x06, 0x0a, 0x0f, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x6f, + 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x10, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, + 0x2e, 0x43, 0x32, 0x53, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x6e, + 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x62, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x3a, 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x72, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x73, + 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x34, 0x0a, + 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6d, + 0x61, 0x73, 0x6b, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, + 0x61, 0x73, 0x6b, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x36, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x76, 0x36, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x34, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x76, 0x34, 0x53, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0d, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x5f, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, + 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x7a, 0x0a, 0x15, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x61, 0x6e, 0x64, + 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x44, + 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x46, 0x0a, 0x16, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x73, + 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x61, + 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xc8, + 0x03, 0x0a, 0x0a, 0x43, 0x32, 0x53, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x23, 0x0a, + 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x4c, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, + 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x31, 0x0a, + 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x15, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0c, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, + 0x10, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x5f, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x44, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x15, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, + 0x24, 0x0a, 0x0e, 0x72, 0x74, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x74, 0x74, 0x54, 0x6f, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, + 0x64, 0x65, 0x63, 0x6f, 0x79, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6c, 0x73, + 0x54, 0x6f, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x63, 0x70, 0x5f, 0x74, + 0x6f, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, + 0x63, 0x70, 0x54, 0x6f, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x22, 0x86, 0x02, 0x0a, 0x11, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x49, 0x70, 0x12, 0x1b, + 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4e, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, + 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x05, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, + 0x75, 0x72, 0x65, 0x2e, 0x49, 0x50, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x99, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x08, 0x69, + 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, + 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, + 0x64, 0x64, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x64, + 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, + 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x3f, 0x0a, + 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xae, + 0x01, 0x0a, 0x0b, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6e, + 0x66, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x16, 0x62, 0x69, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, + 0x75, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x62, 0x69, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, + 0x2b, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, + 0x53, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x31, 0x32, 0x38, 0x10, 0x5a, 0x12, 0x0f, 0x0a, 0x0b, 0x41, + 0x45, 0x53, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x5b, 0x2a, 0x29, 0x0a, 0x0c, + 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, + 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x07, + 0x0a, 0x03, 0x44, 0x4f, 0x48, 0x10, 0x03, 0x2a, 0xe7, 0x01, 0x0a, 0x0e, 0x43, 0x32, 0x53, 0x5f, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x32, + 0x53, 0x5f, 0x4e, 0x4f, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, + 0x10, 0x43, 0x32, 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x49, + 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x32, 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x0b, + 0x12, 0x18, 0x0a, 0x14, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x5f, 0x52, + 0x45, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x32, + 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, + 0x03, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x32, 0x53, 0x5f, 0x59, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, + 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x32, 0x53, 0x5f, 0x41, + 0x43, 0x51, 0x55, 0x49, 0x52, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x12, + 0x20, 0x0a, 0x1c, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x5f, 0x55, 0x50, + 0x4c, 0x4f, 0x41, 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x4e, 0x10, + 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xff, + 0x01, 0x2a, 0x98, 0x01, 0x0a, 0x0e, 0x53, 0x32, 0x43, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x32, 0x43, 0x5f, 0x4e, 0x4f, 0x5f, 0x43, + 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x32, 0x43, 0x5f, 0x53, + 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, + 0x17, 0x53, 0x32, 0x43, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x56, + 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x32, + 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x4e, + 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x32, 0x43, 0x5f, 0x53, 0x45, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x09, + 0x53, 0x32, 0x43, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xff, 0x01, 0x2a, 0xac, 0x01, 0x0a, + 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x53, 0x32, 0x43, 0x12, + 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x11, 0x0a, + 0x0d, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x01, + 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, + 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x04, + 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x43, 0x4f, 0x59, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x4c, 0x4f, + 0x41, 0x44, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, + 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x65, 0x2a, 0x82, 0x01, 0x0a, 0x0d, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, + 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x69, 0x6e, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x62, 0x66, 0x73, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, + 0x54, 0x4c, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, + 0x04, 0x12, 0x08, 0x0a, 0x04, 0x75, 0x54, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x53, 0x4d, 0x10, + 0x07, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x54, 0x45, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x51, 0x75, + 0x69, 0x63, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x65, 0x62, 0x72, 0x74, 0x63, 0x10, 0x63, + 0x2a, 0x86, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x10, 0x02, 0x12, + 0x13, 0x0a, 0x0f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x73, 0x63, + 0x61, 0x6e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x50, 0x49, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4e, + 0x53, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x4e, 0x53, 0x10, 0x06, 0x2a, 0x40, 0x0a, 0x11, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0b, + 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, + 0x65, 0x77, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x02, + 0x12, 0x09, 0x0a, 0x05, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x10, 0x03, 0x2a, 0x24, 0x0a, 0x07, 0x49, + 0x50, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x6e, 0x6b, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x54, 0x63, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x64, 0x70, 0x10, + 0x02, +} + +var ( + file_signalling_proto_rawDescOnce sync.Once + file_signalling_proto_rawDescData = file_signalling_proto_rawDesc +) + +func file_signalling_proto_rawDescGZIP() []byte { + file_signalling_proto_rawDescOnce.Do(func() { + file_signalling_proto_rawDescData = protoimpl.X.CompressGZIP(file_signalling_proto_rawDescData) + }) + return file_signalling_proto_rawDescData +} + +var file_signalling_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_signalling_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_signalling_proto_goTypes = []interface{}{ + (KeyType)(0), // 0: conjure.KeyType + (DnsRegMethod)(0), // 1: conjure.DnsRegMethod + (C2S_Transition)(0), // 2: conjure.C2S_Transition + (S2C_Transition)(0), // 3: conjure.S2C_Transition + (ErrorReasonS2C)(0), // 4: conjure.ErrorReasonS2C + (TransportType)(0), // 5: conjure.TransportType + (RegistrationSource)(0), // 6: conjure.RegistrationSource + (StationOperations)(0), // 7: conjure.StationOperations + (IPProto)(0), // 8: conjure.IPProto + (*PubKey)(nil), // 9: conjure.PubKey + (*TLSDecoySpec)(nil), // 10: conjure.TLSDecoySpec + (*ClientConf)(nil), // 11: conjure.ClientConf + (*DnsRegConf)(nil), // 12: conjure.DnsRegConf + (*DecoyList)(nil), // 13: conjure.DecoyList + (*PhantomSubnetsList)(nil), // 14: conjure.PhantomSubnetsList + (*PhantomSubnets)(nil), // 15: conjure.PhantomSubnets + (*WebRTCICECandidate)(nil), // 16: conjure.WebRTCICECandidate + (*WebRTCSDP)(nil), // 17: conjure.WebRTCSDP + (*WebRTCSignal)(nil), // 18: conjure.WebRTCSignal + (*StationToClient)(nil), // 19: conjure.StationToClient + (*RegistrationFlags)(nil), // 20: conjure.RegistrationFlags + (*ClientToStation)(nil), // 21: conjure.ClientToStation + (*PrefixTransportParams)(nil), // 22: conjure.PrefixTransportParams + (*GenericTransportParams)(nil), // 23: conjure.GenericTransportParams + (*C2SWrapper)(nil), // 24: conjure.C2SWrapper + (*SessionStats)(nil), // 25: conjure.SessionStats + (*StationToDetector)(nil), // 26: conjure.StationToDetector + (*RegistrationResponse)(nil), // 27: conjure.RegistrationResponse + (*DnsResponse)(nil), // 28: conjure.DnsResponse + (*anypb.Any)(nil), // 29: google.protobuf.Any +} +var file_signalling_proto_depIdxs = []int32{ + 0, // 0: conjure.PubKey.type:type_name -> conjure.KeyType + 9, // 1: conjure.TLSDecoySpec.pubkey:type_name -> conjure.PubKey + 13, // 2: conjure.ClientConf.decoy_list:type_name -> conjure.DecoyList + 9, // 3: conjure.ClientConf.default_pubkey:type_name -> conjure.PubKey + 14, // 4: conjure.ClientConf.phantom_subnets_list:type_name -> conjure.PhantomSubnetsList + 9, // 5: conjure.ClientConf.conjure_pubkey:type_name -> conjure.PubKey + 12, // 6: conjure.ClientConf.dns_reg_conf:type_name -> conjure.DnsRegConf + 1, // 7: conjure.DnsRegConf.dns_reg_method:type_name -> conjure.DnsRegMethod + 10, // 8: conjure.DecoyList.tls_decoys:type_name -> conjure.TLSDecoySpec + 15, // 9: conjure.PhantomSubnetsList.weighted_subnets:type_name -> conjure.PhantomSubnets + 16, // 10: conjure.WebRTCSDP.candidates:type_name -> conjure.WebRTCICECandidate + 17, // 11: conjure.WebRTCSignal.sdp:type_name -> conjure.WebRTCSDP + 3, // 12: conjure.StationToClient.state_transition:type_name -> conjure.S2C_Transition + 11, // 13: conjure.StationToClient.config_info:type_name -> conjure.ClientConf + 4, // 14: conjure.StationToClient.err_reason:type_name -> conjure.ErrorReasonS2C + 2, // 15: conjure.ClientToStation.state_transition:type_name -> conjure.C2S_Transition + 25, // 16: conjure.ClientToStation.stats:type_name -> conjure.SessionStats + 5, // 17: conjure.ClientToStation.transport:type_name -> conjure.TransportType + 29, // 18: conjure.ClientToStation.transport_params:type_name -> google.protobuf.Any + 20, // 19: conjure.ClientToStation.flags:type_name -> conjure.RegistrationFlags + 18, // 20: conjure.ClientToStation.webrtc_signal:type_name -> conjure.WebRTCSignal + 21, // 21: conjure.C2SWrapper.registration_payload:type_name -> conjure.ClientToStation + 6, // 22: conjure.C2SWrapper.registration_source:type_name -> conjure.RegistrationSource + 27, // 23: conjure.C2SWrapper.registration_response:type_name -> conjure.RegistrationResponse + 7, // 24: conjure.StationToDetector.operation:type_name -> conjure.StationOperations + 8, // 25: conjure.StationToDetector.proto:type_name -> conjure.IPProto + 11, // 26: conjure.RegistrationResponse.clientConf:type_name -> conjure.ClientConf + 29, // 27: conjure.RegistrationResponse.transport_params:type_name -> google.protobuf.Any + 27, // 28: conjure.DnsResponse.bidirectional_response:type_name -> conjure.RegistrationResponse + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name +} + +func init() { file_signalling_proto_init() } +func file_signalling_proto_init() { + if File_signalling_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_signalling_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLSDecoySpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientConf); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsRegConf); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecoyList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PhantomSubnetsList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PhantomSubnets); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebRTCICECandidate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebRTCSDP); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebRTCSignal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StationToClient); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistrationFlags); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientToStation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrefixTransportParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericTransportParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*C2SWrapper); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SessionStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StationToDetector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistrationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_signalling_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_signalling_proto_rawDesc, + NumEnums: 9, + NumMessages: 20, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_signalling_proto_goTypes, + DependencyIndexes: file_signalling_proto_depIdxs, + EnumInfos: file_signalling_proto_enumTypes, + MessageInfos: file_signalling_proto_msgTypes, + }.Build() + File_signalling_proto = out.File + file_signalling_proto_rawDesc = nil + file_signalling_proto_goTypes = nil + file_signalling_proto_depIdxs = nil +} diff --git a/proto/signalling.proto b/proto/signalling.proto index 4cafa1ad..cf3eb415 100644 --- a/proto/signalling.proto +++ b/proto/signalling.proto @@ -4,7 +4,7 @@ syntax = "proto2"; // At some point we will want to migrate to proto3, but we are not // using any proto3 features yet. -package tapdance; +package conjure; import "google/protobuf/any.proto"; @@ -87,24 +87,23 @@ message ClientConf { optional PubKey default_pubkey = 3; optional PhantomSubnetsList phantom_subnets_list = 4; optional PubKey conjure_pubkey = 5; + optional DnsRegConf dns_reg_conf = 6; } // Configuration for DNS registrar message DnsRegConf { required DnsRegMethod dns_reg_method = 1; - optional string udp_addr = 2; - optional string dot_addr = 3; - optional string doh_url = 4; - required string domain = 5; - optional bytes pubkey = 6; - optional string utls_distribution = 7; - optional string stun_server = 8; + optional string target = 2; + required string domain = 3; + optional bytes pubkey = 4; + optional string utls_distribution = 5; + optional string stun_server = 6; } enum DnsRegMethod { - UDP = 0; - DOT = 1; - DOH = 2; + UDP = 1; + DOT = 2; + DOH = 3; } message DecoyList { @@ -160,7 +159,14 @@ enum ErrorReasonS2C { enum TransportType { Null = 0; Min = 1; // Send a 32-byte HMAC id to let the station distinguish registrations to same host - Obfs4 = 2; // Not implemented yet? + Obfs4 = 2; + DTLS = 3; // UDP transport: DTLS + Prefix = 4; // dynamic prefix transport (and updated Min) + uTLS = 5; // uTLS based transport + Format = 6; // Formatting transport - format first, format all + WASM = 7; // WebAssembly + FTE = 8; // Format transforming encryption + Quic = 9; // quic transport? Webrtc = 99; // UDP transport: WebRTC DataChannel } @@ -175,7 +181,7 @@ message WebRTCICECandidate { // Deflated SDP for WebRTC by seed2sdp package message WebRTCSDP { - required uint32 type = 1; + required uint32 type = 1; repeated WebRTCICECandidate candidates = 2; // there could be multiple candidates } @@ -236,6 +242,11 @@ message ClientToStation { // lack therof. optional uint32 client_lib_version = 5; + // Indicates whether the client will allow the registrar to provide alternative parameters that + // may work better in substitute for the deterministically selected parameters. This only works + // for bidirectional registration methods where the client receives a RegistrationResponse. + optional bool allow_registrar_overrides = 6; + // List of decoys that client have unsuccessfully tried in current session. // Could be sent in chunks repeated string failed_decoys = 10; @@ -273,10 +284,30 @@ message ClientToStation { optional bytes padding = 100; } + +message PrefixTransportParams { + // Prefix Identifier + optional int32 prefix_id = 1; + + // Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) + // as the station cannot take this into account when attempting to identify a connection. + optional bytes prefix = 2; + + // // potential future fields + // obfuscator ID + // tagEncoder ID (¶ms?, e.g. format-base64 / padding) + // streamEncoder ID (¶ms?, e.g. foramat-base64 / padding) + + // Indicates whether the client has elected to use destination port randomization. Should be + // checked against selected transport to ensure that destination port randomization is + // supported. + optional bool randomize_dst_port = 13; +} + message GenericTransportParams { - // Indicates whether the client has elected to use destination port - // randomization. Should be checked against selected transport to ensure - // that destination port randomization is supported. + // Indicates whether the client has elected to use destination port randomization. Should be + // checked against selected transport to ensure that destination port randomization is + // supported. optional bool randomize_dst_port = 13; } @@ -301,7 +332,19 @@ message C2SWrapper { // Decoy address used when registering over Decoy registrar optional bytes decoy_address = 7; + // The next three fields allow an independent registrar (trusted by a station w/ a zmq keypair) to + // share the registration overrides that it assigned to the client with the station(s). + // Registration Respose is here to allow a parsed object with direct access to the fields within. + // RegRespBytes provides a serialized verion of the Registration response so that the signature of + // the Bidirectional registrar can be validated before a station applies any overrides present in + // the Registration Response. + // + // If you are reading this in the future and you want to extend the functionality here it might + // make sense to make the RegistrationResponse that is sent to the client a distinct message from + // the one that gets sent to the stations. optional RegistrationResponse registration_response = 8; + optional bytes RegRespBytes = 9; + optional bytes RegRespSignature = 10; } message SessionStats { @@ -362,6 +405,9 @@ message RegistrationResponse { // ClientConf field (optional) optional ClientConf clientConf = 6; + + // Transport Params to if `allow_registrar_overrides` is set. + optional google.protobuf.Any transport_params = 10; } // response from dns @@ -369,4 +415,4 @@ message DnsResponse { optional bool success = 1; optional bool clientconf_outdated = 2; optional RegistrationResponse bidirectional_response = 3; -} \ No newline at end of file +} diff --git a/proto/signalling.rs b/proto/signalling.rs index 2430d065..6a5c31b1 100644 --- a/proto/signalling.rs +++ b/proto/signalling.rs @@ -26,16 +26,16 @@ const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.PubKey) +// @@protoc_insertion_point(message:conjure.PubKey) pub struct PubKey { // message fields /// A public key, as used by the station. - // @@protoc_insertion_point(field:tapdance.PubKey.key) + // @@protoc_insertion_point(field:conjure.PubKey.key) pub key: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.PubKey.type) + // @@protoc_insertion_point(field:conjure.PubKey.type) pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:tapdance.PubKey.special_fields) + // @@protoc_insertion_point(special_field:conjure.PubKey.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -86,7 +86,7 @@ impl PubKey { self.key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .tapdance.KeyType type = 2; + // optional .conjure.KeyType type = 2; pub fn type_(&self) -> KeyType { match self.type_ { @@ -225,37 +225,37 @@ impl ::protobuf::reflect::ProtobufValue for PubKey { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.TLSDecoySpec) +// @@protoc_insertion_point(message:conjure.TLSDecoySpec) pub struct TLSDecoySpec { // message fields /// The hostname/SNI to use for this host /// /// The hostname is the only required field, although other /// fields are expected to be present in most cases. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.hostname) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.hostname) pub hostname: ::std::option::Option<::std::string::String>, /// The 32-bit ipv4 address, in network byte order /// /// If the IPv4 address is absent, then it may be resolved via /// DNS by the client, or the client may discard this decoy spec /// if local DNS is untrusted, or the service may be multihomed. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv4addr) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv6addr) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// The Tapdance station public key to use when contacting this /// decoy /// /// If omitted, the default station public key (if any) is used. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.pubkey) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.pubkey) pub pubkey: ::protobuf::MessageField, /// The maximum duration, in milliseconds, to maintain an open /// connection to this decoy (because the decoy may close the /// connection itself after this length of time) /// /// If omitted, a default of 30,000 milliseconds is assumed. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.timeout) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.timeout) pub timeout: ::std::option::Option, /// The maximum TCP window size to attempt to use for this decoy. /// @@ -264,10 +264,10 @@ pub struct TLSDecoySpec { /// TODO: the default is based on the current heuristic of only /// using decoys that permit windows of 15KB or larger. If this /// heuristic changes, then this default doesn't make sense. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.tcpwin) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.tcpwin) pub tcpwin: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.TLSDecoySpec.special_fields) + // @@protoc_insertion_point(special_field:conjure.TLSDecoySpec.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -593,21 +593,23 @@ impl ::protobuf::reflect::ProtobufValue for TLSDecoySpec { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.ClientConf) +// @@protoc_insertion_point(message:conjure.ClientConf) pub struct ClientConf { // message fields - // @@protoc_insertion_point(field:tapdance.ClientConf.decoy_list) + // @@protoc_insertion_point(field:conjure.ClientConf.decoy_list) pub decoy_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.ClientConf.generation) + // @@protoc_insertion_point(field:conjure.ClientConf.generation) pub generation: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.ClientConf.default_pubkey) + // @@protoc_insertion_point(field:conjure.ClientConf.default_pubkey) pub default_pubkey: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.ClientConf.phantom_subnets_list) + // @@protoc_insertion_point(field:conjure.ClientConf.phantom_subnets_list) pub phantom_subnets_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.ClientConf.conjure_pubkey) + // @@protoc_insertion_point(field:conjure.ClientConf.conjure_pubkey) pub conjure_pubkey: ::protobuf::MessageField, + // @@protoc_insertion_point(field:conjure.ClientConf.dns_reg_conf) + pub dns_reg_conf: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:tapdance.ClientConf.special_fields) + // @@protoc_insertion_point(special_field:conjure.ClientConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -642,7 +644,7 @@ impl ClientConf { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); + let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, DecoyList>( "decoy_list", @@ -669,6 +671,11 @@ impl ClientConf { |m: &ClientConf| { &m.conjure_pubkey }, |m: &mut ClientConf| { &mut m.conjure_pubkey }, )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, DnsRegConf>( + "dns_reg_conf", + |m: &ClientConf| { &m.dns_reg_conf }, + |m: &mut ClientConf| { &mut m.dns_reg_conf }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ClientConf", fields, @@ -681,6 +688,31 @@ impl ::protobuf::Message for ClientConf { const NAME: &'static str = "ClientConf"; fn is_initialized(&self) -> bool { + for v in &self.decoy_list { + if !v.is_initialized() { + return false; + } + }; + for v in &self.default_pubkey { + if !v.is_initialized() { + return false; + } + }; + for v in &self.phantom_subnets_list { + if !v.is_initialized() { + return false; + } + }; + for v in &self.conjure_pubkey { + if !v.is_initialized() { + return false; + } + }; + for v in &self.dns_reg_conf { + if !v.is_initialized() { + return false; + } + }; true } @@ -702,6 +734,9 @@ impl ::protobuf::Message for ClientConf { 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.conjure_pubkey)?; }, + 50 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.dns_reg_conf)?; + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -733,6 +768,10 @@ impl ::protobuf::Message for ClientConf { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.dns_reg_conf.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -754,6 +793,9 @@ impl ::protobuf::Message for ClientConf { if let Some(v) = self.conjure_pubkey.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } + if let Some(v) = self.dns_reg_conf.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -776,6 +818,7 @@ impl ::protobuf::Message for ClientConf { self.default_pubkey.clear(); self.phantom_subnets_list.clear(); self.conjure_pubkey.clear(); + self.dns_reg_conf.clear(); self.special_fields.clear(); } @@ -786,6 +829,7 @@ impl ::protobuf::Message for ClientConf { default_pubkey: ::protobuf::MessageField::none(), phantom_subnets_list: ::protobuf::MessageField::none(), conjure_pubkey: ::protobuf::MessageField::none(), + dns_reg_conf: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -811,27 +855,23 @@ impl ::protobuf::reflect::ProtobufValue for ClientConf { /// Configuration for DNS registrar #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.DnsRegConf) +// @@protoc_insertion_point(message:conjure.DnsRegConf) pub struct DnsRegConf { // message fields - // @@protoc_insertion_point(field:tapdance.DnsRegConf.dns_reg_method) + // @@protoc_insertion_point(field:conjure.DnsRegConf.dns_reg_method) pub dns_reg_method: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.udp_addr) - pub udp_addr: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.dot_addr) - pub dot_addr: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.doh_url) - pub doh_url: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.domain) + // @@protoc_insertion_point(field:conjure.DnsRegConf.target) + pub target: ::std::option::Option<::std::string::String>, + // @@protoc_insertion_point(field:conjure.DnsRegConf.domain) pub domain: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.pubkey) + // @@protoc_insertion_point(field:conjure.DnsRegConf.pubkey) pub pubkey: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.utls_distribution) + // @@protoc_insertion_point(field:conjure.DnsRegConf.utls_distribution) pub utls_distribution: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.stun_server) + // @@protoc_insertion_point(field:conjure.DnsRegConf.stun_server) pub stun_server: ::std::option::Option<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:tapdance.DnsRegConf.special_fields) + // @@protoc_insertion_point(special_field:conjure.DnsRegConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -846,7 +886,7 @@ impl DnsRegConf { ::std::default::Default::default() } - // required .tapdance.DnsRegMethod dns_reg_method = 1; + // required .conjure.DnsRegMethod dns_reg_method = 1; pub fn dns_reg_method(&self) -> DnsRegMethod { match self.dns_reg_method { @@ -868,115 +908,43 @@ impl DnsRegConf { self.dns_reg_method = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } - // optional string udp_addr = 2; + // optional string target = 2; - pub fn udp_addr(&self) -> &str { - match self.udp_addr.as_ref() { + pub fn target(&self) -> &str { + match self.target.as_ref() { Some(v) => v, None => "", } } - pub fn clear_udp_addr(&mut self) { - self.udp_addr = ::std::option::Option::None; + pub fn clear_target(&mut self) { + self.target = ::std::option::Option::None; } - pub fn has_udp_addr(&self) -> bool { - self.udp_addr.is_some() + pub fn has_target(&self) -> bool { + self.target.is_some() } // Param is passed by value, moved - pub fn set_udp_addr(&mut self, v: ::std::string::String) { - self.udp_addr = ::std::option::Option::Some(v); + pub fn set_target(&mut self, v: ::std::string::String) { + self.target = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. - pub fn mut_udp_addr(&mut self) -> &mut ::std::string::String { - if self.udp_addr.is_none() { - self.udp_addr = ::std::option::Option::Some(::std::string::String::new()); + pub fn mut_target(&mut self) -> &mut ::std::string::String { + if self.target.is_none() { + self.target = ::std::option::Option::Some(::std::string::String::new()); } - self.udp_addr.as_mut().unwrap() + self.target.as_mut().unwrap() } // Take field - pub fn take_udp_addr(&mut self) -> ::std::string::String { - self.udp_addr.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string dot_addr = 3; - - pub fn dot_addr(&self) -> &str { - match self.dot_addr.as_ref() { - Some(v) => v, - None => "", - } + pub fn take_target(&mut self) -> ::std::string::String { + self.target.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn clear_dot_addr(&mut self) { - self.dot_addr = ::std::option::Option::None; - } - - pub fn has_dot_addr(&self) -> bool { - self.dot_addr.is_some() - } - - // Param is passed by value, moved - pub fn set_dot_addr(&mut self, v: ::std::string::String) { - self.dot_addr = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_dot_addr(&mut self) -> &mut ::std::string::String { - if self.dot_addr.is_none() { - self.dot_addr = ::std::option::Option::Some(::std::string::String::new()); - } - self.dot_addr.as_mut().unwrap() - } - - // Take field - pub fn take_dot_addr(&mut self) -> ::std::string::String { - self.dot_addr.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string doh_url = 4; - - pub fn doh_url(&self) -> &str { - match self.doh_url.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_doh_url(&mut self) { - self.doh_url = ::std::option::Option::None; - } - - pub fn has_doh_url(&self) -> bool { - self.doh_url.is_some() - } - - // Param is passed by value, moved - pub fn set_doh_url(&mut self, v: ::std::string::String) { - self.doh_url = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_doh_url(&mut self) -> &mut ::std::string::String { - if self.doh_url.is_none() { - self.doh_url = ::std::option::Option::Some(::std::string::String::new()); - } - self.doh_url.as_mut().unwrap() - } - - // Take field - pub fn take_doh_url(&mut self) -> ::std::string::String { - self.doh_url.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required string domain = 5; + // required string domain = 3; pub fn domain(&self) -> &str { match self.domain.as_ref() { @@ -1012,7 +980,7 @@ impl DnsRegConf { self.domain.take().unwrap_or_else(|| ::std::string::String::new()) } - // optional bytes pubkey = 6; + // optional bytes pubkey = 4; pub fn pubkey(&self) -> &[u8] { match self.pubkey.as_ref() { @@ -1048,7 +1016,7 @@ impl DnsRegConf { self.pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional string utls_distribution = 7; + // optional string utls_distribution = 5; pub fn utls_distribution(&self) -> &str { match self.utls_distribution.as_ref() { @@ -1084,7 +1052,7 @@ impl DnsRegConf { self.utls_distribution.take().unwrap_or_else(|| ::std::string::String::new()) } - // optional string stun_server = 8; + // optional string stun_server = 6; pub fn stun_server(&self) -> &str { match self.stun_server.as_ref() { @@ -1121,7 +1089,7 @@ impl DnsRegConf { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); + let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "dns_reg_method", @@ -1129,19 +1097,9 @@ impl DnsRegConf { |m: &mut DnsRegConf| { &mut m.dns_reg_method }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "udp_addr", - |m: &DnsRegConf| { &m.udp_addr }, - |m: &mut DnsRegConf| { &mut m.udp_addr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dot_addr", - |m: &DnsRegConf| { &m.dot_addr }, - |m: &mut DnsRegConf| { &mut m.dot_addr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "doh_url", - |m: &DnsRegConf| { &m.doh_url }, - |m: &mut DnsRegConf| { &mut m.doh_url }, + "target", + |m: &DnsRegConf| { &m.target }, + |m: &mut DnsRegConf| { &mut m.target }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "domain", @@ -1191,24 +1149,18 @@ impl ::protobuf::Message for DnsRegConf { self.dns_reg_method = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, 18 => { - self.udp_addr = ::std::option::Option::Some(is.read_string()?); + self.target = ::std::option::Option::Some(is.read_string()?); }, 26 => { - self.dot_addr = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - self.doh_url = ::std::option::Option::Some(is.read_string()?); - }, - 42 => { self.domain = ::std::option::Option::Some(is.read_string()?); }, - 50 => { + 34 => { self.pubkey = ::std::option::Option::Some(is.read_bytes()?); }, - 58 => { + 42 => { self.utls_distribution = ::std::option::Option::Some(is.read_string()?); }, - 66 => { + 50 => { self.stun_server = ::std::option::Option::Some(is.read_string()?); }, tag => { @@ -1226,26 +1178,20 @@ impl ::protobuf::Message for DnsRegConf { if let Some(v) = self.dns_reg_method { my_size += ::protobuf::rt::int32_size(1, v.value()); } - if let Some(v) = self.udp_addr.as_ref() { + if let Some(v) = self.target.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } - if let Some(v) = self.dot_addr.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.doh_url.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } if let Some(v) = self.domain.as_ref() { - my_size += ::protobuf::rt::string_size(5, &v); + my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.pubkey.as_ref() { - my_size += ::protobuf::rt::bytes_size(6, &v); + my_size += ::protobuf::rt::bytes_size(4, &v); } if let Some(v) = self.utls_distribution.as_ref() { - my_size += ::protobuf::rt::string_size(7, &v); + my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.stun_server.as_ref() { - my_size += ::protobuf::rt::string_size(8, &v); + my_size += ::protobuf::rt::string_size(6, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); @@ -1256,26 +1202,20 @@ impl ::protobuf::Message for DnsRegConf { if let Some(v) = self.dns_reg_method { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; } - if let Some(v) = self.udp_addr.as_ref() { + if let Some(v) = self.target.as_ref() { os.write_string(2, v)?; } - if let Some(v) = self.dot_addr.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.doh_url.as_ref() { - os.write_string(4, v)?; - } if let Some(v) = self.domain.as_ref() { - os.write_string(5, v)?; + os.write_string(3, v)?; } if let Some(v) = self.pubkey.as_ref() { - os.write_bytes(6, v)?; + os.write_bytes(4, v)?; } if let Some(v) = self.utls_distribution.as_ref() { - os.write_string(7, v)?; + os.write_string(5, v)?; } if let Some(v) = self.stun_server.as_ref() { - os.write_string(8, v)?; + os.write_string(6, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) @@ -1295,9 +1235,7 @@ impl ::protobuf::Message for DnsRegConf { fn clear(&mut self) { self.dns_reg_method = ::std::option::Option::None; - self.udp_addr = ::std::option::Option::None; - self.dot_addr = ::std::option::Option::None; - self.doh_url = ::std::option::Option::None; + self.target = ::std::option::Option::None; self.domain = ::std::option::Option::None; self.pubkey = ::std::option::Option::None; self.utls_distribution = ::std::option::Option::None; @@ -1308,9 +1246,7 @@ impl ::protobuf::Message for DnsRegConf { fn default_instance() -> &'static DnsRegConf { static instance: DnsRegConf = DnsRegConf { dns_reg_method: ::std::option::Option::None, - udp_addr: ::std::option::Option::None, - dot_addr: ::std::option::Option::None, - doh_url: ::std::option::Option::None, + target: ::std::option::Option::None, domain: ::std::option::Option::None, pubkey: ::std::option::Option::None, utls_distribution: ::std::option::Option::None, @@ -1339,13 +1275,13 @@ impl ::protobuf::reflect::ProtobufValue for DnsRegConf { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.DecoyList) +// @@protoc_insertion_point(message:conjure.DecoyList) pub struct DecoyList { // message fields - // @@protoc_insertion_point(field:tapdance.DecoyList.tls_decoys) + // @@protoc_insertion_point(field:conjure.DecoyList.tls_decoys) pub tls_decoys: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:tapdance.DecoyList.special_fields) + // @@protoc_insertion_point(special_field:conjure.DecoyList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1462,13 +1398,13 @@ impl ::protobuf::reflect::ProtobufValue for DecoyList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.PhantomSubnetsList) +// @@protoc_insertion_point(message:conjure.PhantomSubnetsList) pub struct PhantomSubnetsList { // message fields - // @@protoc_insertion_point(field:tapdance.PhantomSubnetsList.weighted_subnets) + // @@protoc_insertion_point(field:conjure.PhantomSubnetsList.weighted_subnets) pub weighted_subnets: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:tapdance.PhantomSubnetsList.special_fields) + // @@protoc_insertion_point(special_field:conjure.PhantomSubnetsList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1585,15 +1521,15 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnetsList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.PhantomSubnets) +// @@protoc_insertion_point(message:conjure.PhantomSubnets) pub struct PhantomSubnets { // message fields - // @@protoc_insertion_point(field:tapdance.PhantomSubnets.weight) + // @@protoc_insertion_point(field:conjure.PhantomSubnets.weight) pub weight: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.PhantomSubnets.subnets) + // @@protoc_insertion_point(field:conjure.PhantomSubnets.subnets) pub subnets: ::std::vec::Vec<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:tapdance.PhantomSubnets.special_fields) + // @@protoc_insertion_point(special_field:conjure.PhantomSubnets.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1745,19 +1681,19 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnets { /// Deflated ICE Candidate by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.WebRTCICECandidate) +// @@protoc_insertion_point(message:conjure.WebRTCICECandidate) pub struct WebRTCICECandidate { // message fields /// IP is represented in its 16-byte form - // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_upper) + // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_upper) pub ip_upper: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_lower) + // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_lower) pub ip_lower: ::std::option::Option, /// Composed info includes port, tcptype (unset if not tcp), candidate type (host, srflx, prflx), protocol (TCP/UDP), and component (RTP/RTCP) - // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.composed_info) + // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.composed_info) pub composed_info: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.WebRTCICECandidate.special_fields) + // @@protoc_insertion_point(special_field:conjure.WebRTCICECandidate.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1972,15 +1908,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCICECandidate { /// Deflated SDP for WebRTC by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.WebRTCSDP) +// @@protoc_insertion_point(message:conjure.WebRTCSDP) pub struct WebRTCSDP { // message fields - // @@protoc_insertion_point(field:tapdance.WebRTCSDP.type) + // @@protoc_insertion_point(field:conjure.WebRTCSDP.type) pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.WebRTCSDP.candidates) + // @@protoc_insertion_point(field:conjure.WebRTCSDP.candidates) pub candidates: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:tapdance.WebRTCSDP.special_fields) + // @@protoc_insertion_point(special_field:conjure.WebRTCSDP.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2141,15 +2077,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSDP { /// WebRTCSignal includes a deflated SDP and a seed #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.WebRTCSignal) +// @@protoc_insertion_point(message:conjure.WebRTCSignal) pub struct WebRTCSignal { // message fields - // @@protoc_insertion_point(field:tapdance.WebRTCSignal.seed) + // @@protoc_insertion_point(field:conjure.WebRTCSignal.seed) pub seed: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.WebRTCSignal.sdp) + // @@protoc_insertion_point(field:conjure.WebRTCSignal.sdp) pub sdp: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:tapdance.WebRTCSignal.special_fields) + // @@protoc_insertion_point(special_field:conjure.WebRTCSignal.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2329,34 +2265,34 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSignal { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.StationToClient) +// @@protoc_insertion_point(message:conjure.StationToClient) pub struct StationToClient { // message fields /// Should accompany (at least) SESSION_INIT and CONFIRM_RECONNECT. - // @@protoc_insertion_point(field:tapdance.StationToClient.protocol_version) + // @@protoc_insertion_point(field:conjure.StationToClient.protocol_version) pub protocol_version: ::std::option::Option, /// There might be a state transition. May be absent; absence should be /// treated identically to NO_CHANGE. - // @@protoc_insertion_point(field:tapdance.StationToClient.state_transition) + // @@protoc_insertion_point(field:conjure.StationToClient.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The station can send client config info piggybacked /// on any message, as it sees fit - // @@protoc_insertion_point(field:tapdance.StationToClient.config_info) + // @@protoc_insertion_point(field:conjure.StationToClient.config_info) pub config_info: ::protobuf::MessageField, /// If state_transition == S2C_ERROR, this field is the explanation. - // @@protoc_insertion_point(field:tapdance.StationToClient.err_reason) + // @@protoc_insertion_point(field:conjure.StationToClient.err_reason) pub err_reason: ::std::option::Option<::protobuf::EnumOrUnknown>, /// Signals client to stop connecting for following amount of seconds - // @@protoc_insertion_point(field:tapdance.StationToClient.tmp_backoff) + // @@protoc_insertion_point(field:conjure.StationToClient.tmp_backoff) pub tmp_backoff: ::std::option::Option, /// Sent in SESSION_INIT, identifies the station that picked up - // @@protoc_insertion_point(field:tapdance.StationToClient.station_id) + // @@protoc_insertion_point(field:conjure.StationToClient.station_id) pub station_id: ::std::option::Option<::std::string::String>, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:tapdance.StationToClient.padding) + // @@protoc_insertion_point(field:conjure.StationToClient.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:tapdance.StationToClient.special_fields) + // @@protoc_insertion_point(special_field:conjure.StationToClient.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2390,7 +2326,7 @@ impl StationToClient { self.protocol_version = ::std::option::Option::Some(v); } - // optional .tapdance.S2C_Transition state_transition = 2; + // optional .conjure.S2C_Transition state_transition = 2; pub fn state_transition(&self) -> S2C_Transition { match self.state_transition { @@ -2412,7 +2348,7 @@ impl StationToClient { self.state_transition = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } - // optional .tapdance.ErrorReasonS2C err_reason = 4; + // optional .conjure.ErrorReasonS2C err_reason = 4; pub fn err_reason(&self) -> ErrorReasonS2C { match self.err_reason { @@ -2575,6 +2511,11 @@ impl ::protobuf::Message for StationToClient { const NAME: &'static str = "StationToClient"; fn is_initialized(&self) -> bool { + for v in &self.config_info { + if !v.is_initialized() { + return false; + } + }; true } @@ -2723,21 +2664,21 @@ impl ::protobuf::reflect::ProtobufValue for StationToClient { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.RegistrationFlags) +// @@protoc_insertion_point(message:conjure.RegistrationFlags) pub struct RegistrationFlags { // message fields - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.upload_only) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.upload_only) pub upload_only: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.dark_decoy) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.dark_decoy) pub dark_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.proxy_header) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.proxy_header) pub proxy_header: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.use_TIL) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.use_TIL) pub use_TIL: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.prescanned) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.prescanned) pub prescanned: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.RegistrationFlags.special_fields) + // @@protoc_insertion_point(special_field:conjure.RegistrationFlags.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3012,36 +2953,41 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationFlags { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.ClientToStation) +// @@protoc_insertion_point(message:conjure.ClientToStation) pub struct ClientToStation { // message fields - // @@protoc_insertion_point(field:tapdance.ClientToStation.protocol_version) + // @@protoc_insertion_point(field:conjure.ClientToStation.protocol_version) pub protocol_version: ::std::option::Option, /// The client reports its decoy list's version number here, which the /// station can use to decide whether to send an updated one. The station /// should always send a list if this field is set to 0. - // @@protoc_insertion_point(field:tapdance.ClientToStation.decoy_list_generation) + // @@protoc_insertion_point(field:conjure.ClientToStation.decoy_list_generation) pub decoy_list_generation: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.ClientToStation.state_transition) + // @@protoc_insertion_point(field:conjure.ClientToStation.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The position in the overall session's upload sequence where the current /// YIELD=>ACQUIRE switchover is happening. - // @@protoc_insertion_point(field:tapdance.ClientToStation.upload_sync) + // @@protoc_insertion_point(field:conjure.ClientToStation.upload_sync) pub upload_sync: ::std::option::Option, /// High level client library version used for indicating feature support, or /// lack therof. - // @@protoc_insertion_point(field:tapdance.ClientToStation.client_lib_version) + // @@protoc_insertion_point(field:conjure.ClientToStation.client_lib_version) pub client_lib_version: ::std::option::Option, + /// Indicates whether the client will allow the registrar to provide alternative parameters that + /// may work better in substitute for the deterministically selected parameters. This only works + /// for bidirectional registration methods where the client receives a RegistrationResponse. + // @@protoc_insertion_point(field:conjure.ClientToStation.allow_registrar_overrides) + pub allow_registrar_overrides: ::std::option::Option, /// List of decoys that client have unsuccessfully tried in current session. /// Could be sent in chunks - // @@protoc_insertion_point(field:tapdance.ClientToStation.failed_decoys) + // @@protoc_insertion_point(field:conjure.ClientToStation.failed_decoys) pub failed_decoys: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.ClientToStation.stats) + // @@protoc_insertion_point(field:conjure.ClientToStation.stats) pub stats: ::protobuf::MessageField, /// NullTransport, MinTransport, Obfs4Transport, etc. Transport type we want from phantom proxy - // @@protoc_insertion_point(field:tapdance.ClientToStation.transport) + // @@protoc_insertion_point(field:conjure.ClientToStation.transport) pub transport: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:tapdance.ClientToStation.transport_params) + // @@protoc_insertion_point(field:conjure.ClientToStation.transport_params) pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, /// Station is only required to check this variable during session initialization. /// If set, station must facilitate connection to said target by itself, i.e. write into squid @@ -3049,28 +2995,28 @@ pub struct ClientToStation { /// covert_address must have exactly one ':' colon, that separates host (literal IP address or /// resolvable hostname) and port /// TODO: make it required for initialization, and stop connecting any client straight to squid? - // @@protoc_insertion_point(field:tapdance.ClientToStation.covert_address) + // @@protoc_insertion_point(field:conjure.ClientToStation.covert_address) pub covert_address: ::std::option::Option<::std::string::String>, /// Used in dark decoys to signal which dark decoy it will connect to. - // @@protoc_insertion_point(field:tapdance.ClientToStation.masked_decoy_server_name) + // @@protoc_insertion_point(field:conjure.ClientToStation.masked_decoy_server_name) pub masked_decoy_server_name: ::std::option::Option<::std::string::String>, /// Used to indicate to server if client is registering v4, v6 or both - // @@protoc_insertion_point(field:tapdance.ClientToStation.v6_support) + // @@protoc_insertion_point(field:conjure.ClientToStation.v6_support) pub v6_support: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.ClientToStation.v4_support) + // @@protoc_insertion_point(field:conjure.ClientToStation.v4_support) pub v4_support: ::std::option::Option, /// A collection of optional flags for the registration. - // @@protoc_insertion_point(field:tapdance.ClientToStation.flags) + // @@protoc_insertion_point(field:conjure.ClientToStation.flags) pub flags: ::protobuf::MessageField, /// Transport Extensions /// TODO(jmwample) - move to WebRTC specific transport params protobuf message. - // @@protoc_insertion_point(field:tapdance.ClientToStation.webrtc_signal) + // @@protoc_insertion_point(field:conjure.ClientToStation.webrtc_signal) pub webrtc_signal: ::protobuf::MessageField, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:tapdance.ClientToStation.padding) + // @@protoc_insertion_point(field:conjure.ClientToStation.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:tapdance.ClientToStation.special_fields) + // @@protoc_insertion_point(special_field:conjure.ClientToStation.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3123,7 +3069,7 @@ impl ClientToStation { self.decoy_list_generation = ::std::option::Option::Some(v); } - // optional .tapdance.C2S_Transition state_transition = 3; + // optional .conjure.C2S_Transition state_transition = 3; pub fn state_transition(&self) -> C2S_Transition { match self.state_transition { @@ -3183,7 +3129,26 @@ impl ClientToStation { self.client_lib_version = ::std::option::Option::Some(v); } - // optional .tapdance.TransportType transport = 12; + // optional bool allow_registrar_overrides = 6; + + pub fn allow_registrar_overrides(&self) -> bool { + self.allow_registrar_overrides.unwrap_or(false) + } + + pub fn clear_allow_registrar_overrides(&mut self) { + self.allow_registrar_overrides = ::std::option::Option::None; + } + + pub fn has_allow_registrar_overrides(&self) -> bool { + self.allow_registrar_overrides.is_some() + } + + // Param is passed by value, moved + pub fn set_allow_registrar_overrides(&mut self, v: bool) { + self.allow_registrar_overrides = ::std::option::Option::Some(v); + } + + // optional .conjure.TransportType transport = 12; pub fn transport(&self) -> TransportType { match self.transport { @@ -3352,7 +3317,7 @@ impl ClientToStation { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(16); + let mut fields = ::std::vec::Vec::with_capacity(17); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "protocol_version", @@ -3379,6 +3344,11 @@ impl ClientToStation { |m: &ClientToStation| { &m.client_lib_version }, |m: &mut ClientToStation| { &mut m.client_lib_version }, )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "allow_registrar_overrides", + |m: &ClientToStation| { &m.allow_registrar_overrides }, + |m: &mut ClientToStation| { &mut m.allow_registrar_overrides }, + )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "failed_decoys", |m: &ClientToStation| { &m.failed_decoys }, @@ -3487,6 +3457,9 @@ impl ::protobuf::Message for ClientToStation { 40 => { self.client_lib_version = ::std::option::Option::Some(is.read_uint32()?); }, + 48 => { + self.allow_registrar_overrides = ::std::option::Option::Some(is.read_bool()?); + }, 82 => { self.failed_decoys.push(is.read_string()?); }, @@ -3547,6 +3520,9 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { my_size += ::protobuf::rt::uint32_size(5, v); } + if let Some(v) = self.allow_registrar_overrides { + my_size += 1 + 1; + } for value in &self.failed_decoys { my_size += ::protobuf::rt::string_size(10, &value); }; @@ -3605,6 +3581,9 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { os.write_uint32(5, v)?; } + if let Some(v) = self.allow_registrar_overrides { + os.write_bool(6, v)?; + } for v in &self.failed_decoys { os.write_string(10, &v)?; }; @@ -3660,6 +3639,7 @@ impl ::protobuf::Message for ClientToStation { self.state_transition = ::std::option::Option::None; self.upload_sync = ::std::option::Option::None; self.client_lib_version = ::std::option::Option::None; + self.allow_registrar_overrides = ::std::option::Option::None; self.failed_decoys.clear(); self.stats.clear(); self.transport = ::std::option::Option::None; @@ -3681,6 +3661,7 @@ impl ::protobuf::Message for ClientToStation { state_transition: ::std::option::Option::None, upload_sync: ::std::option::Option::None, client_lib_version: ::std::option::Option::None, + allow_registrar_overrides: ::std::option::Option::None, failed_decoys: ::std::vec::Vec::new(), stats: ::protobuf::MessageField::none(), transport: ::std::option::Option::None, @@ -3716,16 +3697,254 @@ impl ::protobuf::reflect::ProtobufValue for ClientToStation { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.GenericTransportParams) +// @@protoc_insertion_point(message:conjure.PrefixTransportParams) +pub struct PrefixTransportParams { + // message fields + /// Prefix Identifier + // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix_id) + pub prefix_id: ::std::option::Option, + /// Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) + /// as the station cannot take this into account when attempting to identify a connection. + // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix) + pub prefix: ::std::option::Option<::std::vec::Vec>, + /// Indicates whether the client has elected to use destination port randomization. Should be + /// checked against selected transport to ensure that destination port randomization is + /// supported. + // @@protoc_insertion_point(field:conjure.PrefixTransportParams.randomize_dst_port) + pub randomize_dst_port: ::std::option::Option, + // special fields + // @@protoc_insertion_point(special_field:conjure.PrefixTransportParams.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a PrefixTransportParams { + fn default() -> &'a PrefixTransportParams { + ::default_instance() + } +} + +impl PrefixTransportParams { + pub fn new() -> PrefixTransportParams { + ::std::default::Default::default() + } + + // optional int32 prefix_id = 1; + + pub fn prefix_id(&self) -> i32 { + self.prefix_id.unwrap_or(0) + } + + pub fn clear_prefix_id(&mut self) { + self.prefix_id = ::std::option::Option::None; + } + + pub fn has_prefix_id(&self) -> bool { + self.prefix_id.is_some() + } + + // Param is passed by value, moved + pub fn set_prefix_id(&mut self, v: i32) { + self.prefix_id = ::std::option::Option::Some(v); + } + + // optional bytes prefix = 2; + + pub fn prefix(&self) -> &[u8] { + match self.prefix.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_prefix(&mut self) { + self.prefix = ::std::option::Option::None; + } + + pub fn has_prefix(&self) -> bool { + self.prefix.is_some() + } + + // Param is passed by value, moved + pub fn set_prefix(&mut self, v: ::std::vec::Vec) { + self.prefix = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_prefix(&mut self) -> &mut ::std::vec::Vec { + if self.prefix.is_none() { + self.prefix = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.prefix.as_mut().unwrap() + } + + // Take field + pub fn take_prefix(&mut self) -> ::std::vec::Vec { + self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bool randomize_dst_port = 13; + + pub fn randomize_dst_port(&self) -> bool { + self.randomize_dst_port.unwrap_or(false) + } + + pub fn clear_randomize_dst_port(&mut self) { + self.randomize_dst_port = ::std::option::Option::None; + } + + pub fn has_randomize_dst_port(&self) -> bool { + self.randomize_dst_port.is_some() + } + + // Param is passed by value, moved + pub fn set_randomize_dst_port(&mut self, v: bool) { + self.randomize_dst_port = ::std::option::Option::Some(v); + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "prefix_id", + |m: &PrefixTransportParams| { &m.prefix_id }, + |m: &mut PrefixTransportParams| { &mut m.prefix_id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "prefix", + |m: &PrefixTransportParams| { &m.prefix }, + |m: &mut PrefixTransportParams| { &mut m.prefix }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "randomize_dst_port", + |m: &PrefixTransportParams| { &m.randomize_dst_port }, + |m: &mut PrefixTransportParams| { &mut m.randomize_dst_port }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "PrefixTransportParams", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for PrefixTransportParams { + const NAME: &'static str = "PrefixTransportParams"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.prefix_id = ::std::option::Option::Some(is.read_int32()?); + }, + 18 => { + self.prefix = ::std::option::Option::Some(is.read_bytes()?); + }, + 104 => { + self.randomize_dst_port = ::std::option::Option::Some(is.read_bool()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.prefix_id { + my_size += ::protobuf::rt::int32_size(1, v); + } + if let Some(v) = self.prefix.as_ref() { + my_size += ::protobuf::rt::bytes_size(2, &v); + } + if let Some(v) = self.randomize_dst_port { + my_size += 1 + 1; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.prefix_id { + os.write_int32(1, v)?; + } + if let Some(v) = self.prefix.as_ref() { + os.write_bytes(2, v)?; + } + if let Some(v) = self.randomize_dst_port { + os.write_bool(13, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> PrefixTransportParams { + PrefixTransportParams::new() + } + + fn clear(&mut self) { + self.prefix_id = ::std::option::Option::None; + self.prefix = ::std::option::Option::None; + self.randomize_dst_port = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static PrefixTransportParams { + static instance: PrefixTransportParams = PrefixTransportParams { + prefix_id: ::std::option::Option::None, + prefix: ::std::option::Option::None, + randomize_dst_port: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for PrefixTransportParams { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("PrefixTransportParams").unwrap()).clone() + } +} + +impl ::std::fmt::Display for PrefixTransportParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for PrefixTransportParams { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +#[derive(PartialEq,Clone,Default,Debug)] +// @@protoc_insertion_point(message:conjure.GenericTransportParams) pub struct GenericTransportParams { // message fields - /// Indicates whether the client has elected to use destination port - /// randomization. Should be checked against selected transport to ensure - /// that destination port randomization is supported. - // @@protoc_insertion_point(field:tapdance.GenericTransportParams.randomize_dst_port) + /// Indicates whether the client has elected to use destination port randomization. Should be + /// checked against selected transport to ensure that destination port randomization is + /// supported. + // @@protoc_insertion_point(field:conjure.GenericTransportParams.randomize_dst_port) pub randomize_dst_port: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.GenericTransportParams.special_fields) + // @@protoc_insertion_point(special_field:conjure.GenericTransportParams.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3860,25 +4079,39 @@ impl ::protobuf::reflect::ProtobufValue for GenericTransportParams { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.C2SWrapper) +// @@protoc_insertion_point(message:conjure.C2SWrapper) pub struct C2SWrapper { // message fields - // @@protoc_insertion_point(field:tapdance.C2SWrapper.shared_secret) + // @@protoc_insertion_point(field:conjure.C2SWrapper.shared_secret) pub shared_secret: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_payload) + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_payload) pub registration_payload: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_source) + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_source) pub registration_source: ::std::option::Option<::protobuf::EnumOrUnknown>, /// client source address when receiving a registration - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_address) + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_address) pub registration_address: ::std::option::Option<::std::vec::Vec>, /// Decoy address used when registering over Decoy registrar - // @@protoc_insertion_point(field:tapdance.C2SWrapper.decoy_address) + // @@protoc_insertion_point(field:conjure.C2SWrapper.decoy_address) pub decoy_address: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_response) + /// The next three fields allow an independent registrar (trusted by a station w/ a zmq keypair) to + /// share the registration overrides that it assigned to the client with the station(s). + /// Registration Respose is here to allow a parsed object with direct access to the fields within. + /// RegRespBytes provides a serialized verion of the Registration response so that the signature of + /// the Bidirectional registrar can be validated before a station applies any overrides present in + /// the Registration Response. + /// + /// If you are reading this in the future and you want to extend the functionality here it might + /// make sense to make the RegistrationResponse that is sent to the client a distinct message from + /// the one that gets sent to the stations. + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_response) pub registration_response: ::protobuf::MessageField, + // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespBytes) + pub RegRespBytes: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespSignature) + pub RegRespSignature: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:tapdance.C2SWrapper.special_fields) + // @@protoc_insertion_point(special_field:conjure.C2SWrapper.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3929,7 +4162,7 @@ impl C2SWrapper { self.shared_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .tapdance.RegistrationSource registration_source = 4; + // optional .conjure.RegistrationSource registration_source = 4; pub fn registration_source(&self) -> RegistrationSource { match self.registration_source { @@ -4023,8 +4256,80 @@ impl C2SWrapper { self.decoy_address.take().unwrap_or_else(|| ::std::vec::Vec::new()) } + // optional bytes RegRespBytes = 9; + + pub fn RegRespBytes(&self) -> &[u8] { + match self.RegRespBytes.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_RegRespBytes(&mut self) { + self.RegRespBytes = ::std::option::Option::None; + } + + pub fn has_RegRespBytes(&self) -> bool { + self.RegRespBytes.is_some() + } + + // Param is passed by value, moved + pub fn set_RegRespBytes(&mut self, v: ::std::vec::Vec) { + self.RegRespBytes = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_RegRespBytes(&mut self) -> &mut ::std::vec::Vec { + if self.RegRespBytes.is_none() { + self.RegRespBytes = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.RegRespBytes.as_mut().unwrap() + } + + // Take field + pub fn take_RegRespBytes(&mut self) -> ::std::vec::Vec { + self.RegRespBytes.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes RegRespSignature = 10; + + pub fn RegRespSignature(&self) -> &[u8] { + match self.RegRespSignature.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_RegRespSignature(&mut self) { + self.RegRespSignature = ::std::option::Option::None; + } + + pub fn has_RegRespSignature(&self) -> bool { + self.RegRespSignature.is_some() + } + + // Param is passed by value, moved + pub fn set_RegRespSignature(&mut self, v: ::std::vec::Vec) { + self.RegRespSignature = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_RegRespSignature(&mut self) -> &mut ::std::vec::Vec { + if self.RegRespSignature.is_none() { + self.RegRespSignature = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.RegRespSignature.as_mut().unwrap() + } + + // Take field + pub fn take_RegRespSignature(&mut self) -> ::std::vec::Vec { + self.RegRespSignature.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); + let mut fields = ::std::vec::Vec::with_capacity(8); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "shared_secret", @@ -4056,6 +4361,16 @@ impl C2SWrapper { |m: &C2SWrapper| { &m.registration_response }, |m: &mut C2SWrapper| { &mut m.registration_response }, )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "RegRespBytes", + |m: &C2SWrapper| { &m.RegRespBytes }, + |m: &mut C2SWrapper| { &mut m.RegRespBytes }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "RegRespSignature", + |m: &C2SWrapper| { &m.RegRespSignature }, + |m: &mut C2SWrapper| { &mut m.RegRespSignature }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "C2SWrapper", fields, @@ -4102,6 +4417,12 @@ impl ::protobuf::Message for C2SWrapper { 66 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.registration_response)?; }, + 74 => { + self.RegRespBytes = ::std::option::Option::Some(is.read_bytes()?); + }, + 82 => { + self.RegRespSignature = ::std::option::Option::Some(is.read_bytes()?); + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -4134,6 +4455,12 @@ impl ::protobuf::Message for C2SWrapper { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.RegRespBytes.as_ref() { + my_size += ::protobuf::rt::bytes_size(9, &v); + } + if let Some(v) = self.RegRespSignature.as_ref() { + my_size += ::protobuf::rt::bytes_size(10, &v); + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -4158,6 +4485,12 @@ impl ::protobuf::Message for C2SWrapper { if let Some(v) = self.registration_response.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; } + if let Some(v) = self.RegRespBytes.as_ref() { + os.write_bytes(9, v)?; + } + if let Some(v) = self.RegRespSignature.as_ref() { + os.write_bytes(10, v)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4181,6 +4514,8 @@ impl ::protobuf::Message for C2SWrapper { self.registration_address = ::std::option::Option::None; self.decoy_address = ::std::option::Option::None; self.registration_response.clear(); + self.RegRespBytes = ::std::option::Option::None; + self.RegRespSignature = ::std::option::Option::None; self.special_fields.clear(); } @@ -4192,6 +4527,8 @@ impl ::protobuf::Message for C2SWrapper { registration_address: ::std::option::Option::None, decoy_address: ::std::option::Option::None, registration_response: ::protobuf::MessageField::none(), + RegRespBytes: ::std::option::Option::None, + RegRespSignature: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -4216,23 +4553,23 @@ impl ::protobuf::reflect::ProtobufValue for C2SWrapper { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.SessionStats) +// @@protoc_insertion_point(message:conjure.SessionStats) pub struct SessionStats { // message fields - // @@protoc_insertion_point(field:tapdance.SessionStats.failed_decoys_amount) + // @@protoc_insertion_point(field:conjure.SessionStats.failed_decoys_amount) pub failed_decoys_amount: ::std::option::Option, /// Applicable to whole session: - // @@protoc_insertion_point(field:tapdance.SessionStats.total_time_to_connect) + // @@protoc_insertion_point(field:conjure.SessionStats.total_time_to_connect) pub total_time_to_connect: ::std::option::Option, /// Last (i.e. successful) decoy: - // @@protoc_insertion_point(field:tapdance.SessionStats.rtt_to_station) + // @@protoc_insertion_point(field:conjure.SessionStats.rtt_to_station) pub rtt_to_station: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.SessionStats.tls_to_decoy) + // @@protoc_insertion_point(field:conjure.SessionStats.tls_to_decoy) pub tls_to_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.SessionStats.tcp_to_decoy) + // @@protoc_insertion_point(field:conjure.SessionStats.tcp_to_decoy) pub tcp_to_decoy: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.SessionStats.special_fields) + // @@protoc_insertion_point(special_field:conjure.SessionStats.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4507,25 +4844,25 @@ impl ::protobuf::reflect::ProtobufValue for SessionStats { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.StationToDetector) +// @@protoc_insertion_point(message:conjure.StationToDetector) pub struct StationToDetector { // message fields - // @@protoc_insertion_point(field:tapdance.StationToDetector.phantom_ip) + // @@protoc_insertion_point(field:conjure.StationToDetector.phantom_ip) pub phantom_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.StationToDetector.client_ip) + // @@protoc_insertion_point(field:conjure.StationToDetector.client_ip) pub client_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.StationToDetector.timeout_ns) + // @@protoc_insertion_point(field:conjure.StationToDetector.timeout_ns) pub timeout_ns: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.StationToDetector.operation) + // @@protoc_insertion_point(field:conjure.StationToDetector.operation) pub operation: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:tapdance.StationToDetector.dst_port) + // @@protoc_insertion_point(field:conjure.StationToDetector.dst_port) pub dst_port: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.StationToDetector.src_port) + // @@protoc_insertion_point(field:conjure.StationToDetector.src_port) pub src_port: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.StationToDetector.proto) + // @@protoc_insertion_point(field:conjure.StationToDetector.proto) pub proto: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:tapdance.StationToDetector.special_fields) + // @@protoc_insertion_point(special_field:conjure.StationToDetector.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4631,7 +4968,7 @@ impl StationToDetector { self.timeout_ns = ::std::option::Option::Some(v); } - // optional .tapdance.StationOperations operation = 4; + // optional .conjure.StationOperations operation = 4; pub fn operation(&self) -> StationOperations { match self.operation { @@ -4691,7 +5028,7 @@ impl StationToDetector { self.src_port = ::std::option::Option::Some(v); } - // optional .tapdance.IPProto proto = 12; + // optional .conjure.IPProto proto = 12; pub fn proto(&self) -> IPProto { match self.proto { @@ -4911,29 +5248,32 @@ impl ::protobuf::reflect::ProtobufValue for StationToDetector { /// Adding message response from Station to Client for bidirectional API #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.RegistrationResponse) +// @@protoc_insertion_point(message:conjure.RegistrationResponse) pub struct RegistrationResponse { // message fields - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv4addr) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv6addr) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// Respond with randomized port - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.dst_port) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.dst_port) pub dst_port: ::std::option::Option, /// Future: station provides client with secret, want chanel present /// Leave null for now - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.serverRandom) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.serverRandom) pub serverRandom: ::std::option::Option<::std::vec::Vec>, /// If registration wrong, populate this error string - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.error) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.error) pub error: ::std::option::Option<::std::string::String>, /// ClientConf field (optional) - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.clientConf) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.clientConf) pub clientConf: ::protobuf::MessageField, + /// Transport Params to if `allow_registrar_overrides` is set. + // @@protoc_insertion_point(field:conjure.RegistrationResponse.transport_params) + pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, // special fields - // @@protoc_insertion_point(special_field:tapdance.RegistrationResponse.special_fields) + // @@protoc_insertion_point(special_field:conjure.RegistrationResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5095,7 +5435,7 @@ impl RegistrationResponse { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); + let mut fields = ::std::vec::Vec::with_capacity(7); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "ipv4addr", @@ -5127,6 +5467,11 @@ impl RegistrationResponse { |m: &RegistrationResponse| { &m.clientConf }, |m: &mut RegistrationResponse| { &mut m.clientConf }, )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( + "transport_params", + |m: &RegistrationResponse| { &m.transport_params }, + |m: &mut RegistrationResponse| { &mut m.transport_params }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RegistrationResponse", fields, @@ -5139,6 +5484,16 @@ impl ::protobuf::Message for RegistrationResponse { const NAME: &'static str = "RegistrationResponse"; fn is_initialized(&self) -> bool { + for v in &self.clientConf { + if !v.is_initialized() { + return false; + } + }; + for v in &self.transport_params { + if !v.is_initialized() { + return false; + } + }; true } @@ -5163,6 +5518,9 @@ impl ::protobuf::Message for RegistrationResponse { 50 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.clientConf)?; }, + 82 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.transport_params)?; + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -5194,6 +5552,10 @@ impl ::protobuf::Message for RegistrationResponse { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.transport_params.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -5218,6 +5580,9 @@ impl ::protobuf::Message for RegistrationResponse { if let Some(v) = self.clientConf.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; } + if let Some(v) = self.transport_params.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -5241,6 +5606,7 @@ impl ::protobuf::Message for RegistrationResponse { self.serverRandom = ::std::option::Option::None; self.error = ::std::option::Option::None; self.clientConf.clear(); + self.transport_params.clear(); self.special_fields.clear(); } @@ -5252,6 +5618,7 @@ impl ::protobuf::Message for RegistrationResponse { serverRandom: ::std::option::Option::None, error: ::std::option::Option::None, clientConf: ::protobuf::MessageField::none(), + transport_params: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -5277,17 +5644,17 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationResponse { /// response from dns #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.DnsResponse) +// @@protoc_insertion_point(message:conjure.DnsResponse) pub struct DnsResponse { // message fields - // @@protoc_insertion_point(field:tapdance.DnsResponse.success) + // @@protoc_insertion_point(field:conjure.DnsResponse.success) pub success: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.DnsResponse.clientconf_outdated) + // @@protoc_insertion_point(field:conjure.DnsResponse.clientconf_outdated) pub clientconf_outdated: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.DnsResponse.bidirectional_response) + // @@protoc_insertion_point(field:conjure.DnsResponse.bidirectional_response) pub bidirectional_response: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:tapdance.DnsResponse.special_fields) + // @@protoc_insertion_point(special_field:conjure.DnsResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5370,6 +5737,11 @@ impl ::protobuf::Message for DnsResponse { const NAME: &'static str = "DnsResponse"; fn is_initialized(&self) -> bool { + for v in &self.bidirectional_response { + if !v.is_initialized() { + return false; + } + }; true } @@ -5474,11 +5846,11 @@ impl ::protobuf::reflect::ProtobufValue for DnsResponse { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.KeyType) +// @@protoc_insertion_point(enum:conjure.KeyType) pub enum KeyType { - // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_128) + // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_128) AES_GCM_128 = 90, - // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_256) + // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_256) AES_GCM_256 = 91, } @@ -5532,14 +5904,14 @@ impl KeyType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.DnsRegMethod) +// @@protoc_insertion_point(enum:conjure.DnsRegMethod) pub enum DnsRegMethod { - // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.UDP) - UDP = 0, - // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOT) - DOT = 1, - // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOH) - DOH = 2, + // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.UDP) + UDP = 1, + // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOT) + DOT = 2, + // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOH) + DOH = 3, } impl ::protobuf::Enum for DnsRegMethod { @@ -5551,9 +5923,9 @@ impl ::protobuf::Enum for DnsRegMethod { fn from_i32(value: i32) -> ::std::option::Option { match value { - 0 => ::std::option::Option::Some(DnsRegMethod::UDP), - 1 => ::std::option::Option::Some(DnsRegMethod::DOT), - 2 => ::std::option::Option::Some(DnsRegMethod::DOH), + 1 => ::std::option::Option::Some(DnsRegMethod::UDP), + 2 => ::std::option::Option::Some(DnsRegMethod::DOT), + 3 => ::std::option::Option::Some(DnsRegMethod::DOH), _ => ::std::option::Option::None } } @@ -5572,11 +5944,16 @@ impl ::protobuf::EnumFull for DnsRegMethod { } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; + let index = match self { + DnsRegMethod::UDP => 0, + DnsRegMethod::DOT => 1, + DnsRegMethod::DOH => 2, + }; Self::enum_descriptor().value_by_index(index) } } +// Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for DnsRegMethod { fn default() -> Self { DnsRegMethod::UDP @@ -5591,25 +5968,25 @@ impl DnsRegMethod { /// State transitions of the client #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.C2S_Transition) +// @@protoc_insertion_point(enum:conjure.C2S_Transition) pub enum C2S_Transition { - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_NO_CHANGE) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_NO_CHANGE) C2S_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_INIT) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_INIT) C2S_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_COVERT_INIT) C2S_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_RECONNECT) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_RECONNECT) C2S_EXPECT_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_CLOSE) C2S_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_YIELD_UPLOAD) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_YIELD_UPLOAD) C2S_YIELD_UPLOAD = 4, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ACQUIRE_UPLOAD) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ACQUIRE_UPLOAD) C2S_ACQUIRE_UPLOAD = 5, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) C2S_EXPECT_UPLOADONLY_RECONN = 6, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ERROR) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ERROR) C2S_ERROR = 255, } @@ -5684,19 +6061,19 @@ impl C2S_Transition { /// State transitions of the server #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.S2C_Transition) +// @@protoc_insertion_point(enum:conjure.S2C_Transition) pub enum S2C_Transition { - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_NO_CHANGE) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_NO_CHANGE) S2C_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_INIT) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_INIT) S2C_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_COVERT_INIT) S2C_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_CONFIRM_RECONNECT) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_CONFIRM_RECONNECT) S2C_CONFIRM_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_CLOSE) S2C_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_ERROR) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_ERROR) S2C_ERROR = 255, } @@ -5762,23 +6139,23 @@ impl S2C_Transition { /// Should accompany all S2C_ERROR messages. #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.ErrorReasonS2C) +// @@protoc_insertion_point(enum:conjure.ErrorReasonS2C) pub enum ErrorReasonS2C { - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.NO_ERROR) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.NO_ERROR) NO_ERROR = 0, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.COVERT_STREAM) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.COVERT_STREAM) COVERT_STREAM = 1, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_REPORTED) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_REPORTED) CLIENT_REPORTED = 2, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_PROTOCOL) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_PROTOCOL) CLIENT_PROTOCOL = 3, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.STATION_INTERNAL) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.STATION_INTERNAL) STATION_INTERNAL = 4, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.DECOY_OVERLOAD) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.DECOY_OVERLOAD) DECOY_OVERLOAD = 5, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_STREAM) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_STREAM) CLIENT_STREAM = 100, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_TIMEOUT) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_TIMEOUT) CLIENT_TIMEOUT = 101, } @@ -5849,15 +6226,29 @@ impl ErrorReasonS2C { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.TransportType) +// @@protoc_insertion_point(enum:conjure.TransportType) pub enum TransportType { - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Null) + // @@protoc_insertion_point(enum_value:conjure.TransportType.Null) Null = 0, - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Min) + // @@protoc_insertion_point(enum_value:conjure.TransportType.Min) Min = 1, - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Obfs4) + // @@protoc_insertion_point(enum_value:conjure.TransportType.Obfs4) Obfs4 = 2, - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Webrtc) + // @@protoc_insertion_point(enum_value:conjure.TransportType.DTLS) + DTLS = 3, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Prefix) + Prefix = 4, + // @@protoc_insertion_point(enum_value:conjure.TransportType.uTLS) + uTLS = 5, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Format) + Format = 6, + // @@protoc_insertion_point(enum_value:conjure.TransportType.WASM) + WASM = 7, + // @@protoc_insertion_point(enum_value:conjure.TransportType.FTE) + FTE = 8, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Quic) + Quic = 9, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Webrtc) Webrtc = 99, } @@ -5873,6 +6264,13 @@ impl ::protobuf::Enum for TransportType { 0 => ::std::option::Option::Some(TransportType::Null), 1 => ::std::option::Option::Some(TransportType::Min), 2 => ::std::option::Option::Some(TransportType::Obfs4), + 3 => ::std::option::Option::Some(TransportType::DTLS), + 4 => ::std::option::Option::Some(TransportType::Prefix), + 5 => ::std::option::Option::Some(TransportType::uTLS), + 6 => ::std::option::Option::Some(TransportType::Format), + 7 => ::std::option::Option::Some(TransportType::WASM), + 8 => ::std::option::Option::Some(TransportType::FTE), + 9 => ::std::option::Option::Some(TransportType::Quic), 99 => ::std::option::Option::Some(TransportType::Webrtc), _ => ::std::option::Option::None } @@ -5882,6 +6280,13 @@ impl ::protobuf::Enum for TransportType { TransportType::Null, TransportType::Min, TransportType::Obfs4, + TransportType::DTLS, + TransportType::Prefix, + TransportType::uTLS, + TransportType::Format, + TransportType::WASM, + TransportType::FTE, + TransportType::Quic, TransportType::Webrtc, ]; } @@ -5897,7 +6302,14 @@ impl ::protobuf::EnumFull for TransportType { TransportType::Null => 0, TransportType::Min => 1, TransportType::Obfs4 => 2, - TransportType::Webrtc => 3, + TransportType::DTLS => 3, + TransportType::Prefix => 4, + TransportType::uTLS => 5, + TransportType::Format => 6, + TransportType::WASM => 7, + TransportType::FTE => 8, + TransportType::Quic => 9, + TransportType::Webrtc => 10, }; Self::enum_descriptor().value_by_index(index) } @@ -5916,21 +6328,21 @@ impl TransportType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.RegistrationSource) +// @@protoc_insertion_point(enum:conjure.RegistrationSource) pub enum RegistrationSource { - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Unspecified) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Unspecified) Unspecified = 0, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Detector) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Detector) Detector = 1, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.API) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.API) API = 2, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DetectorPrescan) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DetectorPrescan) DetectorPrescan = 3, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalAPI) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalAPI) BidirectionalAPI = 4, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DNS) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DNS) DNS = 5, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalDNS) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalDNS) BidirectionalDNS = 6, } @@ -5990,15 +6402,15 @@ impl RegistrationSource { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.StationOperations) +// @@protoc_insertion_point(enum:conjure.StationOperations) pub enum StationOperations { - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Unknown) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.Unknown) Unknown = 0, - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.New) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.New) New = 1, - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Update) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.Update) Update = 2, - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Clear) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.Clear) Clear = 3, } @@ -6052,13 +6464,13 @@ impl StationOperations { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.IPProto) +// @@protoc_insertion_point(enum:conjure.IPProto) pub enum IPProto { - // @@protoc_insertion_point(enum_value:tapdance.IPProto.Unk) + // @@protoc_insertion_point(enum_value:conjure.IPProto.Unk) Unk = 0, - // @@protoc_insertion_point(enum_value:tapdance.IPProto.Tcp) + // @@protoc_insertion_point(enum_value:conjure.IPProto.Tcp) Tcp = 1, - // @@protoc_insertion_point(enum_value:tapdance.IPProto.Udp) + // @@protoc_insertion_point(enum_value:conjure.IPProto.Udp) Udp = 2, } @@ -6110,699 +6522,785 @@ impl IPProto { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10signalling.proto\x12\x08tapdance\x1a\x19google/protobuf/any.proto\ - \"A\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12%\n\x04\ - type\x18\x02\x20\x01(\x0e2\x11.tapdance.KeyTypeR\x04type\"\xbe\x01\n\x0c\ - TLSDecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\ - \x1a\n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6ad\ - dr\x18\x06\x20\x01(\x0cR\x08ipv6addr\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\"\ - \xa2\x02\n\nClientConf\x122\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x13.tapd\ - ance.DecoyListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\nge\ - neration\x127\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x10.tapdance.Pub\ - KeyR\rdefaultPubkey\x12N\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\ - \x1c.tapdance.PhantomSubnetsListR\x12phantomSubnetsList\x127\n\x0econjur\ - e_pubkey\x18\x05\x20\x01(\x0b2\x10.tapdance.PubKeyR\rconjurePubkey\"\x97\ - \x02\n\nDnsRegConf\x12<\n\x0edns_reg_method\x18\x01\x20\x02(\x0e2\x16.ta\ - pdance.DnsRegMethodR\x0cdnsRegMethod\x12\x19\n\x08udp_addr\x18\x02\x20\ - \x01(\tR\x07udpAddr\x12\x19\n\x08dot_addr\x18\x03\x20\x01(\tR\x07dotAddr\ - \x12\x17\n\x07doh_url\x18\x04\x20\x01(\tR\x06dohUrl\x12\x16\n\x06domain\ - \x18\x05\x20\x02(\tR\x06domain\x12\x16\n\x06pubkey\x18\x06\x20\x01(\x0cR\ - \x06pubkey\x12+\n\x11utls_distribution\x18\x07\x20\x01(\tR\x10utlsDistri\ - bution\x12\x1f\n\x0bstun_server\x18\x08\x20\x01(\tR\nstunServer\"B\n\tDe\ - coyList\x125\n\ntls_decoys\x18\x01\x20\x03(\x0b2\x16.tapdance.TLSDecoySp\ - ecR\ttlsDecoys\"Y\n\x12PhantomSubnetsList\x12C\n\x10weighted_subnets\x18\ - \x01\x20\x03(\x0b2\x18.tapdance.PhantomSubnetsR\x0fweightedSubnets\"B\n\ - \x0ePhantomSubnets\x12\x16\n\x06weight\x18\x01\x20\x01(\rR\x06weight\x12\ - \x18\n\x07subnets\x18\x02\x20\x03(\tR\x07subnets\"o\n\x12WebRTCICECandid\ - ate\x12\x19\n\x08ip_upper\x18\x01\x20\x02(\x04R\x07ipUpper\x12\x19\n\x08\ - ip_lower\x18\x02\x20\x02(\x04R\x07ipLower\x12#\n\rcomposed_info\x18\x03\ - \x20\x02(\rR\x0ccomposedInfo\"]\n\tWebRTCSDP\x12\x12\n\x04type\x18\x01\ - \x20\x02(\rR\x04type\x12<\n\ncandidates\x18\x02\x20\x03(\x0b2\x1c.tapdan\ - ce.WebRTCICECandidateR\ncandidates\"I\n\x0cWebRTCSignal\x12\x12\n\x04see\ - d\x18\x01\x20\x02(\tR\x04seed\x12%\n\x03sdp\x18\x02\x20\x02(\x0b2\x13.ta\ - pdance.WebRTCSDPR\x03sdp\"\xcb\x02\n\x0fStationToClient\x12)\n\x10protoc\ - ol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x12C\n\x10state_transi\ - tion\x18\x02\x20\x01(\x0e2\x18.tapdance.S2C_TransitionR\x0fstateTransiti\ - on\x125\n\x0bconfig_info\x18\x03\x20\x01(\x0b2\x14.tapdance.ClientConfR\ - \nconfigInfo\x127\n\nerr_reason\x18\x04\x20\x01(\x0e2\x18.tapdance.Error\ - ReasonS2CR\terrReason\x12\x1f\n\x0btmp_backoff\x18\x05\x20\x01(\rR\ntmpB\ - ackoff\x12\x1d\n\nstation_id\x18\x06\x20\x01(\tR\tstationId\x12\x18\n\ - \x07padding\x18d\x20\x01(\x0cR\x07padding\"\xaf\x01\n\x11RegistrationFla\ - gs\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\x12\x1e\n\nprescanned\x18\x05\x20\x01(\x08R\nprescanned\ - \"\xf7\x05\n\x0fClientToStation\x12)\n\x10protocol_version\x18\x01\x20\ - \x01(\rR\x0fprotocolVersion\x122\n\x15decoy_list_generation\x18\x02\x20\ - \x01(\rR\x13decoyListGeneration\x12C\n\x10state_transition\x18\x03\x20\ - \x01(\x0e2\x18.tapdance.C2S_TransitionR\x0fstateTransition\x12\x1f\n\x0b\ - upload_sync\x18\x04\x20\x01(\x04R\nuploadSync\x12,\n\x12client_lib_versi\ - on\x18\x05\x20\x01(\rR\x10clientLibVersion\x12#\n\rfailed_decoys\x18\n\ - \x20\x03(\tR\x0cfailedDecoys\x12,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.t\ - apdance.SessionStatsR\x05stats\x125\n\ttransport\x18\x0c\x20\x01(\x0e2\ - \x17.tapdance.TransportTypeR\ttransport\x12?\n\x10transport_params\x18\r\ - \x20\x01(\x0b2\x14.google.protobuf.AnyR\x0ftransportParams\x12%\n\x0ecov\ - ert_address\x18\x14\x20\x01(\tR\rcovertAddress\x127\n\x18masked_decoy_se\ - rver_name\x18\x15\x20\x01(\tR\x15maskedDecoyServerName\x12\x1d\n\nv6_sup\ - port\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;\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\ - \x16.tapdance.WebRTCSignalR\x0cwebrtcSignal\x12\x18\n\x07padding\x18d\ - \x20\x01(\x0cR\x07padding\"F\n\x16GenericTransportParams\x12,\n\x12rando\ - mize_dst_port\x18\r\x20\x01(\x08R\x10randomizeDstPort\"\xfb\x02\n\nC2SWr\ - apper\x12#\n\rshared_secret\x18\x01\x20\x01(\x0cR\x0csharedSecret\x12L\n\ - \x14registration_payload\x18\x03\x20\x01(\x0b2\x19.tapdance.ClientToStat\ - ionR\x13registrationPayload\x12M\n\x13registration_source\x18\x04\x20\ - \x01(\x0e2\x1c.tapdance.RegistrationSourceR\x12registrationSource\x121\n\ - \x14registration_address\x18\x06\x20\x01(\x0cR\x13registrationAddress\ - \x12#\n\rdecoy_address\x18\x07\x20\x01(\x0cR\x0cdecoyAddress\x12S\n\x15r\ - egistration_response\x18\x08\x20\x01(\x0b2\x1e.tapdance.RegistrationResp\ - onseR\x14registrationResponse\"\xdd\x01\n\x0cSessionStats\x120\n\x14fail\ - ed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAmount\x121\n\x15tot\ - al_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToConnect\x12$\n\x0er\ - tt_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\"\x88\x02\n\x11StationToDetector\x12\x1d\n\nphantom_ip\x18\ - \x01\x20\x01(\tR\tphantomIp\x12\x1b\n\tclient_ip\x18\x02\x20\x01(\tR\x08\ - clientIp\x12\x1d\n\ntimeout_ns\x18\x03\x20\x01(\x04R\ttimeoutNs\x129\n\t\ - operation\x18\x04\x20\x01(\x0e2\x1b.tapdance.StationOperationsR\toperati\ - on\x12\x19\n\x08dst_port\x18\n\x20\x01(\rR\x07dstPort\x12\x19\n\x08src_p\ - ort\x18\x0b\x20\x01(\rR\x07srcPort\x12'\n\x05proto\x18\x0c\x20\x01(\x0e2\ - \x11.tapdance.IPProtoR\x05proto\"\xd9\x01\n\x14RegistrationResponse\x12\ - \x1a\n\x08ipv4addr\x18\x01\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6ad\ - dr\x18\x02\x20\x01(\x0cR\x08ipv6addr\x12\x19\n\x08dst_port\x18\x03\x20\ - \x01(\rR\x07dstPort\x12\"\n\x0cserverRandom\x18\x04\x20\x01(\x0cR\x0cser\ - verRandom\x12\x14\n\x05error\x18\x05\x20\x01(\tR\x05error\x124\n\nclient\ - Conf\x18\x06\x20\x01(\x0b2\x14.tapdance.ClientConfR\nclientConf\"\xaf\ - \x01\n\x0bDnsResponse\x12\x18\n\x07success\x18\x01\x20\x01(\x08R\x07succ\ - ess\x12/\n\x13clientconf_outdated\x18\x02\x20\x01(\x08R\x12clientconfOut\ - dated\x12U\n\x16bidirectional_response\x18\x03\x20\x01(\x0b2\x1e.tapdanc\ - e.RegistrationResponseR\x15bidirectionalResponse*+\n\x07KeyType\x12\x0f\ - \n\x0bAES_GCM_128\x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\ - \x12\x07\n\x03UDP\x10\0\x12\x07\n\x03DOT\x10\x01\x12\x07\n\x03DOH\x10\ - \x02*\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\x10e*9\n\rTransportType\x12\x08\n\x04Null\x10\0\ - \x12\x07\n\x03Min\x10\x01\x12\t\n\x05Obfs4\x10\x02\x12\n\n\x06Webrtc\x10\ - c*\x86\x01\n\x12RegistrationSource\x12\x0f\n\x0bUnspecified\x10\0\x12\ - \x0c\n\x08Detector\x10\x01\x12\x07\n\x03API\x10\x02\x12\x13\n\x0fDetecto\ - rPrescan\x10\x03\x12\x14\n\x10BidirectionalAPI\x10\x04\x12\x07\n\x03DNS\ - \x10\x05\x12\x14\n\x10BidirectionalDNS\x10\x06*@\n\x11StationOperations\ - \x12\x0b\n\x07Unknown\x10\0\x12\x07\n\x03New\x10\x01\x12\n\n\x06Update\ - \x10\x02\x12\t\n\x05Clear\x10\x03*$\n\x07IPProto\x12\x07\n\x03Unk\x10\0\ - \x12\x07\n\x03Tcp\x10\x01\x12\x07\n\x03Udp\x10\x02J\x8fy\n\x07\x12\x05\0\ - \0\xf3\x02\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\x20\ - point\x20we\x20will\x20want\x20to\x20migrate\x20to\x20proto3,\x20but\x20\ - we\x20are\x20not\n\x20using\x20any\x20proto3\x20features\x20yet.\n\n\t\n\ - \x02\x03\0\x12\x03\x08\0#\n\n\n\x02\x05\0\x12\x04\n\0\r\x01\n\n\n\x03\ - \x05\0\x01\x12\x03\n\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\x0b\x04\x15\ - \n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x0b\x04\x0f\n\x0c\n\x05\x05\0\x02\0\ - \x02\x12\x03\x0b\x12\x14\n\x20\n\x04\x05\0\x02\x01\x12\x03\x0c\x04\x15\"\ - \x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\ - \x0c\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x0c\x12\x14\n\n\n\x02\ - \x04\0\x12\x04\x0f\0\x14\x01\n\n\n\x03\x04\0\x01\x12\x03\x0f\x08\x0e\n4\ - \n\x04\x04\0\x02\0\x12\x03\x11\x04\x1b\x1a'\x20A\x20public\x20key,\x20as\ - \x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\ - \x11\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x11\r\x12\n\x0c\n\x05\ - \x04\0\x02\0\x01\x12\x03\x11\x13\x16\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\ - \x11\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x13\x04\x1e\n\x0c\n\x05\ - \x04\0\x02\x01\x04\x12\x03\x13\x04\x0c\n\x0c\n\x05\x04\0\x02\x01\x06\x12\ - \x03\x13\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x13\x15\x19\n\x0c\n\ - \x05\x04\0\x02\x01\x03\x12\x03\x13\x1c\x1d\n\n\n\x02\x04\x01\x12\x04\x16\ - \0<\x01\n\n\n\x03\x04\x01\x01\x12\x03\x16\x08\x14\n\xa1\x01\n\x04\x04\ - \x01\x02\0\x12\x03\x1b\x04!\x1a\x93\x01\x20The\x20hostname/SNI\x20to\x20\ - use\x20for\x20this\x20host\n\n\x20The\x20hostname\x20is\x20the\x20only\ - \x20required\x20field,\x20although\x20other\n\x20fields\x20are\x20expect\ - ed\x20to\x20be\x20present\x20in\x20most\x20cases.\n\n\x0c\n\x05\x04\x01\ - \x02\0\x04\x12\x03\x1b\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x1b\ - \r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x1b\x14\x1c\n\x0c\n\x05\x04\ - \x01\x02\0\x03\x12\x03\x1b\x1f\x20\n\xf7\x01\n\x04\x04\x01\x02\x01\x12\ - \x03\"\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20ipv4\x20address,\x20in\x20n\ - etwork\x20byte\x20order\n\n\x20If\x20the\x20IPv4\x20address\x20is\x20abs\ - ent,\x20then\x20it\x20may\x20be\x20resolved\x20via\n\x20DNS\x20by\x20the\ - \x20client,\x20or\x20the\x20client\x20may\x20discard\x20this\x20decoy\ - \x20spec\n\x20if\x20local\x20DNS\x20is\x20untrusted,\x20or\x20the\x20ser\ - vice\x20may\x20be\x20multihomed.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\ - \x03\"\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\"\r\x14\n\x0c\n\ - \x05\x04\x01\x02\x01\x01\x12\x03\"\x15\x1d\n\x0c\n\x05\x04\x01\x02\x01\ - \x03\x12\x03\"\x20!\n>\n\x04\x04\x01\x02\x02\x12\x03%\x04\x20\x1a1\x20Th\ - e\x20128-bit\x20ipv6\x20address,\x20in\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\x20default\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\x032\x04\x20\x1a\xe0\ - \x01\x20The\x20maximum\x20duration,\x20in\x20milliseconds,\x20to\x20main\ - tain\x20an\x20open\n\x20connection\x20to\x20this\x20decoy\x20(because\ - \x20the\x20decoy\x20may\x20close\x20the\n\x20connection\x20itself\x20aft\ - er\x20this\x20length\x20of\x20time)\n\n\x20If\x20omitted,\x20a\x20defaul\ - t\x20of\x2030,000\x20milliseconds\x20is\x20assumed.\n\n\x0c\n\x05\x04\ - \x01\x02\x04\x04\x12\x032\x04\x0c\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\ - \x032\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x032\x14\x1b\n\x0c\n\x05\ - \x04\x01\x02\x04\x03\x12\x032\x1e\x1f\n\xb0\x02\n\x04\x04\x01\x02\x05\ - \x12\x03;\x04\x1f\x1a\xa2\x02\x20The\x20maximum\x20TCP\x20window\x20size\ - \x20to\x20attempt\x20to\x20use\x20for\x20this\x20decoy.\n\n\x20If\x20omi\ - tted,\x20a\x20default\x20of\x2015360\x20is\x20assumed.\n\n\x20TODO:\x20t\ - he\x20default\x20is\x20based\x20on\x20the\x20current\x20heuristic\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\x03;\x04\x0c\n\x0c\n\x05\x04\x01\x02\x05\x05\x12\x03;\r\ - \x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03;\x14\x1a\n\x0c\n\x05\x04\ - \x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\x08\n\x02\x04\x02\x12\x04S\0Y\ - \x012\xf6\x07\x20In\x20version\x201,\x20the\x20request\x20is\x20very\x20\ - simple:\x20when\n\x20the\x20client\x20sends\x20a\x20MSG_PROTO\x20to\x20t\ - he\x20station,\x20if\x20the\n\x20generation\x20number\x20is\x20present,\ - \x20then\x20this\x20request\x20includes\n\x20(in\x20addition\x20to\x20wh\ - atever\x20other\x20operations\x20are\x20part\x20of\x20the\n\x20request)\ - \x20a\x20request\x20for\x20the\x20station\x20to\x20send\x20a\x20copy\x20\ - of\n\x20the\x20current\x20decoy\x20set\x20that\x20has\x20a\x20generation\ - \x20number\x20greater\n\x20than\x20the\x20generation\x20number\x20in\x20\ - its\x20request.\n\n\x20If\x20the\x20response\x20contains\x20a\x20DecoyLi\ - stUpdate\x20with\x20a\x20generation\x20number\x20equal\n\x20to\x20that\ - \x20which\x20the\x20client\x20sent,\x20then\x20the\x20client\x20is\x20\"\ - caught\x20up\"\x20with\n\x20the\x20station\x20and\x20the\x20response\x20\ - contains\x20no\x20new\x20information\n\x20(and\x20all\x20other\x20fields\ - \x20may\x20be\x20omitted\x20or\x20empty).\x20\x20Otherwise,\n\x20the\x20\ - station\x20will\x20send\x20the\x20latest\x20configuration\x20information\ - ,\n\x20along\x20with\x20its\x20generation\x20number.\n\n\x20The\x20stati\ - on\x20can\x20also\x20send\x20ClientConf\x20messages\n\x20(as\x20part\x20\ - of\x20Station2Client\x20messages)\x20whenever\x20it\x20wants.\n\x20The\ - \x20client\x20is\x20expected\x20to\x20react\x20as\x20if\x20it\x20had\x20\ - requested\n\x20such\x20messages\x20--\x20possibly\x20by\x20ignoring\x20t\ - hem,\x20if\x20the\x20client\n\x20is\x20already\x20up-to-date\x20accordin\ - g\x20to\x20the\x20generation\x20number.\n\n\n\n\x03\x04\x02\x01\x12\x03S\ - \x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\x03T\x04&\n\x0c\n\x05\x04\x02\x02\ - \0\x04\x12\x03T\x04\x0c\n\x0c\n\x05\x04\x02\x02\0\x06\x12\x03T\r\x16\n\ - \x0c\n\x05\x04\x02\x02\0\x01\x12\x03T\x17!\n\x0c\n\x05\x04\x02\x02\0\x03\ - \x12\x03T$%\n\x0b\n\x04\x04\x02\x02\x01\x12\x03U\x04#\n\x0c\n\x05\x04\ - \x02\x02\x01\x04\x12\x03U\x04\x0c\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\ - \x03U\r\x13\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\ - \x04\x02\x02\x01\x03\x12\x03U!\"\n\x0b\n\x04\x04\x02\x02\x02\x12\x03V\ - \x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03V\x04\x0c\n\x0c\n\x05\x04\ - \x02\x02\x02\x06\x12\x03V\r\x13\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03V\ - \x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03V%&\n\x0b\n\x04\x04\x02\ - \x02\x03\x12\x03W\x049\n\x0c\n\x05\x04\x02\x02\x03\x04\x12\x03W\x04\x0c\ - \n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\ - \x03\x01\x12\x03W\x204\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03W78\n\x0b\ - \n\x04\x04\x02\x02\x04\x12\x03X\x04'\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\ - \x03X\x04\x0c\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\ - \x04\x02\x02\x04\x01\x12\x03X\x14\"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\ - \x03X%&\n-\n\x02\x04\x03\x12\x04\\\0e\x01\x1a!\x20Configuration\x20for\ - \x20DNS\x20registrar\n\n\n\n\x03\x04\x03\x01\x12\x03\\\x08\x12\n\x0b\n\ - \x04\x04\x03\x02\0\x12\x03]\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03]\ - \x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03]\r\x19\n\x0c\n\x05\x04\ - \x03\x02\0\x01\x12\x03]\x1a(\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03]+,\n\ - \x0b\n\x04\x04\x03\x02\x01\x12\x03^\x04!\n\x0c\n\x05\x04\x03\x02\x01\x04\ - \x12\x03^\x04\x0c\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03^\r\x13\n\x0c\n\ - \x05\x04\x03\x02\x01\x01\x12\x03^\x14\x1c\n\x0c\n\x05\x04\x03\x02\x01\ - \x03\x12\x03^\x1f\x20\n\x0b\n\x04\x04\x03\x02\x02\x12\x03_\x04!\n\x0c\n\ - \x05\x04\x03\x02\x02\x04\x12\x03_\x04\x0c\n\x0c\n\x05\x04\x03\x02\x02\ - \x05\x12\x03_\r\x13\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03_\x14\x1c\n\ - \x0c\n\x05\x04\x03\x02\x02\x03\x12\x03_\x1f\x20\n\x0b\n\x04\x04\x03\x02\ - \x03\x12\x03`\x04\x20\n\x0c\n\x05\x04\x03\x02\x03\x04\x12\x03`\x04\x0c\n\ - \x0c\n\x05\x04\x03\x02\x03\x05\x12\x03`\r\x13\n\x0c\n\x05\x04\x03\x02\ - \x03\x01\x12\x03`\x14\x1b\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x03`\x1e\ - \x1f\n\x0b\n\x04\x04\x03\x02\x04\x12\x03a\x04\x1f\n\x0c\n\x05\x04\x03\ - \x02\x04\x04\x12\x03a\x04\x0c\n\x0c\n\x05\x04\x03\x02\x04\x05\x12\x03a\r\ - \x13\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03a\x14\x1a\n\x0c\n\x05\x04\ - \x03\x02\x04\x03\x12\x03a\x1d\x1e\n\x0b\n\x04\x04\x03\x02\x05\x12\x03b\ - \x04\x1e\n\x0c\n\x05\x04\x03\x02\x05\x04\x12\x03b\x04\x0c\n\x0c\n\x05\ - \x04\x03\x02\x05\x05\x12\x03b\r\x12\n\x0c\n\x05\x04\x03\x02\x05\x01\x12\ - \x03b\x13\x19\n\x0c\n\x05\x04\x03\x02\x05\x03\x12\x03b\x1c\x1d\n\x0b\n\ - \x04\x04\x03\x02\x06\x12\x03c\x04*\n\x0c\n\x05\x04\x03\x02\x06\x04\x12\ - \x03c\x04\x0c\n\x0c\n\x05\x04\x03\x02\x06\x05\x12\x03c\r\x13\n\x0c\n\x05\ - \x04\x03\x02\x06\x01\x12\x03c\x14%\n\x0c\n\x05\x04\x03\x02\x06\x03\x12\ - \x03c()\n\x0b\n\x04\x04\x03\x02\x07\x12\x03d\x04$\n\x0c\n\x05\x04\x03\ - \x02\x07\x04\x12\x03d\x04\x0c\n\x0c\n\x05\x04\x03\x02\x07\x05\x12\x03d\r\ - \x13\n\x0c\n\x05\x04\x03\x02\x07\x01\x12\x03d\x14\x1f\n\x0c\n\x05\x04\ - \x03\x02\x07\x03\x12\x03d\"#\n\n\n\x02\x05\x01\x12\x04g\0k\x01\n\n\n\x03\ - \x05\x01\x01\x12\x03g\x05\x11\n\x0b\n\x04\x05\x01\x02\0\x12\x03h\x04\x0c\ - \n\x0c\n\x05\x05\x01\x02\0\x01\x12\x03h\x04\x07\n\x0c\n\x05\x05\x01\x02\ - \0\x02\x12\x03h\n\x0b\n\x0b\n\x04\x05\x01\x02\x01\x12\x03i\x04\x0c\n\x0c\ - \n\x05\x05\x01\x02\x01\x01\x12\x03i\x04\x07\n\x0c\n\x05\x05\x01\x02\x01\ - \x02\x12\x03i\n\x0b\n\x0b\n\x04\x05\x01\x02\x02\x12\x03j\x04\x0c\n\x0c\n\ - \x05\x05\x01\x02\x02\x01\x12\x03j\x04\x07\n\x0c\n\x05\x05\x01\x02\x02\ - \x02\x12\x03j\n\x0b\n\n\n\x02\x04\x04\x12\x04m\0o\x01\n\n\n\x03\x04\x04\ - \x01\x12\x03m\x08\x11\n\x0b\n\x04\x04\x04\x02\0\x12\x03n\x04)\n\x0c\n\ - \x05\x04\x04\x02\0\x04\x12\x03n\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x06\ - \x12\x03n\r\x19\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03n\x1a$\n\x0c\n\x05\ - \x04\x04\x02\0\x03\x12\x03n'(\n\n\n\x02\x04\x05\x12\x04q\0s\x01\n\n\n\ - \x03\x04\x05\x01\x12\x03q\x08\x1a\n\x0b\n\x04\x04\x05\x02\0\x12\x03r\x04\ - 1\n\x0c\n\x05\x04\x05\x02\0\x04\x12\x03r\x04\x0c\n\x0c\n\x05\x04\x05\x02\ - \0\x06\x12\x03r\r\x1b\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03r\x1c,\n\x0c\ - \n\x05\x04\x05\x02\0\x03\x12\x03r/0\n\n\n\x02\x04\x06\x12\x04u\0x\x01\n\ - \n\n\x03\x04\x06\x01\x12\x03u\x08\x16\n\x0b\n\x04\x04\x06\x02\0\x12\x03v\ - \x04\x1f\n\x0c\n\x05\x04\x06\x02\0\x04\x12\x03v\x04\x0c\n\x0c\n\x05\x04\ - \x06\x02\0\x05\x12\x03v\r\x13\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03v\x14\ - \x1a\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03v\x1d\x1e\n\x0b\n\x04\x04\x06\ - \x02\x01\x12\x03w\x04\x20\n\x0c\n\x05\x04\x06\x02\x01\x04\x12\x03w\x04\ - \x0c\n\x0c\n\x05\x04\x06\x02\x01\x05\x12\x03w\r\x13\n\x0c\n\x05\x04\x06\ - \x02\x01\x01\x12\x03w\x14\x1b\n\x0c\n\x05\x04\x06\x02\x01\x03\x12\x03w\ - \x1e\x1f\n.\n\x02\x05\x02\x12\x05{\0\x85\x01\x01\x1a!\x20State\x20transi\ - tions\x20of\x20the\x20client\n\n\n\n\x03\x05\x02\x01\x12\x03{\x05\x13\n\ - \x0b\n\x04\x05\x02\x02\0\x12\x03|\x04\x16\n\x0c\n\x05\x05\x02\x02\0\x01\ - \x12\x03|\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\x03|\x14\x15\n\"\n\ - \x04\x05\x02\x02\x01\x12\x03}\x04\x19\"\x15\x20connect\x20me\x20to\x20sq\ - uid\n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03}\x04\x14\n\x0c\n\x05\x05\ - \x02\x02\x01\x02\x12\x03}\x17\x18\n,\n\x04\x05\x02\x02\x02\x12\x03~\x04!\ + \n\x10signalling.proto\x12\x07conjure\x1a\x19google/protobuf/any.proto\"\ + @\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12$\n\x04ty\ + pe\x18\x02\x20\x01(\x0e2\x10.conjure.KeyTypeR\x04type\"\xbd\x01\n\x0cTLS\ + DecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\x1a\ + \n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\ + \x18\x06\x20\x01(\x0cR\x08ipv6addr\x12'\n\x06pubkey\x18\x03\x20\x01(\x0b\ + 2\x0f.conjure.PubKeyR\x06pubkey\x12\x18\n\x07timeout\x18\x04\x20\x01(\rR\ + \x07timeout\x12\x16\n\x06tcpwin\x18\x05\x20\x01(\rR\x06tcpwin\"\xd5\x02\ + \n\nClientConf\x121\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x12.conjure.Deco\ + yListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\ngeneration\ + \x126\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x0f.conjure.PubKeyR\rdef\ + aultPubkey\x12M\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\x1b.conj\ + ure.PhantomSubnetsListR\x12phantomSubnetsList\x126\n\x0econjure_pubkey\ + \x18\x05\x20\x01(\x0b2\x0f.conjure.PubKeyR\rconjurePubkey\x125\n\x0cdns_\ + reg_conf\x18\x06\x20\x01(\x0b2\x13.conjure.DnsRegConfR\ndnsRegConf\"\xdf\ + \x01\n\nDnsRegConf\x12;\n\x0edns_reg_method\x18\x01\x20\x02(\x0e2\x15.co\ + njure.DnsRegMethodR\x0cdnsRegMethod\x12\x16\n\x06target\x18\x02\x20\x01(\ + \tR\x06target\x12\x16\n\x06domain\x18\x03\x20\x02(\tR\x06domain\x12\x16\ + \n\x06pubkey\x18\x04\x20\x01(\x0cR\x06pubkey\x12+\n\x11utls_distribution\ + \x18\x05\x20\x01(\tR\x10utlsDistribution\x12\x1f\n\x0bstun_server\x18\ + \x06\x20\x01(\tR\nstunServer\"A\n\tDecoyList\x124\n\ntls_decoys\x18\x01\ + \x20\x03(\x0b2\x15.conjure.TLSDecoySpecR\ttlsDecoys\"X\n\x12PhantomSubne\ + tsList\x12B\n\x10weighted_subnets\x18\x01\x20\x03(\x0b2\x17.conjure.Phan\ + tomSubnetsR\x0fweightedSubnets\"B\n\x0ePhantomSubnets\x12\x16\n\x06weigh\ + t\x18\x01\x20\x01(\rR\x06weight\x12\x18\n\x07subnets\x18\x02\x20\x03(\tR\ + \x07subnets\"o\n\x12WebRTCICECandidate\x12\x19\n\x08ip_upper\x18\x01\x20\ + \x02(\x04R\x07ipUpper\x12\x19\n\x08ip_lower\x18\x02\x20\x02(\x04R\x07ipL\ + ower\x12#\n\rcomposed_info\x18\x03\x20\x02(\rR\x0ccomposedInfo\"\\\n\tWe\ + bRTCSDP\x12\x12\n\x04type\x18\x01\x20\x02(\rR\x04type\x12;\n\ncandidates\ + \x18\x02\x20\x03(\x0b2\x1b.conjure.WebRTCICECandidateR\ncandidates\"H\n\ + \x0cWebRTCSignal\x12\x12\n\x04seed\x18\x01\x20\x02(\tR\x04seed\x12$\n\ + \x03sdp\x18\x02\x20\x02(\x0b2\x12.conjure.WebRTCSDPR\x03sdp\"\xc8\x02\n\ + \x0fStationToClient\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fpr\ + otocolVersion\x12B\n\x10state_transition\x18\x02\x20\x01(\x0e2\x17.conju\ + re.S2C_TransitionR\x0fstateTransition\x124\n\x0bconfig_info\x18\x03\x20\ + \x01(\x0b2\x13.conjure.ClientConfR\nconfigInfo\x126\n\nerr_reason\x18\ + \x04\x20\x01(\x0e2\x17.conjure.ErrorReasonS2CR\terrReason\x12\x1f\n\x0bt\ + mp_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\x07paddi\ + ng\"\xaf\x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_only\x18\x01\x20\ + \x01(\x08R\nuploadOnly\x12\x1d\n\ndark_decoy\x18\x02\x20\x01(\x08R\tdark\ + Decoy\x12!\n\x0cproxy_header\x18\x03\x20\x01(\x08R\x0bproxyHeader\x12\ + \x17\n\x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\x12\x1e\n\nprescanned\ + \x18\x05\x20\x01(\x08R\nprescanned\"\xae\x06\n\x0fClientToStation\x12)\n\ + \x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x122\n\x15de\ + coy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGeneration\x12B\n\ + \x10state_transition\x18\x03\x20\x01(\x0e2\x17.conjure.C2S_TransitionR\ + \x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\x04R\nuplo\ + adSync\x12,\n\x12client_lib_version\x18\x05\x20\x01(\rR\x10clientLibVers\ + ion\x12:\n\x19allow_registrar_overrides\x18\x06\x20\x01(\x08R\x17allowRe\ + gistrarOverrides\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoys\ + \x12+\n\x05stats\x18\x0b\x20\x01(\x0b2\x15.conjure.SessionStatsR\x05stat\ + s\x124\n\ttransport\x18\x0c\x20\x01(\x0e2\x16.conjure.TransportTypeR\ttr\ + ansport\x12?\n\x10transport_params\x18\r\x20\x01(\x0b2\x14.google.protob\ + uf.AnyR\x0ftransportParams\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\ + \rcovertAddress\x127\n\x18masked_decoy_server_name\x18\x15\x20\x01(\tR\ + \x15maskedDecoyServerName\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv\ + 6Support\x12\x1d\n\nv4_support\x18\x17\x20\x01(\x08R\tv4Support\x120\n\ + \x05flags\x18\x18\x20\x01(\x0b2\x1a.conjure.RegistrationFlagsR\x05flags\ + \x12:\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\x15.conjure.WebRTCSignalR\ + \x0cwebrtcSignal\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"z\n\ + \x15PrefixTransportParams\x12\x1b\n\tprefix_id\x18\x01\x20\x01(\x05R\x08\ + prefixId\x12\x16\n\x06prefix\x18\x02\x20\x01(\x0cR\x06prefix\x12,\n\x12r\ + andomize_dst_port\x18\r\x20\x01(\x08R\x10randomizeDstPort\"F\n\x16Generi\ + cTransportParams\x12,\n\x12randomize_dst_port\x18\r\x20\x01(\x08R\x10ran\ + domizeDstPort\"\xc8\x03\n\nC2SWrapper\x12#\n\rshared_secret\x18\x01\x20\ + \x01(\x0cR\x0csharedSecret\x12K\n\x14registration_payload\x18\x03\x20\ + \x01(\x0b2\x18.conjure.ClientToStationR\x13registrationPayload\x12L\n\ + \x13registration_source\x18\x04\x20\x01(\x0e2\x1b.conjure.RegistrationSo\ + urceR\x12registrationSource\x121\n\x14registration_address\x18\x06\x20\ + \x01(\x0cR\x13registrationAddress\x12#\n\rdecoy_address\x18\x07\x20\x01(\ + \x0cR\x0cdecoyAddress\x12R\n\x15registration_response\x18\x08\x20\x01(\ + \x0b2\x1d.conjure.RegistrationResponseR\x14registrationResponse\x12\"\n\ + \x0cRegRespBytes\x18\t\x20\x01(\x0cR\x0cRegRespBytes\x12*\n\x10RegRespSi\ + gnature\x18\n\x20\x01(\x0cR\x10RegRespSignature\"\xdd\x01\n\x0cSessionSt\ + ats\x120\n\x14failed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAm\ + ount\x121\n\x15total_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToC\ + onnect\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_deco\ + y\x18'\x20\x01(\rR\ntcpToDecoy\"\x86\x02\n\x11StationToDetector\x12\x1d\ + \n\nphantom_ip\x18\x01\x20\x01(\tR\tphantomIp\x12\x1b\n\tclient_ip\x18\ + \x02\x20\x01(\tR\x08clientIp\x12\x1d\n\ntimeout_ns\x18\x03\x20\x01(\x04R\ + \ttimeoutNs\x128\n\toperation\x18\x04\x20\x01(\x0e2\x1a.conjure.StationO\ + perationsR\toperation\x12\x19\n\x08dst_port\x18\n\x20\x01(\rR\x07dstPort\ + \x12\x19\n\x08src_port\x18\x0b\x20\x01(\rR\x07srcPort\x12&\n\x05proto\ + \x18\x0c\x20\x01(\x0e2\x10.conjure.IPProtoR\x05proto\"\x99\x02\n\x14Regi\ + strationResponse\x12\x1a\n\x08ipv4addr\x18\x01\x20\x01(\x07R\x08ipv4addr\ + \x12\x1a\n\x08ipv6addr\x18\x02\x20\x01(\x0cR\x08ipv6addr\x12\x19\n\x08ds\ + t_port\x18\x03\x20\x01(\rR\x07dstPort\x12\"\n\x0cserverRandom\x18\x04\ + \x20\x01(\x0cR\x0cserverRandom\x12\x14\n\x05error\x18\x05\x20\x01(\tR\ + \x05error\x123\n\nclientConf\x18\x06\x20\x01(\x0b2\x13.conjure.ClientCon\ + fR\nclientConf\x12?\n\x10transport_params\x18\n\x20\x01(\x0b2\x14.google\ + .protobuf.AnyR\x0ftransportParams\"\xae\x01\n\x0bDnsResponse\x12\x18\n\ + \x07success\x18\x01\x20\x01(\x08R\x07success\x12/\n\x13clientconf_outdat\ + ed\x18\x02\x20\x01(\x08R\x12clientconfOutdated\x12T\n\x16bidirectional_r\ + esponse\x18\x03\x20\x01(\x0b2\x1d.conjure.RegistrationResponseR\x15bidir\ + ectionalResponse*+\n\x07KeyType\x12\x0f\n\x0bAES_GCM_128\x10Z\x12\x0f\n\ + \x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\x12\x07\n\x03UDP\x10\x01\x12\ + \x07\n\x03DOT\x10\x02\x12\x07\n\x03DOH\x10\x03*\xe7\x01\n\x0eC2S_Transit\ + ion\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_RE\ + CONNECT\x10\x02\x12\x15\n\x11C2S_SESSION_CLOSE\x10\x03\x12\x14\n\x10C2S_\ + YIELD_UPLOAD\x10\x04\x12\x16\n\x12C2S_ACQUIRE_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\x0eErrorReaso\ + nS2C\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*\x82\ + \x01\n\rTransportType\x12\x08\n\x04Null\x10\0\x12\x07\n\x03Min\x10\x01\ + \x12\t\n\x05Obfs4\x10\x02\x12\x08\n\x04DTLS\x10\x03\x12\n\n\x06Prefix\ + \x10\x04\x12\x08\n\x04uTLS\x10\x05\x12\n\n\x06Format\x10\x06\x12\x08\n\ + \x04WASM\x10\x07\x12\x07\n\x03FTE\x10\x08\x12\x08\n\x04Quic\x10\t\x12\n\ + \n\x06Webrtc\x10c*\x86\x01\n\x12RegistrationSource\x12\x0f\n\x0bUnspecif\ + ied\x10\0\x12\x0c\n\x08Detector\x10\x01\x12\x07\n\x03API\x10\x02\x12\x13\ + \n\x0fDetectorPrescan\x10\x03\x12\x14\n\x10BidirectionalAPI\x10\x04\x12\ + \x07\n\x03DNS\x10\x05\x12\x14\n\x10BidirectionalDNS\x10\x06*@\n\x11Stati\ + onOperations\x12\x0b\n\x07Unknown\x10\0\x12\x07\n\x03New\x10\x01\x12\n\n\ + \x06Update\x10\x02\x12\t\n\x05Clear\x10\x03*$\n\x07IPProto\x12\x07\n\x03\ + Unk\x10\0\x12\x07\n\x03Tcp\x10\x01\x12\x07\n\x03Udp\x10\x02J\xc0\x8d\x01\ + \n\x07\x12\x05\0\0\xa1\x03\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\ + \n\x01\x02\x12\x03\x06\0\x102\xa5\x01\x20TODO:\x20We're\x20using\x20prot\ + o2\x20because\x20it's\x20the\x20default\x20on\x20Ubuntu\x2016.04.\n\x20A\ + t\x20some\x20point\x20we\x20will\x20want\x20to\x20migrate\x20to\x20proto\ + 3,\x20but\x20we\x20are\x20not\n\x20using\x20any\x20proto3\x20features\ + \x20yet.\n\n\t\n\x02\x03\0\x12\x03\x08\0#\n\n\n\x02\x05\0\x12\x04\n\0\r\ + \x01\n\n\n\x03\x05\0\x01\x12\x03\n\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\ + \x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x0b\x04\x0f\n\x0c\n\ + \x05\x05\0\x02\0\x02\x12\x03\x0b\x12\x14\n\x20\n\x04\x05\0\x02\x01\x12\ + \x03\x0c\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\ + \x02\x01\x01\x12\x03\x0c\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\ + \x0c\x12\x14\n\n\n\x02\x04\0\x12\x04\x0f\0\x14\x01\n\n\n\x03\x04\0\x01\ + \x12\x03\x0f\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x11\x04\x1b\x1a'\x20A\ + \x20public\x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\ + \x04\0\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ + \x11\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x11\x13\x16\n\x0c\n\x05\ + \x04\0\x02\0\x03\x12\x03\x11\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\ + \x13\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x13\x04\x0c\n\x0c\n\ + \x05\x04\0\x02\x01\x06\x12\x03\x13\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\ + \x12\x03\x13\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x13\x1c\x1d\n\ + \n\n\x02\x04\x01\x12\x04\x16\0<\x01\n\n\n\x03\x04\x01\x01\x12\x03\x16\ + \x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x1b\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\x1b\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\0\x05\x12\x03\x1b\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\ + \x1b\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1b\x1f\x20\n\xf7\x01\ + \n\x04\x04\x01\x02\x01\x12\x03\"\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20i\ + pv4\x20address,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\x20IP\ + v4\x20address\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resolved\ + \x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20the\x20client\x20may\ + \x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20un\ + trusted,\x20or\x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\ + \x05\x04\x01\x02\x01\x04\x12\x03\"\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\ + \x05\x12\x03\"\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\"\x15\x1d\n\ + \x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\"\x20!\n>\n\x04\x04\x01\x02\x02\ + \x12\x03%\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20ne\ + twork\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\x20\ + contacting\x20this\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20default\ + \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\x032\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20duration,\x20in\ + \x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connection\x20to\ + \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\x032\x04\x0c\n\x0c\n\ + \x05\x04\x01\x02\x04\x05\x12\x032\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\ + \x12\x032\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x032\x1e\x1f\n\xb0\ + \x02\n\x04\x04\x01\x02\x05\x12\x03;\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\x03;\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\x05\x05\x12\x03;\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03;\ + \x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\x08\n\ + \x02\x04\x02\x12\x04S\0Z\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\x03S\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\ + \x03T\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03T\x04\x0c\n\x0c\n\x05\ + \x04\x02\x02\0\x06\x12\x03T\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03T\ + \x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03T$%\n\x0b\n\x04\x04\x02\x02\ + \x01\x12\x03U\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03U\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\x01\x05\x12\x03U\r\x13\n\x0c\n\x05\x04\x02\x02\ + \x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03U!\"\n\ + \x0b\n\x04\x04\x02\x02\x02\x12\x03V\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\ + \x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03V\r\x13\n\x0c\n\ + \x05\x04\x02\x02\x02\x01\x12\x03V\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\ + \x12\x03V%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03W\x049\n\x0c\n\x05\x04\ + \x02\x02\x03\x04\x12\x03W\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\ + \x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03W\x204\n\x0c\n\x05\ + \x04\x02\x02\x03\x03\x12\x03W78\n\x0b\n\x04\x04\x02\x02\x04\x12\x03X\x04\ + '\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03X\x04\x0c\n\x0c\n\x05\x04\x02\ + \x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03X\x14\ + \"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03X%&\n\x0b\n\x04\x04\x02\x02\ + \x05\x12\x03Y\x04)\n\x0c\n\x05\x04\x02\x02\x05\x04\x12\x03Y\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\x05\x06\x12\x03Y\r\x17\n\x0c\n\x05\x04\x02\x02\ + \x05\x01\x12\x03Y\x18$\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03Y'(\n-\n\ + \x02\x04\x03\x12\x04]\0d\x01\x1a!\x20Configuration\x20for\x20DNS\x20regi\ + strar\n\n\n\n\x03\x04\x03\x01\x12\x03]\x08\x12\n\x0b\n\x04\x04\x03\x02\0\ + \x12\x03^\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03^\x04\x0c\n\x0c\n\ + \x05\x04\x03\x02\0\x06\x12\x03^\r\x19\n\x0c\n\x05\x04\x03\x02\0\x01\x12\ + \x03^\x1a(\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03^+,\n\x0b\n\x04\x04\x03\ + \x02\x01\x12\x03_\x04\x1f\n\x0c\n\x05\x04\x03\x02\x01\x04\x12\x03_\x04\ + \x0c\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03_\r\x13\n\x0c\n\x05\x04\x03\ + \x02\x01\x01\x12\x03_\x14\x1a\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03_\ + \x1d\x1e\n\x0b\n\x04\x04\x03\x02\x02\x12\x03`\x04\x1f\n\x0c\n\x05\x04\ + \x03\x02\x02\x04\x12\x03`\x04\x0c\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\ + \x03`\r\x13\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03`\x14\x1a\n\x0c\n\x05\ + \x04\x03\x02\x02\x03\x12\x03`\x1d\x1e\n\x0b\n\x04\x04\x03\x02\x03\x12\ + \x03a\x04\x1e\n\x0c\n\x05\x04\x03\x02\x03\x04\x12\x03a\x04\x0c\n\x0c\n\ + \x05\x04\x03\x02\x03\x05\x12\x03a\r\x12\n\x0c\n\x05\x04\x03\x02\x03\x01\ + \x12\x03a\x13\x19\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x03a\x1c\x1d\n\x0b\ + \n\x04\x04\x03\x02\x04\x12\x03b\x04*\n\x0c\n\x05\x04\x03\x02\x04\x04\x12\ + \x03b\x04\x0c\n\x0c\n\x05\x04\x03\x02\x04\x05\x12\x03b\r\x13\n\x0c\n\x05\ + \x04\x03\x02\x04\x01\x12\x03b\x14%\n\x0c\n\x05\x04\x03\x02\x04\x03\x12\ + \x03b()\n\x0b\n\x04\x04\x03\x02\x05\x12\x03c\x04$\n\x0c\n\x05\x04\x03\ + \x02\x05\x04\x12\x03c\x04\x0c\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\x03c\r\ + \x13\n\x0c\n\x05\x04\x03\x02\x05\x01\x12\x03c\x14\x1f\n\x0c\n\x05\x04\ + \x03\x02\x05\x03\x12\x03c\"#\n\n\n\x02\x05\x01\x12\x04f\0j\x01\n\n\n\x03\ + \x05\x01\x01\x12\x03f\x05\x11\n\x0b\n\x04\x05\x01\x02\0\x12\x03g\x04\x0c\ + \n\x0c\n\x05\x05\x01\x02\0\x01\x12\x03g\x04\x07\n\x0c\n\x05\x05\x01\x02\ + \0\x02\x12\x03g\n\x0b\n\x0b\n\x04\x05\x01\x02\x01\x12\x03h\x04\x0c\n\x0c\ + \n\x05\x05\x01\x02\x01\x01\x12\x03h\x04\x07\n\x0c\n\x05\x05\x01\x02\x01\ + \x02\x12\x03h\n\x0b\n\x0b\n\x04\x05\x01\x02\x02\x12\x03i\x04\x0c\n\x0c\n\ + \x05\x05\x01\x02\x02\x01\x12\x03i\x04\x07\n\x0c\n\x05\x05\x01\x02\x02\ + \x02\x12\x03i\n\x0b\n\n\n\x02\x04\x04\x12\x04l\0n\x01\n\n\n\x03\x04\x04\ + \x01\x12\x03l\x08\x11\n\x0b\n\x04\x04\x04\x02\0\x12\x03m\x04)\n\x0c\n\ + \x05\x04\x04\x02\0\x04\x12\x03m\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x06\ + \x12\x03m\r\x19\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03m\x1a$\n\x0c\n\x05\ + \x04\x04\x02\0\x03\x12\x03m'(\n\n\n\x02\x04\x05\x12\x04p\0r\x01\n\n\n\ + \x03\x04\x05\x01\x12\x03p\x08\x1a\n\x0b\n\x04\x04\x05\x02\0\x12\x03q\x04\ + 1\n\x0c\n\x05\x04\x05\x02\0\x04\x12\x03q\x04\x0c\n\x0c\n\x05\x04\x05\x02\ + \0\x06\x12\x03q\r\x1b\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03q\x1c,\n\x0c\ + \n\x05\x04\x05\x02\0\x03\x12\x03q/0\n\n\n\x02\x04\x06\x12\x04t\0w\x01\n\ + \n\n\x03\x04\x06\x01\x12\x03t\x08\x16\n\x0b\n\x04\x04\x06\x02\0\x12\x03u\ + \x04\x1f\n\x0c\n\x05\x04\x06\x02\0\x04\x12\x03u\x04\x0c\n\x0c\n\x05\x04\ + \x06\x02\0\x05\x12\x03u\r\x13\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03u\x14\ + \x1a\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03u\x1d\x1e\n\x0b\n\x04\x04\x06\ + \x02\x01\x12\x03v\x04\x20\n\x0c\n\x05\x04\x06\x02\x01\x04\x12\x03v\x04\ + \x0c\n\x0c\n\x05\x04\x06\x02\x01\x05\x12\x03v\r\x13\n\x0c\n\x05\x04\x06\ + \x02\x01\x01\x12\x03v\x14\x1b\n\x0c\n\x05\x04\x06\x02\x01\x03\x12\x03v\ + \x1e\x1f\n.\n\x02\x05\x02\x12\x05z\0\x84\x01\x01\x1a!\x20State\x20transi\ + tions\x20of\x20the\x20client\n\n\n\n\x03\x05\x02\x01\x12\x03z\x05\x13\n\ + \x0b\n\x04\x05\x02\x02\0\x12\x03{\x04\x16\n\x0c\n\x05\x05\x02\x02\0\x01\ + \x12\x03{\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\x03{\x14\x15\n\"\n\ + \x04\x05\x02\x02\x01\x12\x03|\x04\x19\"\x15\x20connect\x20me\x20to\x20sq\ + uid\n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03|\x04\x14\n\x0c\n\x05\x05\ + \x02\x02\x01\x02\x12\x03|\x17\x18\n,\n\x04\x05\x02\x02\x02\x12\x03}\x04!\ \"\x1f\x20connect\x20me\x20to\x20provided\x20covert\n\n\x0c\n\x05\x05\ - \x02\x02\x02\x01\x12\x03~\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\x12\ - \x03~\x1e\x20\n\x0b\n\x04\x05\x02\x02\x03\x12\x03\x7f\x04\x1d\n\x0c\n\ - \x05\x05\x02\x02\x03\x01\x12\x03\x7f\x04\x18\n\x0c\n\x05\x05\x02\x02\x03\ - \x02\x12\x03\x7f\x1b\x1c\n\x0c\n\x04\x05\x02\x02\x04\x12\x04\x80\x01\x04\ - \x1a\n\r\n\x05\x05\x02\x02\x04\x01\x12\x04\x80\x01\x04\x15\n\r\n\x05\x05\ - \x02\x02\x04\x02\x12\x04\x80\x01\x18\x19\n\x0c\n\x04\x05\x02\x02\x05\x12\ - \x04\x81\x01\x04\x19\n\r\n\x05\x05\x02\x02\x05\x01\x12\x04\x81\x01\x04\ - \x14\n\r\n\x05\x05\x02\x02\x05\x02\x12\x04\x81\x01\x17\x18\n\x0c\n\x04\ - \x05\x02\x02\x06\x12\x04\x82\x01\x04\x1b\n\r\n\x05\x05\x02\x02\x06\x01\ - \x12\x04\x82\x01\x04\x16\n\r\n\x05\x05\x02\x02\x06\x02\x12\x04\x82\x01\ - \x19\x1a\n\x0c\n\x04\x05\x02\x02\x07\x12\x04\x83\x01\x04%\n\r\n\x05\x05\ - \x02\x02\x07\x01\x12\x04\x83\x01\x04\x20\n\r\n\x05\x05\x02\x02\x07\x02\ - \x12\x04\x83\x01#$\n\x0c\n\x04\x05\x02\x02\x08\x12\x04\x84\x01\x04\x14\n\ - \r\n\x05\x05\x02\x02\x08\x01\x12\x04\x84\x01\x04\r\n\r\n\x05\x05\x02\x02\ - \x08\x02\x12\x04\x84\x01\x10\x13\n/\n\x02\x05\x03\x12\x06\x88\x01\0\x90\ - \x01\x01\x1a!\x20State\x20transitions\x20of\x20the\x20server\n\n\x0b\n\ - \x03\x05\x03\x01\x12\x04\x88\x01\x05\x13\n\x0c\n\x04\x05\x03\x02\0\x12\ - \x04\x89\x01\x04\x16\n\r\n\x05\x05\x03\x02\0\x01\x12\x04\x89\x01\x04\x11\ - \n\r\n\x05\x05\x03\x02\0\x02\x12\x04\x89\x01\x14\x15\n\"\n\x04\x05\x03\ - \x02\x01\x12\x04\x8a\x01\x04\x19\"\x14\x20connected\x20to\x20squid\n\n\r\ - \n\x05\x05\x03\x02\x01\x01\x12\x04\x8a\x01\x04\x14\n\r\n\x05\x05\x03\x02\ - \x01\x02\x12\x04\x8a\x01\x17\x18\n(\n\x04\x05\x03\x02\x02\x12\x04\x8b\ - \x01\x04!\"\x1a\x20connected\x20to\x20covert\x20host\n\n\r\n\x05\x05\x03\ - \x02\x02\x01\x12\x04\x8b\x01\x04\x1b\n\r\n\x05\x05\x03\x02\x02\x02\x12\ - \x04\x8b\x01\x1e\x20\n\x0c\n\x04\x05\x03\x02\x03\x12\x04\x8c\x01\x04\x1e\ - \n\r\n\x05\x05\x03\x02\x03\x01\x12\x04\x8c\x01\x04\x19\n\r\n\x05\x05\x03\ - \x02\x03\x02\x12\x04\x8c\x01\x1c\x1d\n\x0c\n\x04\x05\x03\x02\x04\x12\x04\ - \x8d\x01\x04\x1a\n\r\n\x05\x05\x03\x02\x04\x01\x12\x04\x8d\x01\x04\x15\n\ - \r\n\x05\x05\x03\x02\x04\x02\x12\x04\x8d\x01\x18\x19\nS\n\x04\x05\x03\ - \x02\x05\x12\x04\x8f\x01\x04\x14\x1aE\x20TODO\x20should\x20probably\x20a\ - lso\x20allow\x20EXPECT_RECONNECT\x20here,\x20for\x20DittoTap\n\n\r\n\x05\ - \x05\x03\x02\x05\x01\x12\x04\x8f\x01\x04\r\n\r\n\x05\x05\x03\x02\x05\x02\ - \x12\x04\x8f\x01\x10\x13\n8\n\x02\x05\x04\x12\x06\x93\x01\0\x9d\x01\x01\ - \x1a*\x20Should\x20accompany\x20all\x20S2C_ERROR\x20messages.\n\n\x0b\n\ - \x03\x05\x04\x01\x12\x04\x93\x01\x05\x13\n\x0c\n\x04\x05\x04\x02\0\x12\ - \x04\x94\x01\x04\x11\n\r\n\x05\x05\x04\x02\0\x01\x12\x04\x94\x01\x04\x0c\ - \n\r\n\x05\x05\x04\x02\0\x02\x12\x04\x94\x01\x0f\x10\n*\n\x04\x05\x04\ - \x02\x01\x12\x04\x95\x01\x04\x16\"\x1c\x20Squid\x20TCP\x20connection\x20\ - broke\n\n\r\n\x05\x05\x04\x02\x01\x01\x12\x04\x95\x01\x04\x11\n\r\n\x05\ - \x05\x04\x02\x01\x02\x12\x04\x95\x01\x14\x15\n7\n\x04\x05\x04\x02\x02\ - \x12\x04\x96\x01\x04\x18\")\x20You\x20told\x20me\x20something\x20was\x20\ - wrong,\x20client\n\n\r\n\x05\x05\x04\x02\x02\x01\x12\x04\x96\x01\x04\x13\ - \n\r\n\x05\x05\x04\x02\x02\x02\x12\x04\x96\x01\x16\x17\n@\n\x04\x05\x04\ - \x02\x03\x12\x04\x97\x01\x04\x18\"2\x20You\x20messed\x20up,\x20client\ - \x20(e.g.\x20sent\x20a\x20bad\x20protobuf)\n\n\r\n\x05\x05\x04\x02\x03\ - \x01\x12\x04\x97\x01\x04\x13\n\r\n\x05\x05\x04\x02\x03\x02\x12\x04\x97\ - \x01\x16\x17\n\x17\n\x04\x05\x04\x02\x04\x12\x04\x98\x01\x04\x19\"\t\x20\ - I\x20broke\n\n\r\n\x05\x05\x04\x02\x04\x01\x12\x04\x98\x01\x04\x14\n\r\n\ - \x05\x05\x04\x02\x04\x02\x12\x04\x98\x01\x17\x18\nE\n\x04\x05\x04\x02\ - \x05\x12\x04\x99\x01\x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\ - \x20use\x20this\x20decoy\x20right\x20now\n\n\r\n\x05\x05\x04\x02\x05\x01\ - \x12\x04\x99\x01\x04\x12\n\r\n\x05\x05\x04\x02\x05\x02\x12\x04\x99\x01\ - \x15\x16\nD\n\x04\x05\x04\x02\x06\x12\x04\x9b\x01\x04\x18\"6\x20My\x20st\ - ream\x20to\x20you\x20broke.\x20(This\x20is\x20impossible\x20to\x20send)\ - \n\n\r\n\x05\x05\x04\x02\x06\x01\x12\x04\x9b\x01\x04\x11\n\r\n\x05\x05\ - \x04\x02\x06\x02\x12\x04\x9b\x01\x14\x17\nA\n\x04\x05\x04\x02\x07\x12\ - \x04\x9c\x01\x04\x19\"3\x20You\x20never\x20came\x20back.\x20(This\x20is\ - \x20impossible\x20to\x20send)\n\n\r\n\x05\x05\x04\x02\x07\x01\x12\x04\ - \x9c\x01\x04\x12\n\r\n\x05\x05\x04\x02\x07\x02\x12\x04\x9c\x01\x15\x18\n\ - \x0c\n\x02\x05\x05\x12\x06\x9f\x01\0\xa4\x01\x01\n\x0b\n\x03\x05\x05\x01\ - \x12\x04\x9f\x01\x05\x12\n\x0c\n\x04\x05\x05\x02\0\x12\x04\xa0\x01\x04\r\ - \n\r\n\x05\x05\x05\x02\0\x01\x12\x04\xa0\x01\x04\x08\n\r\n\x05\x05\x05\ - \x02\0\x02\x12\x04\xa0\x01\x0b\x0c\n`\n\x04\x05\x05\x02\x01\x12\x04\xa1\ - \x01\x04\x0c\"R\x20Send\x20a\x2032-byte\x20HMAC\x20id\x20to\x20let\x20th\ - e\x20station\x20distinguish\x20registrations\x20to\x20same\x20host\n\n\r\ - \n\x05\x05\x05\x02\x01\x01\x12\x04\xa1\x01\x04\x07\n\r\n\x05\x05\x05\x02\ - \x01\x02\x12\x04\xa1\x01\n\x0b\n$\n\x04\x05\x05\x02\x02\x12\x04\xa2\x01\ - \x04\x0e\"\x16\x20Not\x20implemented\x20yet?\n\n\r\n\x05\x05\x05\x02\x02\ - \x01\x12\x04\xa2\x01\x04\t\n\r\n\x05\x05\x05\x02\x02\x02\x12\x04\xa2\x01\ - \x0c\r\n1\n\x04\x05\x05\x02\x03\x12\x04\xa3\x01\x04\x10\"#\x20UDP\x20tra\ - nsport:\x20WebRTC\x20DataChannel\n\n\r\n\x05\x05\x05\x02\x03\x01\x12\x04\ - \xa3\x01\x04\n\n\r\n\x05\x05\x05\x02\x03\x02\x12\x04\xa3\x01\r\x0f\n:\n\ - \x02\x04\x07\x12\x06\xa7\x01\0\xad\x01\x01\x1a,\x20Deflated\x20ICE\x20Ca\ - ndidate\x20by\x20seed2sdp\x20package\n\n\x0b\n\x03\x04\x07\x01\x12\x04\ - \xa7\x01\x08\x1a\n5\n\x04\x04\x07\x02\0\x12\x04\xa9\x01\x04!\x1a'\x20IP\ - \x20is\x20represented\x20in\x20its\x2016-byte\x20form\n\n\r\n\x05\x04\ - \x07\x02\0\x04\x12\x04\xa9\x01\x04\x0c\n\r\n\x05\x04\x07\x02\0\x05\x12\ - \x04\xa9\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xa9\x01\x14\x1c\n\ - \r\n\x05\x04\x07\x02\0\x03\x12\x04\xa9\x01\x1f\x20\n\x0c\n\x04\x04\x07\ - \x02\x01\x12\x04\xaa\x01\x04!\n\r\n\x05\x04\x07\x02\x01\x04\x12\x04\xaa\ - \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x01\x05\x12\x04\xaa\x01\r\x13\n\r\n\ - \x05\x04\x07\x02\x01\x01\x12\x04\xaa\x01\x14\x1c\n\r\n\x05\x04\x07\x02\ - \x01\x03\x12\x04\xaa\x01\x1f\x20\n\x9b\x01\n\x04\x04\x07\x02\x02\x12\x04\ - \xac\x01\x04&\x1a\x8c\x01\x20Composed\x20info\x20includes\x20port,\x20tc\ - ptype\x20(unset\x20if\x20not\x20tcp),\x20candidate\x20type\x20(host,\x20\ - srflx,\x20prflx),\x20protocol\x20(TCP/UDP),\x20and\x20component\x20(RTP/\ - RTCP)\n\n\r\n\x05\x04\x07\x02\x02\x04\x12\x04\xac\x01\x04\x0c\n\r\n\x05\ - \x04\x07\x02\x02\x05\x12\x04\xac\x01\r\x13\n\r\n\x05\x04\x07\x02\x02\x01\ - \x12\x04\xac\x01\x14!\n\r\n\x05\x04\x07\x02\x02\x03\x12\x04\xac\x01$%\n;\ - \n\x02\x04\x08\x12\x06\xb0\x01\0\xb3\x01\x01\x1a-\x20Deflated\x20SDP\x20\ - for\x20WebRTC\x20by\x20seed2sdp\x20package\n\n\x0b\n\x03\x04\x08\x01\x12\ - \x04\xb0\x01\x08\x11\n\x0c\n\x04\x04\x08\x02\0\x12\x04\xb1\x01\x04\x1d\n\ - \r\n\x05\x04\x08\x02\0\x04\x12\x04\xb1\x01\x04\x0c\n\r\n\x05\x04\x08\x02\ - \0\x05\x12\x04\xb1\x01\r\x13\n\r\n\x05\x04\x08\x02\0\x01\x12\x04\xb1\x01\ - \x14\x18\n\r\n\x05\x04\x08\x02\0\x03\x12\x04\xb1\x01\x1b\x1c\n2\n\x04\ - \x04\x08\x02\x01\x12\x04\xb2\x01\x04/\"$\x20there\x20could\x20be\x20mult\ - iple\x20candidates\n\n\r\n\x05\x04\x08\x02\x01\x04\x12\x04\xb2\x01\x04\ - \x0c\n\r\n\x05\x04\x08\x02\x01\x06\x12\x04\xb2\x01\r\x1f\n\r\n\x05\x04\ - \x08\x02\x01\x01\x12\x04\xb2\x01\x20*\n\r\n\x05\x04\x08\x02\x01\x03\x12\ - \x04\xb2\x01-.\n?\n\x02\x04\t\x12\x06\xb6\x01\0\xb9\x01\x01\x1a1\x20WebR\ - TCSignal\x20includes\x20a\x20deflated\x20SDP\x20and\x20a\x20seed\n\n\x0b\ - \n\x03\x04\t\x01\x12\x04\xb6\x01\x08\x14\n\x0c\n\x04\x04\t\x02\0\x12\x04\ - \xb7\x01\x04\x1d\n\r\n\x05\x04\t\x02\0\x04\x12\x04\xb7\x01\x04\x0c\n\r\n\ - \x05\x04\t\x02\0\x05\x12\x04\xb7\x01\r\x13\n\r\n\x05\x04\t\x02\0\x01\x12\ - \x04\xb7\x01\x14\x18\n\r\n\x05\x04\t\x02\0\x03\x12\x04\xb7\x01\x1b\x1c\n\ - \x0c\n\x04\x04\t\x02\x01\x12\x04\xb8\x01\x04\x1f\n\r\n\x05\x04\t\x02\x01\ - \x04\x12\x04\xb8\x01\x04\x0c\n\r\n\x05\x04\t\x02\x01\x06\x12\x04\xb8\x01\ - \r\x16\n\r\n\x05\x04\t\x02\x01\x01\x12\x04\xb8\x01\x17\x1a\n\r\n\x05\x04\ - \t\x02\x01\x03\x12\x04\xb8\x01\x1d\x1e\n\x0c\n\x02\x04\n\x12\x06\xbb\x01\ - \0\xd2\x01\x01\n\x0b\n\x03\x04\n\x01\x12\x04\xbb\x01\x08\x17\nO\n\x04\ - \x04\n\x02\0\x12\x04\xbd\x01\x04)\x1aA\x20Should\x20accompany\x20(at\x20\ - least)\x20SESSION_INIT\x20and\x20CONFIRM_RECONNECT.\n\n\r\n\x05\x04\n\ - \x02\0\x04\x12\x04\xbd\x01\x04\x0c\n\r\n\x05\x04\n\x02\0\x05\x12\x04\xbd\ - \x01\r\x13\n\r\n\x05\x04\n\x02\0\x01\x12\x04\xbd\x01\x14$\n\r\n\x05\x04\ - \n\x02\0\x03\x12\x04\xbd\x01'(\nv\n\x04\x04\n\x02\x01\x12\x04\xc1\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\n\x02\x01\x04\x12\x04\xc1\x01\x04\ - \x0c\n\r\n\x05\x04\n\x02\x01\x06\x12\x04\xc1\x01\r\x1b\n\r\n\x05\x04\n\ - \x02\x01\x01\x12\x04\xc1\x01\x1c,\n\r\n\x05\x04\n\x02\x01\x03\x12\x04\ - \xc1\x01/0\nc\n\x04\x04\n\x02\x02\x12\x04\xc5\x01\x04(\x1aU\x20The\x20st\ - ation\x20can\x20send\x20client\x20config\x20info\x20piggybacked\n\x20on\ - \x20any\x20message,\x20as\x20it\x20sees\x20fit\n\n\r\n\x05\x04\n\x02\x02\ - \x04\x12\x04\xc5\x01\x04\x0c\n\r\n\x05\x04\n\x02\x02\x06\x12\x04\xc5\x01\ - \r\x17\n\r\n\x05\x04\n\x02\x02\x01\x12\x04\xc5\x01\x18#\n\r\n\x05\x04\n\ - \x02\x02\x03\x12\x04\xc5\x01&'\nP\n\x04\x04\n\x02\x03\x12\x04\xc8\x01\ - \x04+\x1aB\x20If\x20state_transition\x20==\x20S2C_ERROR,\x20this\x20fiel\ - d\x20is\x20the\x20explanation.\n\n\r\n\x05\x04\n\x02\x03\x04\x12\x04\xc8\ - \x01\x04\x0c\n\r\n\x05\x04\n\x02\x03\x06\x12\x04\xc8\x01\r\x1b\n\r\n\x05\ - \x04\n\x02\x03\x01\x12\x04\xc8\x01\x1c&\n\r\n\x05\x04\n\x02\x03\x03\x12\ - \x04\xc8\x01)*\nQ\n\x04\x04\n\x02\x04\x12\x04\xcb\x01\x04$\x1aC\x20Signa\ - ls\x20client\x20to\x20stop\x20connecting\x20for\x20following\x20amount\ - \x20of\x20seconds\n\n\r\n\x05\x04\n\x02\x04\x04\x12\x04\xcb\x01\x04\x0c\ - \n\r\n\x05\x04\n\x02\x04\x05\x12\x04\xcb\x01\r\x13\n\r\n\x05\x04\n\x02\ - \x04\x01\x12\x04\xcb\x01\x14\x1f\n\r\n\x05\x04\n\x02\x04\x03\x12\x04\xcb\ - \x01\"#\nK\n\x04\x04\n\x02\x05\x12\x04\xce\x01\x04#\x1a=\x20Sent\x20in\ - \x20SESSION_INIT,\x20identifies\x20the\x20station\x20that\x20picked\x20u\ - p\n\n\r\n\x05\x04\n\x02\x05\x04\x12\x04\xce\x01\x04\x0c\n\r\n\x05\x04\n\ - \x02\x05\x05\x12\x04\xce\x01\r\x13\n\r\n\x05\x04\n\x02\x05\x01\x12\x04\ - \xce\x01\x14\x1e\n\r\n\x05\x04\n\x02\x05\x03\x12\x04\xce\x01!\"\nG\n\x04\ - \x04\n\x02\x06\x12\x04\xd1\x01\x04!\x1a9\x20Random-sized\x20junk\x20to\ - \x20defeat\x20packet\x20size\x20fingerprinting.\n\n\r\n\x05\x04\n\x02\ - \x06\x04\x12\x04\xd1\x01\x04\x0c\n\r\n\x05\x04\n\x02\x06\x05\x12\x04\xd1\ - \x01\r\x12\n\r\n\x05\x04\n\x02\x06\x01\x12\x04\xd1\x01\x13\x1a\n\r\n\x05\ - \x04\n\x02\x06\x03\x12\x04\xd1\x01\x1d\x20\n\x0c\n\x02\x04\x0b\x12\x06\ - \xd4\x01\0\xda\x01\x01\n\x0b\n\x03\x04\x0b\x01\x12\x04\xd4\x01\x08\x19\n\ - \x0c\n\x04\x04\x0b\x02\0\x12\x04\xd5\x01\x08&\n\r\n\x05\x04\x0b\x02\0\ - \x04\x12\x04\xd5\x01\x08\x10\n\r\n\x05\x04\x0b\x02\0\x05\x12\x04\xd5\x01\ - \x11\x15\n\r\n\x05\x04\x0b\x02\0\x01\x12\x04\xd5\x01\x16!\n\r\n\x05\x04\ - \x0b\x02\0\x03\x12\x04\xd5\x01$%\n\x0c\n\x04\x04\x0b\x02\x01\x12\x04\xd6\ - \x01\x08%\n\r\n\x05\x04\x0b\x02\x01\x04\x12\x04\xd6\x01\x08\x10\n\r\n\ - \x05\x04\x0b\x02\x01\x05\x12\x04\xd6\x01\x11\x15\n\r\n\x05\x04\x0b\x02\ - \x01\x01\x12\x04\xd6\x01\x16\x20\n\r\n\x05\x04\x0b\x02\x01\x03\x12\x04\ - \xd6\x01#$\n\x0c\n\x04\x04\x0b\x02\x02\x12\x04\xd7\x01\x08'\n\r\n\x05\ - \x04\x0b\x02\x02\x04\x12\x04\xd7\x01\x08\x10\n\r\n\x05\x04\x0b\x02\x02\ - \x05\x12\x04\xd7\x01\x11\x15\n\r\n\x05\x04\x0b\x02\x02\x01\x12\x04\xd7\ - \x01\x16\"\n\r\n\x05\x04\x0b\x02\x02\x03\x12\x04\xd7\x01%&\n\x0c\n\x04\ - \x04\x0b\x02\x03\x12\x04\xd8\x01\x04\x1e\n\r\n\x05\x04\x0b\x02\x03\x04\ - \x12\x04\xd8\x01\x04\x0c\n\r\n\x05\x04\x0b\x02\x03\x05\x12\x04\xd8\x01\r\ - \x11\n\r\n\x05\x04\x0b\x02\x03\x01\x12\x04\xd8\x01\x12\x19\n\r\n\x05\x04\ - \x0b\x02\x03\x03\x12\x04\xd8\x01\x1c\x1d\n\x0c\n\x04\x04\x0b\x02\x04\x12\ - \x04\xd9\x01\x04!\n\r\n\x05\x04\x0b\x02\x04\x04\x12\x04\xd9\x01\x04\x0c\ - \n\r\n\x05\x04\x0b\x02\x04\x05\x12\x04\xd9\x01\r\x11\n\r\n\x05\x04\x0b\ - \x02\x04\x01\x12\x04\xd9\x01\x12\x1c\n\r\n\x05\x04\x0b\x02\x04\x03\x12\ - \x04\xd9\x01\x1f\x20\n\x0c\n\x02\x04\x0c\x12\x06\xdc\x01\0\x91\x02\x01\n\ - \x0b\n\x03\x04\x0c\x01\x12\x04\xdc\x01\x08\x17\n\x0c\n\x04\x04\x0c\x02\0\ - \x12\x04\xdd\x01\x04)\n\r\n\x05\x04\x0c\x02\0\x04\x12\x04\xdd\x01\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\0\x05\x12\x04\xdd\x01\r\x13\n\r\n\x05\x04\x0c\ - \x02\0\x01\x12\x04\xdd\x01\x14$\n\r\n\x05\x04\x0c\x02\0\x03\x12\x04\xdd\ - \x01'(\n\xd0\x01\n\x04\x04\x0c\x02\x01\x12\x04\xe2\x01\x04.\x1a\xc1\x01\ - \x20The\x20client\x20reports\x20its\x20decoy\x20list's\x20version\x20num\ - ber\x20here,\x20which\x20the\n\x20station\x20can\x20use\x20to\x20decide\ - \x20whether\x20to\x20send\x20an\x20updated\x20one.\x20The\x20station\n\ - \x20should\x20always\x20send\x20a\x20list\x20if\x20this\x20field\x20is\ - \x20set\x20to\x200.\n\n\r\n\x05\x04\x0c\x02\x01\x04\x12\x04\xe2\x01\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\x01\x05\x12\x04\xe2\x01\r\x13\n\r\n\x05\x04\ - \x0c\x02\x01\x01\x12\x04\xe2\x01\x14)\n\r\n\x05\x04\x0c\x02\x01\x03\x12\ - \x04\xe2\x01,-\n\x0c\n\x04\x04\x0c\x02\x02\x12\x04\xe4\x01\x041\n\r\n\ - \x05\x04\x0c\x02\x02\x04\x12\x04\xe4\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\ - \x02\x06\x12\x04\xe4\x01\r\x1b\n\r\n\x05\x04\x0c\x02\x02\x01\x12\x04\xe4\ - \x01\x1c,\n\r\n\x05\x04\x0c\x02\x02\x03\x12\x04\xe4\x01/0\n\x80\x01\n\ - \x04\x04\x0c\x02\x03\x12\x04\xe8\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\x0c\x02\x03\x04\x12\x04\xe8\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\ - \x03\x05\x12\x04\xe8\x01\r\x13\n\r\n\x05\x04\x0c\x02\x03\x01\x12\x04\xe8\ - \x01\x14\x1f\n\r\n\x05\x04\x0c\x02\x03\x03\x12\x04\xe8\x01\"#\ng\n\x04\ - \x04\x0c\x02\x04\x12\x04\xec\x01\x04+\x1aY\x20High\x20level\x20client\ - \x20library\x20version\x20used\x20for\x20indicating\x20feature\x20suppor\ - t,\x20or\n\x20lack\x20therof.\n\n\r\n\x05\x04\x0c\x02\x04\x04\x12\x04\ - \xec\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x04\x05\x12\x04\xec\x01\r\x13\n\r\ - \n\x05\x04\x0c\x02\x04\x01\x12\x04\xec\x01\x14&\n\r\n\x05\x04\x0c\x02\ - \x04\x03\x12\x04\xec\x01)*\nq\n\x04\x04\x0c\x02\x05\x12\x04\xf0\x01\x04'\ - \x1ac\x20List\x20of\x20decoys\x20that\x20client\x20have\x20unsuccessfull\ - y\x20tried\x20in\x20current\x20session.\n\x20Could\x20be\x20sent\x20in\ - \x20chunks\n\n\r\n\x05\x04\x0c\x02\x05\x04\x12\x04\xf0\x01\x04\x0c\n\r\n\ - \x05\x04\x0c\x02\x05\x05\x12\x04\xf0\x01\r\x13\n\r\n\x05\x04\x0c\x02\x05\ - \x01\x12\x04\xf0\x01\x14!\n\r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf0\x01$\ - &\n\x0c\n\x04\x04\x0c\x02\x06\x12\x04\xf2\x01\x04%\n\r\n\x05\x04\x0c\x02\ - \x06\x04\x12\x04\xf2\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x06\x06\x12\x04\ - \xf2\x01\r\x19\n\r\n\x05\x04\x0c\x02\x06\x01\x12\x04\xf2\x01\x1a\x1f\n\r\ - \n\x05\x04\x0c\x02\x06\x03\x12\x04\xf2\x01\"$\nk\n\x04\x04\x0c\x02\x07\ - \x12\x04\xf5\x01\x04*\x1a]\x20NullTransport,\x20MinTransport,\x20Obfs4Tr\ - ansport,\x20etc.\x20Transport\x20type\x20we\x20want\x20from\x20phantom\ - \x20proxy\n\n\r\n\x05\x04\x0c\x02\x07\x04\x12\x04\xf5\x01\x04\x0c\n\r\n\ - \x05\x04\x0c\x02\x07\x06\x12\x04\xf5\x01\r\x1a\n\r\n\x05\x04\x0c\x02\x07\ - \x01\x12\x04\xf5\x01\x1b$\n\r\n\x05\x04\x0c\x02\x07\x03\x12\x04\xf5\x01'\ - )\n\x0c\n\x04\x04\x0c\x02\x08\x12\x04\xf7\x01\x047\n\r\n\x05\x04\x0c\x02\ - \x08\x04\x12\x04\xf7\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x08\x06\x12\x04\ - \xf7\x01\r\x20\n\r\n\x05\x04\x0c\x02\x08\x01\x12\x04\xf7\x01!1\n\r\n\x05\ - \x04\x0c\x02\x08\x03\x12\x04\xf7\x0146\n\xc8\x03\n\x04\x04\x0c\x02\t\x12\ - \x04\xff\x01\x04(\x1a\xb9\x03\x20Station\x20is\x20only\x20required\x20to\ - \x20check\x20this\x20variable\x20during\x20session\x20initialization.\n\ - \x20If\x20set,\x20station\x20must\x20facilitate\x20connection\x20to\x20s\ - aid\x20target\x20by\x20itself,\x20i.e.\x20write\x20into\x20squid\n\x20so\ - cket\x20an\x20HTTP/SOCKS/any\x20other\x20connection\x20request.\n\x20cov\ - ert_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\x20str\ - aight\x20to\x20squid?\n\n\r\n\x05\x04\x0c\x02\t\x04\x12\x04\xff\x01\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\t\x05\x12\x04\xff\x01\r\x13\n\r\n\x05\x04\x0c\ - \x02\t\x01\x12\x04\xff\x01\x14\"\n\r\n\x05\x04\x0c\x02\t\x03\x12\x04\xff\ - \x01%'\nR\n\x04\x04\x0c\x02\n\x12\x04\x82\x02\x042\x1aD\x20Used\x20in\ - \x20dark\x20decoys\x20to\x20signal\x20which\x20dark\x20decoy\x20it\x20wi\ - ll\x20connect\x20to.\n\n\r\n\x05\x04\x0c\x02\n\x04\x12\x04\x82\x02\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\n\x05\x12\x04\x82\x02\r\x13\n\r\n\x05\x04\x0c\ - \x02\n\x01\x12\x04\x82\x02\x14,\n\r\n\x05\x04\x0c\x02\n\x03\x12\x04\x82\ - \x02/1\nR\n\x04\x04\x0c\x02\x0b\x12\x04\x85\x02\x04\"\x1aD\x20Used\x20to\ - \x20indicate\x20to\x20server\x20if\x20client\x20is\x20registering\x20v4,\ - \x20v6\x20or\x20both\n\n\r\n\x05\x04\x0c\x02\x0b\x04\x12\x04\x85\x02\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\x0b\x05\x12\x04\x85\x02\r\x11\n\r\n\x05\x04\ - \x0c\x02\x0b\x01\x12\x04\x85\x02\x12\x1c\n\r\n\x05\x04\x0c\x02\x0b\x03\ - \x12\x04\x85\x02\x1f!\n\x0c\n\x04\x04\x0c\x02\x0c\x12\x04\x86\x02\x04\"\ - \n\r\n\x05\x04\x0c\x02\x0c\x04\x12\x04\x86\x02\x04\x0c\n\r\n\x05\x04\x0c\ - \x02\x0c\x05\x12\x04\x86\x02\r\x11\n\r\n\x05\x04\x0c\x02\x0c\x01\x12\x04\ - \x86\x02\x12\x1c\n\r\n\x05\x04\x0c\x02\x0c\x03\x12\x04\x86\x02\x1f!\nD\n\ - \x04\x04\x0c\x02\r\x12\x04\x89\x02\x04*\x1a6\x20A\x20collection\x20of\ - \x20optional\x20flags\x20for\x20the\x20registration.\n\n\r\n\x05\x04\x0c\ - \x02\r\x04\x12\x04\x89\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\r\x06\x12\x04\ - \x89\x02\r\x1e\n\r\n\x05\x04\x0c\x02\r\x01\x12\x04\x89\x02\x1f$\n\r\n\ - \x05\x04\x0c\x02\r\x03\x12\x04\x89\x02')\nq\n\x04\x04\x0c\x02\x0e\x12\ - \x04\x8d\x02\x04-\x1ac\x20Transport\x20Extensions\n\x20TODO(jmwample)\ - \x20-\x20move\x20to\x20WebRTC\x20specific\x20transport\x20params\x20prot\ - obuf\x20message.\n\n\r\n\x05\x04\x0c\x02\x0e\x04\x12\x04\x8d\x02\x04\x0c\ - \n\r\n\x05\x04\x0c\x02\x0e\x06\x12\x04\x8d\x02\r\x19\n\r\n\x05\x04\x0c\ - \x02\x0e\x01\x12\x04\x8d\x02\x1a'\n\r\n\x05\x04\x0c\x02\x0e\x03\x12\x04\ - \x8d\x02*,\nG\n\x04\x04\x0c\x02\x0f\x12\x04\x90\x02\x04!\x1a9\x20Random-\ - sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprinting.\n\n\r\ - \n\x05\x04\x0c\x02\x0f\x04\x12\x04\x90\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\ - \x0f\x05\x12\x04\x90\x02\r\x12\n\r\n\x05\x04\x0c\x02\x0f\x01\x12\x04\x90\ - \x02\x13\x1a\n\r\n\x05\x04\x0c\x02\x0f\x03\x12\x04\x90\x02\x1d\x20\n\x0c\ - \n\x02\x04\r\x12\x06\x93\x02\0\x98\x02\x01\n\x0b\n\x03\x04\r\x01\x12\x04\ - \x93\x02\x08\x1e\n\xcb\x01\n\x04\x04\r\x02\0\x12\x04\x97\x02\x04*\x1a\ - \xbc\x01\x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20t\ - o\x20use\x20destination\x20port\n\x20randomization.\x20Should\x20be\x20c\ - hecked\x20against\x20selected\x20transport\x20to\x20ensure\n\x20that\x20\ - destination\x20port\x20randomization\x20is\x20supported.\n\n\r\n\x05\x04\ - \r\x02\0\x04\x12\x04\x97\x02\x04\x0c\n\r\n\x05\x04\r\x02\0\x05\x12\x04\ - \x97\x02\r\x11\n\r\n\x05\x04\r\x02\0\x01\x12\x04\x97\x02\x12$\n\r\n\x05\ - \x04\r\x02\0\x03\x12\x04\x97\x02')\n\x0c\n\x02\x05\x06\x12\x06\x9a\x02\0\ - \xa2\x02\x01\n\x0b\n\x03\x05\x06\x01\x12\x04\x9a\x02\x05\x17\n\x0c\n\x04\ - \x05\x06\x02\0\x12\x04\x9b\x02\x02\x12\n\r\n\x05\x05\x06\x02\0\x01\x12\ - \x04\x9b\x02\x02\r\n\r\n\x05\x05\x06\x02\0\x02\x12\x04\x9b\x02\x10\x11\n\ - \x0c\n\x04\x05\x06\x02\x01\x12\x04\x9c\x02\x08\x15\n\r\n\x05\x05\x06\x02\ - \x01\x01\x12\x04\x9c\x02\x08\x10\n\r\n\x05\x05\x06\x02\x01\x02\x12\x04\ - \x9c\x02\x13\x14\n\x0c\n\x04\x05\x06\x02\x02\x12\x04\x9d\x02\x08\x10\n\r\ - \n\x05\x05\x06\x02\x02\x01\x12\x04\x9d\x02\x08\x0b\n\r\n\x05\x05\x06\x02\ - \x02\x02\x12\x04\x9d\x02\x0e\x0f\n\x0c\n\x04\x05\x06\x02\x03\x12\x04\x9e\ - \x02\x02\x16\n\r\n\x05\x05\x06\x02\x03\x01\x12\x04\x9e\x02\x02\x11\n\r\n\ - \x05\x05\x06\x02\x03\x02\x12\x04\x9e\x02\x14\x15\n\x0c\n\x04\x05\x06\x02\ - \x04\x12\x04\x9f\x02\x02\x17\n\r\n\x05\x05\x06\x02\x04\x01\x12\x04\x9f\ - \x02\x02\x12\n\r\n\x05\x05\x06\x02\x04\x02\x12\x04\x9f\x02\x15\x16\n\x0c\ - \n\x04\x05\x06\x02\x05\x12\x04\xa0\x02\x02\n\n\r\n\x05\x05\x06\x02\x05\ - \x01\x12\x04\xa0\x02\x02\x05\n\r\n\x05\x05\x06\x02\x05\x02\x12\x04\xa0\ - \x02\x08\t\n\x0c\n\x04\x05\x06\x02\x06\x12\x04\xa1\x02\x02\x17\n\r\n\x05\ - \x05\x06\x02\x06\x01\x12\x04\xa1\x02\x02\x12\n\r\n\x05\x05\x06\x02\x06\ - \x02\x12\x04\xa1\x02\x15\x16\n\x0c\n\x02\x04\x0e\x12\x06\xa4\x02\0\xb0\ - \x02\x01\n\x0b\n\x03\x04\x0e\x01\x12\x04\xa4\x02\x08\x12\n\x0c\n\x04\x04\ - \x0e\x02\0\x12\x04\xa5\x02\x02#\n\r\n\x05\x04\x0e\x02\0\x04\x12\x04\xa5\ - \x02\x02\n\n\r\n\x05\x04\x0e\x02\0\x05\x12\x04\xa5\x02\x0b\x10\n\r\n\x05\ - \x04\x0e\x02\0\x01\x12\x04\xa5\x02\x11\x1e\n\r\n\x05\x04\x0e\x02\0\x03\ - \x12\x04\xa5\x02!\"\n\x0c\n\x04\x04\x0e\x02\x01\x12\x04\xa6\x02\x024\n\r\ - \n\x05\x04\x0e\x02\x01\x04\x12\x04\xa6\x02\x02\n\n\r\n\x05\x04\x0e\x02\ - \x01\x06\x12\x04\xa6\x02\x0b\x1a\n\r\n\x05\x04\x0e\x02\x01\x01\x12\x04\ - \xa6\x02\x1b/\n\r\n\x05\x04\x0e\x02\x01\x03\x12\x04\xa6\x0223\n\x0c\n\ - \x04\x04\x0e\x02\x02\x12\x04\xa7\x02\x026\n\r\n\x05\x04\x0e\x02\x02\x04\ - \x12\x04\xa7\x02\x02\n\n\r\n\x05\x04\x0e\x02\x02\x06\x12\x04\xa7\x02\x0b\ - \x1d\n\r\n\x05\x04\x0e\x02\x02\x01\x12\x04\xa7\x02\x1e1\n\r\n\x05\x04\ - \x0e\x02\x02\x03\x12\x04\xa7\x0245\nC\n\x04\x04\x0e\x02\x03\x12\x04\xaa\ - \x02\x02*\x1a5\x20client\x20source\x20address\x20when\x20receiving\x20a\ - \x20registration\n\n\r\n\x05\x04\x0e\x02\x03\x04\x12\x04\xaa\x02\x02\n\n\ - \r\n\x05\x04\x0e\x02\x03\x05\x12\x04\xaa\x02\x0b\x10\n\r\n\x05\x04\x0e\ - \x02\x03\x01\x12\x04\xaa\x02\x11%\n\r\n\x05\x04\x0e\x02\x03\x03\x12\x04\ - \xaa\x02()\nH\n\x04\x04\x0e\x02\x04\x12\x04\xad\x02\x02#\x1a:\x20Decoy\ - \x20address\x20used\x20when\x20registering\x20over\x20Decoy\x20registrar\ - \n\n\r\n\x05\x04\x0e\x02\x04\x04\x12\x04\xad\x02\x02\n\n\r\n\x05\x04\x0e\ - \x02\x04\x05\x12\x04\xad\x02\x0b\x10\n\r\n\x05\x04\x0e\x02\x04\x01\x12\ - \x04\xad\x02\x11\x1e\n\r\n\x05\x04\x0e\x02\x04\x03\x12\x04\xad\x02!\"\n\ - \x0c\n\x04\x04\x0e\x02\x05\x12\x04\xaf\x02\x02:\n\r\n\x05\x04\x0e\x02\ - \x05\x04\x12\x04\xaf\x02\x02\n\n\r\n\x05\x04\x0e\x02\x05\x06\x12\x04\xaf\ - \x02\x0b\x1f\n\r\n\x05\x04\x0e\x02\x05\x01\x12\x04\xaf\x02\x205\n\r\n\ - \x05\x04\x0e\x02\x05\x03\x12\x04\xaf\x0289\n\x0c\n\x02\x04\x0f\x12\x06\ - \xb2\x02\0\xbe\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\x04\xb2\x02\x08\x14\n\ - 9\n\x04\x04\x0f\x02\0\x12\x04\xb3\x02\x04.\"+\x20how\x20many\x20decoys\ - \x20were\x20tried\x20before\x20success\n\n\r\n\x05\x04\x0f\x02\0\x04\x12\ - \x04\xb3\x02\x04\x0c\n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\xb3\x02\r\x13\n\ - \r\n\x05\x04\x0f\x02\0\x01\x12\x04\xb3\x02\x14(\n\r\n\x05\x04\x0f\x02\0\ - \x03\x12\x04\xb3\x02+-\nm\n\x04\x04\x0f\x02\x01\x12\x04\xb8\x02\x04/\x1a\ - \x1e\x20Applicable\x20to\x20whole\x20session:\n\"\x1a\x20includes\x20fai\ - led\x20attempts\n2#\x20Timings\x20below\x20are\x20in\x20milliseconds\n\n\ - \r\n\x05\x04\x0f\x02\x01\x04\x12\x04\xb8\x02\x04\x0c\n\r\n\x05\x04\x0f\ - \x02\x01\x05\x12\x04\xb8\x02\r\x13\n\r\n\x05\x04\x0f\x02\x01\x01\x12\x04\ - \xb8\x02\x14)\n\r\n\x05\x04\x0f\x02\x01\x03\x12\x04\xb8\x02,.\nR\n\x04\ - \x04\x0f\x02\x02\x12\x04\xbb\x02\x04(\x1a\x1f\x20Last\x20(i.e.\x20succes\ - sful)\x20decoy:\n\"#\x20measured\x20during\x20initial\x20handshake\n\n\r\ - \n\x05\x04\x0f\x02\x02\x04\x12\x04\xbb\x02\x04\x0c\n\r\n\x05\x04\x0f\x02\ - \x02\x05\x12\x04\xbb\x02\r\x13\n\r\n\x05\x04\x0f\x02\x02\x01\x12\x04\xbb\ - \x02\x14\"\n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xbb\x02%'\n%\n\x04\x04\ - \x0f\x02\x03\x12\x04\xbc\x02\x04&\"\x17\x20includes\x20tcp\x20to\x20deco\ - y\n\n\r\n\x05\x04\x0f\x02\x03\x04\x12\x04\xbc\x02\x04\x0c\n\r\n\x05\x04\ - \x0f\x02\x03\x05\x12\x04\xbc\x02\r\x13\n\r\n\x05\x04\x0f\x02\x03\x01\x12\ - \x04\xbc\x02\x14\x20\n\r\n\x05\x04\x0f\x02\x03\x03\x12\x04\xbc\x02#%\nB\ - \n\x04\x04\x0f\x02\x04\x12\x04\xbd\x02\x04&\"4\x20measured\x20when\x20es\ - tablishing\x20tcp\x20connection\x20to\x20decot\n\n\r\n\x05\x04\x0f\x02\ - \x04\x04\x12\x04\xbd\x02\x04\x0c\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\ - \xbd\x02\r\x13\n\r\n\x05\x04\x0f\x02\x04\x01\x12\x04\xbd\x02\x14\x20\n\r\ - \n\x05\x04\x0f\x02\x04\x03\x12\x04\xbd\x02#%\n\x0c\n\x02\x05\x07\x12\x06\ - \xc0\x02\0\xc5\x02\x01\n\x0b\n\x03\x05\x07\x01\x12\x04\xc0\x02\x05\x16\n\ - \x0c\n\x04\x05\x07\x02\0\x12\x04\xc1\x02\x04\x10\n\r\n\x05\x05\x07\x02\0\ - \x01\x12\x04\xc1\x02\x04\x0b\n\r\n\x05\x05\x07\x02\0\x02\x12\x04\xc1\x02\ - \x0e\x0f\n\x0c\n\x04\x05\x07\x02\x01\x12\x04\xc2\x02\x04\x0c\n\r\n\x05\ - \x05\x07\x02\x01\x01\x12\x04\xc2\x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\ - \x02\x12\x04\xc2\x02\n\x0b\n\x0c\n\x04\x05\x07\x02\x02\x12\x04\xc3\x02\ - \x04\x0f\n\r\n\x05\x05\x07\x02\x02\x01\x12\x04\xc3\x02\x04\n\n\r\n\x05\ - \x05\x07\x02\x02\x02\x12\x04\xc3\x02\r\x0e\n\x0c\n\x04\x05\x07\x02\x03\ - \x12\x04\xc4\x02\x04\x0e\n\r\n\x05\x05\x07\x02\x03\x01\x12\x04\xc4\x02\ - \x04\t\n\r\n\x05\x05\x07\x02\x03\x02\x12\x04\xc4\x02\x0c\r\n\x0c\n\x02\ - \x05\x08\x12\x06\xc7\x02\0\xcb\x02\x01\n\x0b\n\x03\x05\x08\x01\x12\x04\ - \xc7\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\0\x12\x04\xc8\x02\x04\x0c\n\r\n\ - \x05\x05\x08\x02\0\x01\x12\x04\xc8\x02\x04\x07\n\r\n\x05\x05\x08\x02\0\ - \x02\x12\x04\xc8\x02\n\x0b\n\x0c\n\x04\x05\x08\x02\x01\x12\x04\xc9\x02\ - \x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\x12\x04\xc9\x02\x04\x07\n\r\n\x05\ - \x05\x08\x02\x01\x02\x12\x04\xc9\x02\n\x0b\n\x0c\n\x04\x05\x08\x02\x02\ - \x12\x04\xca\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x02\x01\x12\x04\xca\x02\ - \x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\x12\x04\xca\x02\n\x0b\n\x0c\n\x02\ - \x04\x10\x12\x06\xcd\x02\0\xd8\x02\x01\n\x0b\n\x03\x04\x10\x01\x12\x04\ - \xcd\x02\x08\x19\n\x0c\n\x04\x04\x10\x02\0\x12\x04\xce\x02\x04#\n\r\n\ - \x05\x04\x10\x02\0\x04\x12\x04\xce\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\ - \x05\x12\x04\xce\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xce\x02\ - \x14\x1e\n\r\n\x05\x04\x10\x02\0\x03\x12\x04\xce\x02!\"\n\x0c\n\x04\x04\ - \x10\x02\x01\x12\x04\xcf\x02\x04\"\n\r\n\x05\x04\x10\x02\x01\x04\x12\x04\ - \xcf\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xcf\x02\r\x13\n\r\ - \n\x05\x04\x10\x02\x01\x01\x12\x04\xcf\x02\x14\x1d\n\r\n\x05\x04\x10\x02\ - \x01\x03\x12\x04\xcf\x02\x20!\n\x0c\n\x04\x04\x10\x02\x02\x12\x04\xd1\ - \x02\x04#\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xd1\x02\x04\x0c\n\r\n\ - \x05\x04\x10\x02\x02\x05\x12\x04\xd1\x02\r\x13\n\r\n\x05\x04\x10\x02\x02\ - \x01\x12\x04\xd1\x02\x14\x1e\n\r\n\x05\x04\x10\x02\x02\x03\x12\x04\xd1\ - \x02!\"\n\x0c\n\x04\x04\x10\x02\x03\x12\x04\xd3\x02\x04-\n\r\n\x05\x04\ - \x10\x02\x03\x04\x12\x04\xd3\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x06\ - \x12\x04\xd3\x02\r\x1e\n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xd3\x02\x1f\ - (\n\r\n\x05\x04\x10\x02\x03\x03\x12\x04\xd3\x02+,\n\x0c\n\x04\x04\x10\ - \x02\x04\x12\x04\xd5\x02\x04\"\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xd5\ - \x02\x04\x0c\n\r\n\x05\x04\x10\x02\x04\x05\x12\x04\xd5\x02\r\x13\n\r\n\ - \x05\x04\x10\x02\x04\x01\x12\x04\xd5\x02\x14\x1c\n\r\n\x05\x04\x10\x02\ - \x04\x03\x12\x04\xd5\x02\x1f!\n\x0c\n\x04\x04\x10\x02\x05\x12\x04\xd6\ - \x02\x04\"\n\r\n\x05\x04\x10\x02\x05\x04\x12\x04\xd6\x02\x04\x0c\n\r\n\ - \x05\x04\x10\x02\x05\x05\x12\x04\xd6\x02\r\x13\n\r\n\x05\x04\x10\x02\x05\ - \x01\x12\x04\xd6\x02\x14\x1c\n\r\n\x05\x04\x10\x02\x05\x03\x12\x04\xd6\ - \x02\x1f!\n\x0c\n\x04\x04\x10\x02\x06\x12\x04\xd7\x02\x04\x20\n\r\n\x05\ - \x04\x10\x02\x06\x04\x12\x04\xd7\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x06\ - \x06\x12\x04\xd7\x02\r\x14\n\r\n\x05\x04\x10\x02\x06\x01\x12\x04\xd7\x02\ - \x15\x1a\n\r\n\x05\x04\x10\x02\x06\x03\x12\x04\xd7\x02\x1d\x1f\nT\n\x02\ - \x04\x11\x12\x06\xdb\x02\0\xec\x02\x01\x1aF\x20Adding\x20message\x20resp\ - onse\x20from\x20Station\x20to\x20Client\x20for\x20bidirectional\x20API\n\ - \n\x0b\n\x03\x04\x11\x01\x12\x04\xdb\x02\x08\x1c\n\x0c\n\x04\x04\x11\x02\ - \0\x12\x04\xdc\x02\x02\x20\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xdc\x02\ - \x02\n\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xdc\x02\x0b\x12\n\r\n\x05\x04\ - \x11\x02\0\x01\x12\x04\xdc\x02\x13\x1b\n\r\n\x05\x04\x11\x02\0\x03\x12\ - \x04\xdc\x02\x1e\x1f\n?\n\x04\x04\x11\x02\x01\x12\x04\xde\x02\x02\x1e\ - \x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20network\x20byte\x20\ - order\n\n\r\n\x05\x04\x11\x02\x01\x04\x12\x04\xde\x02\x02\n\n\r\n\x05\ - \x04\x11\x02\x01\x05\x12\x04\xde\x02\x0b\x10\n\r\n\x05\x04\x11\x02\x01\ - \x01\x12\x04\xde\x02\x11\x19\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xde\ - \x02\x1c\x1d\n,\n\x04\x04\x11\x02\x02\x12\x04\xe1\x02\x02\x1f\x1a\x1e\ - \x20Respond\x20with\x20randomized\x20port\n\n\r\n\x05\x04\x11\x02\x02\ - \x04\x12\x04\xe1\x02\x02\n\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xe1\x02\ - \x0b\x11\n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xe1\x02\x12\x1a\n\r\n\x05\ - \x04\x11\x02\x02\x03\x12\x04\xe1\x02\x1d\x1e\nd\n\x04\x04\x11\x02\x03\ - \x12\x04\xe5\x02\x02\"\x1aV\x20Future:\x20station\x20provides\x20client\ - \x20with\x20secret,\x20want\x20chanel\x20present\n\x20Leave\x20null\x20f\ - or\x20now\n\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xe5\x02\x02\n\n\r\n\ - \x05\x04\x11\x02\x03\x05\x12\x04\xe5\x02\x0b\x10\n\r\n\x05\x04\x11\x02\ - \x03\x01\x12\x04\xe5\x02\x11\x1d\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\ - \xe5\x02\x20!\nA\n\x04\x04\x11\x02\x04\x12\x04\xe8\x02\x02\x1c\x1a3\x20I\ - f\x20registration\x20wrong,\x20populate\x20this\x20error\x20string\n\n\r\ - \n\x05\x04\x11\x02\x04\x04\x12\x04\xe8\x02\x02\n\n\r\n\x05\x04\x11\x02\ - \x04\x05\x12\x04\xe8\x02\x0b\x11\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\ - \xe8\x02\x12\x17\n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\xe8\x02\x1a\x1b\n\ - +\n\x04\x04\x11\x02\x05\x12\x04\xeb\x02\x02%\x1a\x1d\x20ClientConf\x20fi\ - eld\x20(optional)\n\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\xeb\x02\x02\n\ - \n\r\n\x05\x04\x11\x02\x05\x06\x12\x04\xeb\x02\x0b\x15\n\r\n\x05\x04\x11\ - \x02\x05\x01\x12\x04\xeb\x02\x16\x20\n\r\n\x05\x04\x11\x02\x05\x03\x12\ - \x04\xeb\x02#$\n!\n\x02\x04\x12\x12\x06\xef\x02\0\xf3\x02\x01\x1a\x13\ - \x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x12\x01\x12\x04\xef\x02\ - \x08\x13\n\x0c\n\x04\x04\x12\x02\0\x12\x04\xf0\x02\x04\x1e\n\r\n\x05\x04\ - \x12\x02\0\x04\x12\x04\xf0\x02\x04\x0c\n\r\n\x05\x04\x12\x02\0\x05\x12\ - \x04\xf0\x02\r\x11\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\xf0\x02\x12\x19\n\ - \r\n\x05\x04\x12\x02\0\x03\x12\x04\xf0\x02\x1c\x1d\n\x0c\n\x04\x04\x12\ - \x02\x01\x12\x04\xf1\x02\x04*\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\xf1\ - \x02\x04\x0c\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\xf1\x02\r\x11\n\r\n\ - \x05\x04\x12\x02\x01\x01\x12\x04\xf1\x02\x12%\n\r\n\x05\x04\x12\x02\x01\ - \x03\x12\x04\xf1\x02()\n\x0c\n\x04\x04\x12\x02\x02\x12\x04\xf2\x02\x04=\ - \n\r\n\x05\x04\x12\x02\x02\x04\x12\x04\xf2\x02\x04\x0c\n\r\n\x05\x04\x12\ - \x02\x02\x06\x12\x04\xf2\x02\r!\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\ - \xf2\x02\"8\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\xf2\x02;<\ + \x02\x02\x02\x01\x12\x03}\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\x12\ + \x03}\x1e\x20\n\x0b\n\x04\x05\x02\x02\x03\x12\x03~\x04\x1d\n\x0c\n\x05\ + \x05\x02\x02\x03\x01\x12\x03~\x04\x18\n\x0c\n\x05\x05\x02\x02\x03\x02\ + \x12\x03~\x1b\x1c\n\x0b\n\x04\x05\x02\x02\x04\x12\x03\x7f\x04\x1a\n\x0c\ + \n\x05\x05\x02\x02\x04\x01\x12\x03\x7f\x04\x15\n\x0c\n\x05\x05\x02\x02\ + \x04\x02\x12\x03\x7f\x18\x19\n\x0c\n\x04\x05\x02\x02\x05\x12\x04\x80\x01\ + \x04\x19\n\r\n\x05\x05\x02\x02\x05\x01\x12\x04\x80\x01\x04\x14\n\r\n\x05\ + \x05\x02\x02\x05\x02\x12\x04\x80\x01\x17\x18\n\x0c\n\x04\x05\x02\x02\x06\ + \x12\x04\x81\x01\x04\x1b\n\r\n\x05\x05\x02\x02\x06\x01\x12\x04\x81\x01\ + \x04\x16\n\r\n\x05\x05\x02\x02\x06\x02\x12\x04\x81\x01\x19\x1a\n\x0c\n\ + \x04\x05\x02\x02\x07\x12\x04\x82\x01\x04%\n\r\n\x05\x05\x02\x02\x07\x01\ + \x12\x04\x82\x01\x04\x20\n\r\n\x05\x05\x02\x02\x07\x02\x12\x04\x82\x01#$\ + \n\x0c\n\x04\x05\x02\x02\x08\x12\x04\x83\x01\x04\x14\n\r\n\x05\x05\x02\ + \x02\x08\x01\x12\x04\x83\x01\x04\r\n\r\n\x05\x05\x02\x02\x08\x02\x12\x04\ + \x83\x01\x10\x13\n/\n\x02\x05\x03\x12\x06\x87\x01\0\x8f\x01\x01\x1a!\x20\ + State\x20transitions\x20of\x20the\x20server\n\n\x0b\n\x03\x05\x03\x01\ + \x12\x04\x87\x01\x05\x13\n\x0c\n\x04\x05\x03\x02\0\x12\x04\x88\x01\x04\ + \x16\n\r\n\x05\x05\x03\x02\0\x01\x12\x04\x88\x01\x04\x11\n\r\n\x05\x05\ + \x03\x02\0\x02\x12\x04\x88\x01\x14\x15\n\"\n\x04\x05\x03\x02\x01\x12\x04\ + \x89\x01\x04\x19\"\x14\x20connected\x20to\x20squid\n\n\r\n\x05\x05\x03\ + \x02\x01\x01\x12\x04\x89\x01\x04\x14\n\r\n\x05\x05\x03\x02\x01\x02\x12\ + \x04\x89\x01\x17\x18\n(\n\x04\x05\x03\x02\x02\x12\x04\x8a\x01\x04!\"\x1a\ + \x20connected\x20to\x20covert\x20host\n\n\r\n\x05\x05\x03\x02\x02\x01\ + \x12\x04\x8a\x01\x04\x1b\n\r\n\x05\x05\x03\x02\x02\x02\x12\x04\x8a\x01\ + \x1e\x20\n\x0c\n\x04\x05\x03\x02\x03\x12\x04\x8b\x01\x04\x1e\n\r\n\x05\ + \x05\x03\x02\x03\x01\x12\x04\x8b\x01\x04\x19\n\r\n\x05\x05\x03\x02\x03\ + \x02\x12\x04\x8b\x01\x1c\x1d\n\x0c\n\x04\x05\x03\x02\x04\x12\x04\x8c\x01\ + \x04\x1a\n\r\n\x05\x05\x03\x02\x04\x01\x12\x04\x8c\x01\x04\x15\n\r\n\x05\ + \x05\x03\x02\x04\x02\x12\x04\x8c\x01\x18\x19\nS\n\x04\x05\x03\x02\x05\ + \x12\x04\x8e\x01\x04\x14\x1aE\x20TODO\x20should\x20probably\x20also\x20a\ + llow\x20EXPECT_RECONNECT\x20here,\x20for\x20DittoTap\n\n\r\n\x05\x05\x03\ + \x02\x05\x01\x12\x04\x8e\x01\x04\r\n\r\n\x05\x05\x03\x02\x05\x02\x12\x04\ + \x8e\x01\x10\x13\n8\n\x02\x05\x04\x12\x06\x92\x01\0\x9c\x01\x01\x1a*\x20\ + Should\x20accompany\x20all\x20S2C_ERROR\x20messages.\n\n\x0b\n\x03\x05\ + \x04\x01\x12\x04\x92\x01\x05\x13\n\x0c\n\x04\x05\x04\x02\0\x12\x04\x93\ + \x01\x04\x11\n\r\n\x05\x05\x04\x02\0\x01\x12\x04\x93\x01\x04\x0c\n\r\n\ + \x05\x05\x04\x02\0\x02\x12\x04\x93\x01\x0f\x10\n*\n\x04\x05\x04\x02\x01\ + \x12\x04\x94\x01\x04\x16\"\x1c\x20Squid\x20TCP\x20connection\x20broke\n\ + \n\r\n\x05\x05\x04\x02\x01\x01\x12\x04\x94\x01\x04\x11\n\r\n\x05\x05\x04\ + \x02\x01\x02\x12\x04\x94\x01\x14\x15\n7\n\x04\x05\x04\x02\x02\x12\x04\ + \x95\x01\x04\x18\")\x20You\x20told\x20me\x20something\x20was\x20wrong,\ + \x20client\n\n\r\n\x05\x05\x04\x02\x02\x01\x12\x04\x95\x01\x04\x13\n\r\n\ + \x05\x05\x04\x02\x02\x02\x12\x04\x95\x01\x16\x17\n@\n\x04\x05\x04\x02\ + \x03\x12\x04\x96\x01\x04\x18\"2\x20You\x20messed\x20up,\x20client\x20(e.\ + g.\x20sent\x20a\x20bad\x20protobuf)\n\n\r\n\x05\x05\x04\x02\x03\x01\x12\ + \x04\x96\x01\x04\x13\n\r\n\x05\x05\x04\x02\x03\x02\x12\x04\x96\x01\x16\ + \x17\n\x17\n\x04\x05\x04\x02\x04\x12\x04\x97\x01\x04\x19\"\t\x20I\x20bro\ + ke\n\n\r\n\x05\x05\x04\x02\x04\x01\x12\x04\x97\x01\x04\x14\n\r\n\x05\x05\ + \x04\x02\x04\x02\x12\x04\x97\x01\x17\x18\nE\n\x04\x05\x04\x02\x05\x12\ + \x04\x98\x01\x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\x20use\ + \x20this\x20decoy\x20right\x20now\n\n\r\n\x05\x05\x04\x02\x05\x01\x12\ + \x04\x98\x01\x04\x12\n\r\n\x05\x05\x04\x02\x05\x02\x12\x04\x98\x01\x15\ + \x16\nD\n\x04\x05\x04\x02\x06\x12\x04\x9a\x01\x04\x18\"6\x20My\x20stream\ + \x20to\x20you\x20broke.\x20(This\x20is\x20impossible\x20to\x20send)\n\n\ + \r\n\x05\x05\x04\x02\x06\x01\x12\x04\x9a\x01\x04\x11\n\r\n\x05\x05\x04\ + \x02\x06\x02\x12\x04\x9a\x01\x14\x17\nA\n\x04\x05\x04\x02\x07\x12\x04\ + \x9b\x01\x04\x19\"3\x20You\x20never\x20came\x20back.\x20(This\x20is\x20i\ + mpossible\x20to\x20send)\n\n\r\n\x05\x05\x04\x02\x07\x01\x12\x04\x9b\x01\ + \x04\x12\n\r\n\x05\x05\x04\x02\x07\x02\x12\x04\x9b\x01\x15\x18\n\x0c\n\ + \x02\x05\x05\x12\x06\x9e\x01\0\xaa\x01\x01\n\x0b\n\x03\x05\x05\x01\x12\ + \x04\x9e\x01\x05\x12\n\x0c\n\x04\x05\x05\x02\0\x12\x04\x9f\x01\x04\r\n\r\ + \n\x05\x05\x05\x02\0\x01\x12\x04\x9f\x01\x04\x08\n\r\n\x05\x05\x05\x02\0\ + \x02\x12\x04\x9f\x01\x0b\x0c\n`\n\x04\x05\x05\x02\x01\x12\x04\xa0\x01\ + \x04\x0c\"R\x20Send\x20a\x2032-byte\x20HMAC\x20id\x20to\x20let\x20the\ + \x20station\x20distinguish\x20registrations\x20to\x20same\x20host\n\n\r\ + \n\x05\x05\x05\x02\x01\x01\x12\x04\xa0\x01\x04\x07\n\r\n\x05\x05\x05\x02\ + \x01\x02\x12\x04\xa0\x01\n\x0b\n\x0c\n\x04\x05\x05\x02\x02\x12\x04\xa1\ + \x01\x04\x0e\n\r\n\x05\x05\x05\x02\x02\x01\x12\x04\xa1\x01\x04\t\n\r\n\ + \x05\x05\x05\x02\x02\x02\x12\x04\xa1\x01\x0c\r\n#\n\x04\x05\x05\x02\x03\ + \x12\x04\xa2\x01\x04\r\"\x15\x20UDP\x20transport:\x20DTLS\n\n\r\n\x05\ + \x05\x05\x02\x03\x01\x12\x04\xa2\x01\x04\x08\n\r\n\x05\x05\x05\x02\x03\ + \x02\x12\x04\xa2\x01\x0b\x0c\n:\n\x04\x05\x05\x02\x04\x12\x04\xa3\x01\ + \x04\x0f\",\x20dynamic\x20prefix\x20transport\x20(and\x20updated\x20Min)\ + \n\n\r\n\x05\x05\x05\x02\x04\x01\x12\x04\xa3\x01\x04\n\n\r\n\x05\x05\x05\ + \x02\x04\x02\x12\x04\xa3\x01\r\x0e\n$\n\x04\x05\x05\x02\x05\x12\x04\xa4\ + \x01\x04\r\"\x16\x20uTLS\x20based\x20transport\n\n\r\n\x05\x05\x05\x02\ + \x05\x01\x12\x04\xa4\x01\x04\x08\n\r\n\x05\x05\x05\x02\x05\x02\x12\x04\ + \xa4\x01\x0b\x0c\n?\n\x04\x05\x05\x02\x06\x12\x04\xa5\x01\x04\x0f\"1\x20\ + Formatting\x20transport\x20-\x20format\x20first,\x20format\x20all\n\n\r\ + \n\x05\x05\x05\x02\x06\x01\x12\x04\xa5\x01\x04\n\n\r\n\x05\x05\x05\x02\ + \x06\x02\x12\x04\xa5\x01\r\x0e\n\x1b\n\x04\x05\x05\x02\x07\x12\x04\xa6\ + \x01\x04\r\"\r\x20WebAssembly\n\n\r\n\x05\x05\x05\x02\x07\x01\x12\x04\ + \xa6\x01\x04\x08\n\r\n\x05\x05\x05\x02\x07\x02\x12\x04\xa6\x01\x0b\x0c\n\ + .\n\x04\x05\x05\x02\x08\x12\x04\xa7\x01\x04\x0c\"\x20\x20Format\x20trans\ + forming\x20encryption\n\n\r\n\x05\x05\x05\x02\x08\x01\x12\x04\xa7\x01\ + \x04\x07\n\r\n\x05\x05\x05\x02\x08\x02\x12\x04\xa7\x01\n\x0b\n\x1f\n\x04\ + \x05\x05\x02\t\x12\x04\xa8\x01\x04\r\"\x11\x20quic\x20transport?\n\n\r\n\ + \x05\x05\x05\x02\t\x01\x12\x04\xa8\x01\x04\x08\n\r\n\x05\x05\x05\x02\t\ + \x02\x12\x04\xa8\x01\x0b\x0c\n1\n\x04\x05\x05\x02\n\x12\x04\xa9\x01\x04\ + \x10\"#\x20UDP\x20transport:\x20WebRTC\x20DataChannel\n\n\r\n\x05\x05\ + \x05\x02\n\x01\x12\x04\xa9\x01\x04\n\n\r\n\x05\x05\x05\x02\n\x02\x12\x04\ + \xa9\x01\r\x0f\n:\n\x02\x04\x07\x12\x06\xad\x01\0\xb3\x01\x01\x1a,\x20De\ + flated\x20ICE\x20Candidate\x20by\x20seed2sdp\x20package\n\n\x0b\n\x03\ + \x04\x07\x01\x12\x04\xad\x01\x08\x1a\n5\n\x04\x04\x07\x02\0\x12\x04\xaf\ + \x01\x04!\x1a'\x20IP\x20is\x20represented\x20in\x20its\x2016-byte\x20for\ + m\n\n\r\n\x05\x04\x07\x02\0\x04\x12\x04\xaf\x01\x04\x0c\n\r\n\x05\x04\ + \x07\x02\0\x05\x12\x04\xaf\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\ + \xaf\x01\x14\x1c\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xaf\x01\x1f\x20\n\ + \x0c\n\x04\x04\x07\x02\x01\x12\x04\xb0\x01\x04!\n\r\n\x05\x04\x07\x02\ + \x01\x04\x12\x04\xb0\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x01\x05\x12\x04\ + \xb0\x01\r\x13\n\r\n\x05\x04\x07\x02\x01\x01\x12\x04\xb0\x01\x14\x1c\n\r\ + \n\x05\x04\x07\x02\x01\x03\x12\x04\xb0\x01\x1f\x20\n\x9b\x01\n\x04\x04\ + \x07\x02\x02\x12\x04\xb2\x01\x04&\x1a\x8c\x01\x20Composed\x20info\x20inc\ + ludes\x20port,\x20tcptype\x20(unset\x20if\x20not\x20tcp),\x20candidate\ + \x20type\x20(host,\x20srflx,\x20prflx),\x20protocol\x20(TCP/UDP),\x20and\ + \x20component\x20(RTP/RTCP)\n\n\r\n\x05\x04\x07\x02\x02\x04\x12\x04\xb2\ + \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x02\x05\x12\x04\xb2\x01\r\x13\n\r\n\ + \x05\x04\x07\x02\x02\x01\x12\x04\xb2\x01\x14!\n\r\n\x05\x04\x07\x02\x02\ + \x03\x12\x04\xb2\x01$%\n;\n\x02\x04\x08\x12\x06\xb6\x01\0\xb9\x01\x01\ + \x1a-\x20Deflated\x20SDP\x20for\x20WebRTC\x20by\x20seed2sdp\x20package\n\ + \n\x0b\n\x03\x04\x08\x01\x12\x04\xb6\x01\x08\x11\n\x0c\n\x04\x04\x08\x02\ + \0\x12\x04\xb7\x01\x04\x1d\n\r\n\x05\x04\x08\x02\0\x04\x12\x04\xb7\x01\ + \x04\x0c\n\r\n\x05\x04\x08\x02\0\x05\x12\x04\xb7\x01\r\x13\n\r\n\x05\x04\ + \x08\x02\0\x01\x12\x04\xb7\x01\x14\x18\n\r\n\x05\x04\x08\x02\0\x03\x12\ + \x04\xb7\x01\x1b\x1c\n2\n\x04\x04\x08\x02\x01\x12\x04\xb8\x01\x04/\"$\ + \x20there\x20could\x20be\x20multiple\x20candidates\n\n\r\n\x05\x04\x08\ + \x02\x01\x04\x12\x04\xb8\x01\x04\x0c\n\r\n\x05\x04\x08\x02\x01\x06\x12\ + \x04\xb8\x01\r\x1f\n\r\n\x05\x04\x08\x02\x01\x01\x12\x04\xb8\x01\x20*\n\ + \r\n\x05\x04\x08\x02\x01\x03\x12\x04\xb8\x01-.\n?\n\x02\x04\t\x12\x06\ + \xbc\x01\0\xbf\x01\x01\x1a1\x20WebRTCSignal\x20includes\x20a\x20deflated\ + \x20SDP\x20and\x20a\x20seed\n\n\x0b\n\x03\x04\t\x01\x12\x04\xbc\x01\x08\ + \x14\n\x0c\n\x04\x04\t\x02\0\x12\x04\xbd\x01\x04\x1d\n\r\n\x05\x04\t\x02\ + \0\x04\x12\x04\xbd\x01\x04\x0c\n\r\n\x05\x04\t\x02\0\x05\x12\x04\xbd\x01\ + \r\x13\n\r\n\x05\x04\t\x02\0\x01\x12\x04\xbd\x01\x14\x18\n\r\n\x05\x04\t\ + \x02\0\x03\x12\x04\xbd\x01\x1b\x1c\n\x0c\n\x04\x04\t\x02\x01\x12\x04\xbe\ + \x01\x04\x1f\n\r\n\x05\x04\t\x02\x01\x04\x12\x04\xbe\x01\x04\x0c\n\r\n\ + \x05\x04\t\x02\x01\x06\x12\x04\xbe\x01\r\x16\n\r\n\x05\x04\t\x02\x01\x01\ + \x12\x04\xbe\x01\x17\x1a\n\r\n\x05\x04\t\x02\x01\x03\x12\x04\xbe\x01\x1d\ + \x1e\n\x0c\n\x02\x04\n\x12\x06\xc1\x01\0\xd8\x01\x01\n\x0b\n\x03\x04\n\ + \x01\x12\x04\xc1\x01\x08\x17\nO\n\x04\x04\n\x02\0\x12\x04\xc3\x01\x04)\ + \x1aA\x20Should\x20accompany\x20(at\x20least)\x20SESSION_INIT\x20and\x20\ + CONFIRM_RECONNECT.\n\n\r\n\x05\x04\n\x02\0\x04\x12\x04\xc3\x01\x04\x0c\n\ + \r\n\x05\x04\n\x02\0\x05\x12\x04\xc3\x01\r\x13\n\r\n\x05\x04\n\x02\0\x01\ + \x12\x04\xc3\x01\x14$\n\r\n\x05\x04\n\x02\0\x03\x12\x04\xc3\x01'(\nv\n\ + \x04\x04\n\x02\x01\x12\x04\xc7\x01\x041\x1ah\x20There\x20might\x20be\x20\ + a\x20state\x20transition.\x20May\x20be\x20absent;\x20absence\x20should\ + \x20be\n\x20treated\x20identically\x20to\x20NO_CHANGE.\n\n\r\n\x05\x04\n\ + \x02\x01\x04\x12\x04\xc7\x01\x04\x0c\n\r\n\x05\x04\n\x02\x01\x06\x12\x04\ + \xc7\x01\r\x1b\n\r\n\x05\x04\n\x02\x01\x01\x12\x04\xc7\x01\x1c,\n\r\n\ + \x05\x04\n\x02\x01\x03\x12\x04\xc7\x01/0\nc\n\x04\x04\n\x02\x02\x12\x04\ + \xcb\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\n\x02\x02\x04\x12\x04\xcb\x01\x04\x0c\n\r\n\x05\ + \x04\n\x02\x02\x06\x12\x04\xcb\x01\r\x17\n\r\n\x05\x04\n\x02\x02\x01\x12\ + \x04\xcb\x01\x18#\n\r\n\x05\x04\n\x02\x02\x03\x12\x04\xcb\x01&'\nP\n\x04\ + \x04\n\x02\x03\x12\x04\xce\x01\x04+\x1aB\x20If\x20state_transition\x20==\ + \x20S2C_ERROR,\x20this\x20field\x20is\x20the\x20explanation.\n\n\r\n\x05\ + \x04\n\x02\x03\x04\x12\x04\xce\x01\x04\x0c\n\r\n\x05\x04\n\x02\x03\x06\ + \x12\x04\xce\x01\r\x1b\n\r\n\x05\x04\n\x02\x03\x01\x12\x04\xce\x01\x1c&\ + \n\r\n\x05\x04\n\x02\x03\x03\x12\x04\xce\x01)*\nQ\n\x04\x04\n\x02\x04\ + \x12\x04\xd1\x01\x04$\x1aC\x20Signals\x20client\x20to\x20stop\x20connect\ + ing\x20for\x20following\x20amount\x20of\x20seconds\n\n\r\n\x05\x04\n\x02\ + \x04\x04\x12\x04\xd1\x01\x04\x0c\n\r\n\x05\x04\n\x02\x04\x05\x12\x04\xd1\ + \x01\r\x13\n\r\n\x05\x04\n\x02\x04\x01\x12\x04\xd1\x01\x14\x1f\n\r\n\x05\ + \x04\n\x02\x04\x03\x12\x04\xd1\x01\"#\nK\n\x04\x04\n\x02\x05\x12\x04\xd4\ + \x01\x04#\x1a=\x20Sent\x20in\x20SESSION_INIT,\x20identifies\x20the\x20st\ + ation\x20that\x20picked\x20up\n\n\r\n\x05\x04\n\x02\x05\x04\x12\x04\xd4\ + \x01\x04\x0c\n\r\n\x05\x04\n\x02\x05\x05\x12\x04\xd4\x01\r\x13\n\r\n\x05\ + \x04\n\x02\x05\x01\x12\x04\xd4\x01\x14\x1e\n\r\n\x05\x04\n\x02\x05\x03\ + \x12\x04\xd4\x01!\"\nG\n\x04\x04\n\x02\x06\x12\x04\xd7\x01\x04!\x1a9\x20\ + Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprinting\ + .\n\n\r\n\x05\x04\n\x02\x06\x04\x12\x04\xd7\x01\x04\x0c\n\r\n\x05\x04\n\ + \x02\x06\x05\x12\x04\xd7\x01\r\x12\n\r\n\x05\x04\n\x02\x06\x01\x12\x04\ + \xd7\x01\x13\x1a\n\r\n\x05\x04\n\x02\x06\x03\x12\x04\xd7\x01\x1d\x20\n\ + \x0c\n\x02\x04\x0b\x12\x06\xda\x01\0\xe0\x01\x01\n\x0b\n\x03\x04\x0b\x01\ + \x12\x04\xda\x01\x08\x19\n\x0c\n\x04\x04\x0b\x02\0\x12\x04\xdb\x01\x08&\ + \n\r\n\x05\x04\x0b\x02\0\x04\x12\x04\xdb\x01\x08\x10\n\r\n\x05\x04\x0b\ + \x02\0\x05\x12\x04\xdb\x01\x11\x15\n\r\n\x05\x04\x0b\x02\0\x01\x12\x04\ + \xdb\x01\x16!\n\r\n\x05\x04\x0b\x02\0\x03\x12\x04\xdb\x01$%\n\x0c\n\x04\ + \x04\x0b\x02\x01\x12\x04\xdc\x01\x08%\n\r\n\x05\x04\x0b\x02\x01\x04\x12\ + \x04\xdc\x01\x08\x10\n\r\n\x05\x04\x0b\x02\x01\x05\x12\x04\xdc\x01\x11\ + \x15\n\r\n\x05\x04\x0b\x02\x01\x01\x12\x04\xdc\x01\x16\x20\n\r\n\x05\x04\ + \x0b\x02\x01\x03\x12\x04\xdc\x01#$\n\x0c\n\x04\x04\x0b\x02\x02\x12\x04\ + \xdd\x01\x08'\n\r\n\x05\x04\x0b\x02\x02\x04\x12\x04\xdd\x01\x08\x10\n\r\ + \n\x05\x04\x0b\x02\x02\x05\x12\x04\xdd\x01\x11\x15\n\r\n\x05\x04\x0b\x02\ + \x02\x01\x12\x04\xdd\x01\x16\"\n\r\n\x05\x04\x0b\x02\x02\x03\x12\x04\xdd\ + \x01%&\n\x0c\n\x04\x04\x0b\x02\x03\x12\x04\xde\x01\x04\x1e\n\r\n\x05\x04\ + \x0b\x02\x03\x04\x12\x04\xde\x01\x04\x0c\n\r\n\x05\x04\x0b\x02\x03\x05\ + \x12\x04\xde\x01\r\x11\n\r\n\x05\x04\x0b\x02\x03\x01\x12\x04\xde\x01\x12\ + \x19\n\r\n\x05\x04\x0b\x02\x03\x03\x12\x04\xde\x01\x1c\x1d\n\x0c\n\x04\ + \x04\x0b\x02\x04\x12\x04\xdf\x01\x04!\n\r\n\x05\x04\x0b\x02\x04\x04\x12\ + \x04\xdf\x01\x04\x0c\n\r\n\x05\x04\x0b\x02\x04\x05\x12\x04\xdf\x01\r\x11\ + \n\r\n\x05\x04\x0b\x02\x04\x01\x12\x04\xdf\x01\x12\x1c\n\r\n\x05\x04\x0b\ + \x02\x04\x03\x12\x04\xdf\x01\x1f\x20\n\x0c\n\x02\x04\x0c\x12\x06\xe2\x01\ + \0\x9c\x02\x01\n\x0b\n\x03\x04\x0c\x01\x12\x04\xe2\x01\x08\x17\n\x0c\n\ + \x04\x04\x0c\x02\0\x12\x04\xe3\x01\x04)\n\r\n\x05\x04\x0c\x02\0\x04\x12\ + \x04\xe3\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\0\x05\x12\x04\xe3\x01\r\x13\n\ + \r\n\x05\x04\x0c\x02\0\x01\x12\x04\xe3\x01\x14$\n\r\n\x05\x04\x0c\x02\0\ + \x03\x12\x04\xe3\x01'(\n\xd0\x01\n\x04\x04\x0c\x02\x01\x12\x04\xe8\x01\ + \x04.\x1a\xc1\x01\x20The\x20client\x20reports\x20its\x20decoy\x20list's\ + \x20version\x20number\x20here,\x20which\x20the\n\x20station\x20can\x20us\ + e\x20to\x20decide\x20whether\x20to\x20send\x20an\x20updated\x20one.\x20T\ + he\x20station\n\x20should\x20always\x20send\x20a\x20list\x20if\x20this\ + \x20field\x20is\x20set\x20to\x200.\n\n\r\n\x05\x04\x0c\x02\x01\x04\x12\ + \x04\xe8\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x01\x05\x12\x04\xe8\x01\r\x13\ + \n\r\n\x05\x04\x0c\x02\x01\x01\x12\x04\xe8\x01\x14)\n\r\n\x05\x04\x0c\ + \x02\x01\x03\x12\x04\xe8\x01,-\n\x0c\n\x04\x04\x0c\x02\x02\x12\x04\xea\ + \x01\x041\n\r\n\x05\x04\x0c\x02\x02\x04\x12\x04\xea\x01\x04\x0c\n\r\n\ + \x05\x04\x0c\x02\x02\x06\x12\x04\xea\x01\r\x1b\n\r\n\x05\x04\x0c\x02\x02\ + \x01\x12\x04\xea\x01\x1c,\n\r\n\x05\x04\x0c\x02\x02\x03\x12\x04\xea\x01/\ + 0\n\x80\x01\n\x04\x04\x0c\x02\x03\x12\x04\xee\x01\x04$\x1ar\x20The\x20po\ + sition\x20in\x20the\x20overall\x20session's\x20upload\x20sequence\x20whe\ + re\x20the\x20current\n\x20YIELD=>ACQUIRE\x20switchover\x20is\x20happenin\ + g.\n\n\r\n\x05\x04\x0c\x02\x03\x04\x12\x04\xee\x01\x04\x0c\n\r\n\x05\x04\ + \x0c\x02\x03\x05\x12\x04\xee\x01\r\x13\n\r\n\x05\x04\x0c\x02\x03\x01\x12\ + \x04\xee\x01\x14\x1f\n\r\n\x05\x04\x0c\x02\x03\x03\x12\x04\xee\x01\"#\ng\ + \n\x04\x04\x0c\x02\x04\x12\x04\xf2\x01\x04+\x1aY\x20High\x20level\x20cli\ + ent\x20library\x20version\x20used\x20for\x20indicating\x20feature\x20sup\ + port,\x20or\n\x20lack\x20therof.\n\n\r\n\x05\x04\x0c\x02\x04\x04\x12\x04\ + \xf2\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x04\x05\x12\x04\xf2\x01\r\x13\n\r\ + \n\x05\x04\x0c\x02\x04\x01\x12\x04\xf2\x01\x14&\n\r\n\x05\x04\x0c\x02\ + \x04\x03\x12\x04\xf2\x01)*\n\xa5\x02\n\x04\x04\x0c\x02\x05\x12\x04\xf7\ + \x01\x040\x1a\x96\x02\x20Indicates\x20whether\x20the\x20client\x20will\ + \x20allow\x20the\x20registrar\x20to\x20provide\x20alternative\x20paramet\ + ers\x20that\n\x20may\x20work\x20better\x20in\x20substitute\x20for\x20the\ + \x20deterministically\x20selected\x20parameters.\x20This\x20only\x20work\ + s\n\x20for\x20bidirectional\x20registration\x20methods\x20where\x20the\ + \x20client\x20receives\x20a\x20RegistrationResponse.\n\n\r\n\x05\x04\x0c\ + \x02\x05\x04\x12\x04\xf7\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x05\x05\x12\ + \x04\xf7\x01\r\x11\n\r\n\x05\x04\x0c\x02\x05\x01\x12\x04\xf7\x01\x12+\n\ + \r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf7\x01./\nq\n\x04\x04\x0c\x02\x06\ + \x12\x04\xfb\x01\x04'\x1ac\x20List\x20of\x20decoys\x20that\x20client\x20\ + have\x20unsuccessfully\x20tried\x20in\x20current\x20session.\n\x20Could\ + \x20be\x20sent\x20in\x20chunks\n\n\r\n\x05\x04\x0c\x02\x06\x04\x12\x04\ + \xfb\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x06\x05\x12\x04\xfb\x01\r\x13\n\r\ + \n\x05\x04\x0c\x02\x06\x01\x12\x04\xfb\x01\x14!\n\r\n\x05\x04\x0c\x02\ + \x06\x03\x12\x04\xfb\x01$&\n\x0c\n\x04\x04\x0c\x02\x07\x12\x04\xfd\x01\ + \x04%\n\r\n\x05\x04\x0c\x02\x07\x04\x12\x04\xfd\x01\x04\x0c\n\r\n\x05\ + \x04\x0c\x02\x07\x06\x12\x04\xfd\x01\r\x19\n\r\n\x05\x04\x0c\x02\x07\x01\ + \x12\x04\xfd\x01\x1a\x1f\n\r\n\x05\x04\x0c\x02\x07\x03\x12\x04\xfd\x01\"\ + $\nk\n\x04\x04\x0c\x02\x08\x12\x04\x80\x02\x04*\x1a]\x20NullTransport,\ + \x20MinTransport,\x20Obfs4Transport,\x20etc.\x20Transport\x20type\x20we\ + \x20want\x20from\x20phantom\x20proxy\n\n\r\n\x05\x04\x0c\x02\x08\x04\x12\ + \x04\x80\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x08\x06\x12\x04\x80\x02\r\x1a\ + \n\r\n\x05\x04\x0c\x02\x08\x01\x12\x04\x80\x02\x1b$\n\r\n\x05\x04\x0c\ + \x02\x08\x03\x12\x04\x80\x02')\n\x0c\n\x04\x04\x0c\x02\t\x12\x04\x82\x02\ + \x047\n\r\n\x05\x04\x0c\x02\t\x04\x12\x04\x82\x02\x04\x0c\n\r\n\x05\x04\ + \x0c\x02\t\x06\x12\x04\x82\x02\r\x20\n\r\n\x05\x04\x0c\x02\t\x01\x12\x04\ + \x82\x02!1\n\r\n\x05\x04\x0c\x02\t\x03\x12\x04\x82\x0246\n\xc8\x03\n\x04\ + \x04\x0c\x02\n\x12\x04\x8a\x02\x04(\x1a\xb9\x03\x20Station\x20is\x20only\ + \x20required\x20to\x20check\x20this\x20variable\x20during\x20session\x20\ + initialization.\n\x20If\x20set,\x20station\x20must\x20facilitate\x20conn\ + ection\x20to\x20said\x20target\x20by\x20itself,\x20i.e.\x20write\x20into\ + \x20squid\n\x20socket\x20an\x20HTTP/SOCKS/any\x20other\x20connection\x20\ + request.\n\x20covert_address\x20must\x20have\x20exactly\x20one\x20':'\ + \x20colon,\x20that\x20separates\x20host\x20(literal\x20IP\x20address\x20\ + or\n\x20resolvable\x20hostname)\x20and\x20port\n\x20TODO:\x20make\x20it\ + \x20required\x20for\x20initialization,\x20and\x20stop\x20connecting\x20a\ + ny\x20client\x20straight\x20to\x20squid?\n\n\r\n\x05\x04\x0c\x02\n\x04\ + \x12\x04\x8a\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\n\x05\x12\x04\x8a\x02\r\ + \x13\n\r\n\x05\x04\x0c\x02\n\x01\x12\x04\x8a\x02\x14\"\n\r\n\x05\x04\x0c\ + \x02\n\x03\x12\x04\x8a\x02%'\nR\n\x04\x04\x0c\x02\x0b\x12\x04\x8d\x02\ + \x042\x1aD\x20Used\x20in\x20dark\x20decoys\x20to\x20signal\x20which\x20d\ + ark\x20decoy\x20it\x20will\x20connect\x20to.\n\n\r\n\x05\x04\x0c\x02\x0b\ + \x04\x12\x04\x8d\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x0b\x05\x12\x04\x8d\ + \x02\r\x13\n\r\n\x05\x04\x0c\x02\x0b\x01\x12\x04\x8d\x02\x14,\n\r\n\x05\ + \x04\x0c\x02\x0b\x03\x12\x04\x8d\x02/1\nR\n\x04\x04\x0c\x02\x0c\x12\x04\ + \x90\x02\x04\"\x1aD\x20Used\x20to\x20indicate\x20to\x20server\x20if\x20c\ + lient\x20is\x20registering\x20v4,\x20v6\x20or\x20both\n\n\r\n\x05\x04\ + \x0c\x02\x0c\x04\x12\x04\x90\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x0c\x05\ + \x12\x04\x90\x02\r\x11\n\r\n\x05\x04\x0c\x02\x0c\x01\x12\x04\x90\x02\x12\ + \x1c\n\r\n\x05\x04\x0c\x02\x0c\x03\x12\x04\x90\x02\x1f!\n\x0c\n\x04\x04\ + \x0c\x02\r\x12\x04\x91\x02\x04\"\n\r\n\x05\x04\x0c\x02\r\x04\x12\x04\x91\ + \x02\x04\x0c\n\r\n\x05\x04\x0c\x02\r\x05\x12\x04\x91\x02\r\x11\n\r\n\x05\ + \x04\x0c\x02\r\x01\x12\x04\x91\x02\x12\x1c\n\r\n\x05\x04\x0c\x02\r\x03\ + \x12\x04\x91\x02\x1f!\nD\n\x04\x04\x0c\x02\x0e\x12\x04\x94\x02\x04*\x1a6\ + \x20A\x20collection\x20of\x20optional\x20flags\x20for\x20the\x20registra\ + tion.\n\n\r\n\x05\x04\x0c\x02\x0e\x04\x12\x04\x94\x02\x04\x0c\n\r\n\x05\ + \x04\x0c\x02\x0e\x06\x12\x04\x94\x02\r\x1e\n\r\n\x05\x04\x0c\x02\x0e\x01\ + \x12\x04\x94\x02\x1f$\n\r\n\x05\x04\x0c\x02\x0e\x03\x12\x04\x94\x02')\nq\ + \n\x04\x04\x0c\x02\x0f\x12\x04\x98\x02\x04-\x1ac\x20Transport\x20Extensi\ + ons\n\x20TODO(jmwample)\x20-\x20move\x20to\x20WebRTC\x20specific\x20tran\ + sport\x20params\x20protobuf\x20message.\n\n\r\n\x05\x04\x0c\x02\x0f\x04\ + \x12\x04\x98\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x0f\x06\x12\x04\x98\x02\r\ + \x19\n\r\n\x05\x04\x0c\x02\x0f\x01\x12\x04\x98\x02\x1a'\n\r\n\x05\x04\ + \x0c\x02\x0f\x03\x12\x04\x98\x02*,\nG\n\x04\x04\x0c\x02\x10\x12\x04\x9b\ + \x02\x04!\x1a9\x20Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\ + \x20fingerprinting.\n\n\r\n\x05\x04\x0c\x02\x10\x04\x12\x04\x9b\x02\x04\ + \x0c\n\r\n\x05\x04\x0c\x02\x10\x05\x12\x04\x9b\x02\r\x12\n\r\n\x05\x04\ + \x0c\x02\x10\x01\x12\x04\x9b\x02\x13\x1a\n\r\n\x05\x04\x0c\x02\x10\x03\ + \x12\x04\x9b\x02\x1d\x20\n\x0c\n\x02\x04\r\x12\x06\x9f\x02\0\xb0\x02\x01\ + \n\x0b\n\x03\x04\r\x01\x12\x04\x9f\x02\x08\x1d\n!\n\x04\x04\r\x02\0\x12\ + \x04\xa1\x02\x04!\x1a\x13\x20Prefix\x20Identifier\n\n\r\n\x05\x04\r\x02\ + \0\x04\x12\x04\xa1\x02\x04\x0c\n\r\n\x05\x04\r\x02\0\x05\x12\x04\xa1\x02\ + \r\x12\n\r\n\x05\x04\r\x02\0\x01\x12\x04\xa1\x02\x13\x1c\n\r\n\x05\x04\r\ + \x02\0\x03\x12\x04\xa1\x02\x1f\x20\n\xc4\x01\n\x04\x04\r\x02\x01\x12\x04\ + \xa5\x02\x04\x1e\x1a\xb5\x01\x20Prefix\x20bytes\x20(optional\x20-\x20usu\ + ally\x20sent\x20from\x20station\x20to\x20client\x20as\x20override\x20if\ + \x20allowed\x20by\x20C2S)\n\x20as\x20the\x20station\x20cannot\x20take\ + \x20this\x20into\x20account\x20when\x20attempting\x20to\x20identify\x20a\ + \x20connection.\n\n\r\n\x05\x04\r\x02\x01\x04\x12\x04\xa5\x02\x04\x0c\n\ + \r\n\x05\x04\r\x02\x01\x05\x12\x04\xa5\x02\r\x12\n\r\n\x05\x04\r\x02\x01\ + \x01\x12\x04\xa5\x02\x13\x19\n\r\n\x05\x04\r\x02\x01\x03\x12\x04\xa5\x02\ + \x1c\x1d\n\xed\x02\n\x04\x04\r\x02\x02\x12\x04\xaf\x02\x04*\x1a\xbc\x01\ + \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ + \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ + \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ + ion\x20port\x20randomization\x20is\n\x20supported.\n2\x9f\x01\x20//\x20p\ + otential\x20future\x20fields\n\x20obfuscator\x20ID\n\x20tagEncoder\x20ID\ + \x20(¶ms?,\x20e.g.\x20format-base64\x20/\x20padding)\n\x20streamEnco\ + der\x20ID\x20(¶ms?,\x20e.g.\x20foramat-base64\x20/\x20padding)\n\n\r\ + \n\x05\x04\r\x02\x02\x04\x12\x04\xaf\x02\x04\x0c\n\r\n\x05\x04\r\x02\x02\ + \x05\x12\x04\xaf\x02\r\x11\n\r\n\x05\x04\r\x02\x02\x01\x12\x04\xaf\x02\ + \x12$\n\r\n\x05\x04\r\x02\x02\x03\x12\x04\xaf\x02')\n\x0c\n\x02\x04\x0e\ + \x12\x06\xb2\x02\0\xb7\x02\x01\n\x0b\n\x03\x04\x0e\x01\x12\x04\xb2\x02\ + \x08\x1e\n\xcb\x01\n\x04\x04\x0e\x02\0\x12\x04\xb6\x02\x04*\x1a\xbc\x01\ + \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ + \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ + \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ + ion\x20port\x20randomization\x20is\n\x20supported.\n\n\r\n\x05\x04\x0e\ + \x02\0\x04\x12\x04\xb6\x02\x04\x0c\n\r\n\x05\x04\x0e\x02\0\x05\x12\x04\ + \xb6\x02\r\x11\n\r\n\x05\x04\x0e\x02\0\x01\x12\x04\xb6\x02\x12$\n\r\n\ + \x05\x04\x0e\x02\0\x03\x12\x04\xb6\x02')\n\x0c\n\x02\x05\x06\x12\x06\xb9\ + \x02\0\xc1\x02\x01\n\x0b\n\x03\x05\x06\x01\x12\x04\xb9\x02\x05\x17\n\x0c\ + \n\x04\x05\x06\x02\0\x12\x04\xba\x02\x02\x12\n\r\n\x05\x05\x06\x02\0\x01\ + \x12\x04\xba\x02\x02\r\n\r\n\x05\x05\x06\x02\0\x02\x12\x04\xba\x02\x10\ + \x11\n\x0c\n\x04\x05\x06\x02\x01\x12\x04\xbb\x02\x08\x15\n\r\n\x05\x05\ + \x06\x02\x01\x01\x12\x04\xbb\x02\x08\x10\n\r\n\x05\x05\x06\x02\x01\x02\ + \x12\x04\xbb\x02\x13\x14\n\x0c\n\x04\x05\x06\x02\x02\x12\x04\xbc\x02\x08\ + \x10\n\r\n\x05\x05\x06\x02\x02\x01\x12\x04\xbc\x02\x08\x0b\n\r\n\x05\x05\ + \x06\x02\x02\x02\x12\x04\xbc\x02\x0e\x0f\n\x0c\n\x04\x05\x06\x02\x03\x12\ + \x04\xbd\x02\x02\x16\n\r\n\x05\x05\x06\x02\x03\x01\x12\x04\xbd\x02\x02\ + \x11\n\r\n\x05\x05\x06\x02\x03\x02\x12\x04\xbd\x02\x14\x15\n\x0c\n\x04\ + \x05\x06\x02\x04\x12\x04\xbe\x02\x02\x17\n\r\n\x05\x05\x06\x02\x04\x01\ + \x12\x04\xbe\x02\x02\x12\n\r\n\x05\x05\x06\x02\x04\x02\x12\x04\xbe\x02\ + \x15\x16\n\x0c\n\x04\x05\x06\x02\x05\x12\x04\xbf\x02\x02\n\n\r\n\x05\x05\ + \x06\x02\x05\x01\x12\x04\xbf\x02\x02\x05\n\r\n\x05\x05\x06\x02\x05\x02\ + \x12\x04\xbf\x02\x08\t\n\x0c\n\x04\x05\x06\x02\x06\x12\x04\xc0\x02\x02\ + \x17\n\r\n\x05\x05\x06\x02\x06\x01\x12\x04\xc0\x02\x02\x12\n\r\n\x05\x05\ + \x06\x02\x06\x02\x12\x04\xc0\x02\x15\x16\n\x0c\n\x02\x04\x0f\x12\x06\xc3\ + \x02\0\xdb\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\x04\xc3\x02\x08\x12\n\x0c\ + \n\x04\x04\x0f\x02\0\x12\x04\xc4\x02\x02#\n\r\n\x05\x04\x0f\x02\0\x04\ + \x12\x04\xc4\x02\x02\n\n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\xc4\x02\x0b\ + \x10\n\r\n\x05\x04\x0f\x02\0\x01\x12\x04\xc4\x02\x11\x1e\n\r\n\x05\x04\ + \x0f\x02\0\x03\x12\x04\xc4\x02!\"\n\x0c\n\x04\x04\x0f\x02\x01\x12\x04\ + \xc5\x02\x024\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\xc5\x02\x02\n\n\r\n\ + \x05\x04\x0f\x02\x01\x06\x12\x04\xc5\x02\x0b\x1a\n\r\n\x05\x04\x0f\x02\ + \x01\x01\x12\x04\xc5\x02\x1b/\n\r\n\x05\x04\x0f\x02\x01\x03\x12\x04\xc5\ + \x0223\n\x0c\n\x04\x04\x0f\x02\x02\x12\x04\xc6\x02\x026\n\r\n\x05\x04\ + \x0f\x02\x02\x04\x12\x04\xc6\x02\x02\n\n\r\n\x05\x04\x0f\x02\x02\x06\x12\ + \x04\xc6\x02\x0b\x1d\n\r\n\x05\x04\x0f\x02\x02\x01\x12\x04\xc6\x02\x1e1\ + \n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xc6\x0245\nC\n\x04\x04\x0f\x02\ + \x03\x12\x04\xc9\x02\x02*\x1a5\x20client\x20source\x20address\x20when\ + \x20receiving\x20a\x20registration\n\n\r\n\x05\x04\x0f\x02\x03\x04\x12\ + \x04\xc9\x02\x02\n\n\r\n\x05\x04\x0f\x02\x03\x05\x12\x04\xc9\x02\x0b\x10\ + \n\r\n\x05\x04\x0f\x02\x03\x01\x12\x04\xc9\x02\x11%\n\r\n\x05\x04\x0f\ + \x02\x03\x03\x12\x04\xc9\x02()\nH\n\x04\x04\x0f\x02\x04\x12\x04\xcc\x02\ + \x02#\x1a:\x20Decoy\x20address\x20used\x20when\x20registering\x20over\ + \x20Decoy\x20registrar\n\n\r\n\x05\x04\x0f\x02\x04\x04\x12\x04\xcc\x02\ + \x02\n\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\xcc\x02\x0b\x10\n\r\n\x05\ + \x04\x0f\x02\x04\x01\x12\x04\xcc\x02\x11\x1e\n\r\n\x05\x04\x0f\x02\x04\ + \x03\x12\x04\xcc\x02!\"\n\xeb\x05\n\x04\x04\x0f\x02\x05\x12\x04\xd8\x02\ + \x02:\x1a\xdc\x05\x20The\x20next\x20three\x20fields\x20allow\x20an\x20in\ + dependent\x20registrar\x20(trusted\x20by\x20a\x20station\x20w/\x20a\x20z\ + mq\x20keypair)\x20to\n\x20share\x20the\x20registration\x20overrides\x20t\ + hat\x20it\x20assigned\x20to\x20the\x20client\x20with\x20the\x20station(s\ + ).\n\x20Registration\x20Respose\x20is\x20here\x20to\x20allow\x20a\x20par\ + sed\x20object\x20with\x20direct\x20access\x20to\x20the\x20fields\x20with\ + in.\n\x20RegRespBytes\x20provides\x20a\x20serialized\x20verion\x20of\x20\ + the\x20Registration\x20response\x20so\x20that\x20the\x20signature\x20of\ + \n\x20the\x20Bidirectional\x20registrar\x20can\x20be\x20validated\x20bef\ + ore\x20a\x20station\x20applies\x20any\x20overrides\x20present\x20in\n\ + \x20the\x20Registration\x20Response.\n\n\x20If\x20you\x20are\x20reading\ + \x20this\x20in\x20the\x20future\x20and\x20you\x20want\x20to\x20extend\ + \x20the\x20functionality\x20here\x20it\x20might\n\x20make\x20sense\x20to\ + \x20make\x20the\x20RegistrationResponse\x20that\x20is\x20sent\x20to\x20t\ + he\x20client\x20a\x20distinct\x20message\x20from\n\x20the\x20one\x20that\ + \x20gets\x20sent\x20to\x20the\x20stations.\n\n\r\n\x05\x04\x0f\x02\x05\ + \x04\x12\x04\xd8\x02\x02\n\n\r\n\x05\x04\x0f\x02\x05\x06\x12\x04\xd8\x02\ + \x0b\x1f\n\r\n\x05\x04\x0f\x02\x05\x01\x12\x04\xd8\x02\x205\n\r\n\x05\ + \x04\x0f\x02\x05\x03\x12\x04\xd8\x0289\n\x0c\n\x04\x04\x0f\x02\x06\x12\ + \x04\xd9\x02\x02\"\n\r\n\x05\x04\x0f\x02\x06\x04\x12\x04\xd9\x02\x02\n\n\ + \r\n\x05\x04\x0f\x02\x06\x05\x12\x04\xd9\x02\x0b\x10\n\r\n\x05\x04\x0f\ + \x02\x06\x01\x12\x04\xd9\x02\x11\x1d\n\r\n\x05\x04\x0f\x02\x06\x03\x12\ + \x04\xd9\x02\x20!\n\x0c\n\x04\x04\x0f\x02\x07\x12\x04\xda\x02\x02'\n\r\n\ + \x05\x04\x0f\x02\x07\x04\x12\x04\xda\x02\x02\n\n\r\n\x05\x04\x0f\x02\x07\ + \x05\x12\x04\xda\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x07\x01\x12\x04\xda\ + \x02\x11!\n\r\n\x05\x04\x0f\x02\x07\x03\x12\x04\xda\x02$&\n\x0c\n\x02\ + \x04\x10\x12\x06\xdd\x02\0\xe9\x02\x01\n\x0b\n\x03\x04\x10\x01\x12\x04\ + \xdd\x02\x08\x14\n9\n\x04\x04\x10\x02\0\x12\x04\xde\x02\x04.\"+\x20how\ + \x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\x05\x04\ + \x10\x02\0\x04\x12\x04\xde\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\x05\x12\ + \x04\xde\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xde\x02\x14(\n\r\ + \n\x05\x04\x10\x02\0\x03\x12\x04\xde\x02+-\nm\n\x04\x04\x10\x02\x01\x12\ + \x04\xe3\x02\x04/\x1a\x1e\x20Applicable\x20to\x20whole\x20session:\n\"\ + \x1a\x20includes\x20failed\x20attempts\n2#\x20Timings\x20below\x20are\ + \x20in\x20milliseconds\n\n\r\n\x05\x04\x10\x02\x01\x04\x12\x04\xe3\x02\ + \x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xe3\x02\r\x13\n\r\n\x05\ + \x04\x10\x02\x01\x01\x12\x04\xe3\x02\x14)\n\r\n\x05\x04\x10\x02\x01\x03\ + \x12\x04\xe3\x02,.\nR\n\x04\x04\x10\x02\x02\x12\x04\xe6\x02\x04(\x1a\x1f\ + \x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20during\ + \x20initial\x20handshake\n\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xe6\x02\ + \x04\x0c\n\r\n\x05\x04\x10\x02\x02\x05\x12\x04\xe6\x02\r\x13\n\r\n\x05\ + \x04\x10\x02\x02\x01\x12\x04\xe6\x02\x14\"\n\r\n\x05\x04\x10\x02\x02\x03\ + \x12\x04\xe6\x02%'\n%\n\x04\x04\x10\x02\x03\x12\x04\xe7\x02\x04&\"\x17\ + \x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x10\x02\x03\x04\x12\ + \x04\xe7\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x05\x12\x04\xe7\x02\r\x13\ + \n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xe7\x02\x14\x20\n\r\n\x05\x04\x10\ + \x02\x03\x03\x12\x04\xe7\x02#%\nB\n\x04\x04\x10\x02\x04\x12\x04\xe8\x02\ + \x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\x20to\ + \x20decot\n\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xe8\x02\x04\x0c\n\r\n\ + \x05\x04\x10\x02\x04\x05\x12\x04\xe8\x02\r\x13\n\r\n\x05\x04\x10\x02\x04\ + \x01\x12\x04\xe8\x02\x14\x20\n\r\n\x05\x04\x10\x02\x04\x03\x12\x04\xe8\ + \x02#%\n\x0c\n\x02\x05\x07\x12\x06\xeb\x02\0\xf0\x02\x01\n\x0b\n\x03\x05\ + \x07\x01\x12\x04\xeb\x02\x05\x16\n\x0c\n\x04\x05\x07\x02\0\x12\x04\xec\ + \x02\x04\x10\n\r\n\x05\x05\x07\x02\0\x01\x12\x04\xec\x02\x04\x0b\n\r\n\ + \x05\x05\x07\x02\0\x02\x12\x04\xec\x02\x0e\x0f\n\x0c\n\x04\x05\x07\x02\ + \x01\x12\x04\xed\x02\x04\x0c\n\r\n\x05\x05\x07\x02\x01\x01\x12\x04\xed\ + \x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\x02\x12\x04\xed\x02\n\x0b\n\x0c\n\ + \x04\x05\x07\x02\x02\x12\x04\xee\x02\x04\x0f\n\r\n\x05\x05\x07\x02\x02\ + \x01\x12\x04\xee\x02\x04\n\n\r\n\x05\x05\x07\x02\x02\x02\x12\x04\xee\x02\ + \r\x0e\n\x0c\n\x04\x05\x07\x02\x03\x12\x04\xef\x02\x04\x0e\n\r\n\x05\x05\ + \x07\x02\x03\x01\x12\x04\xef\x02\x04\t\n\r\n\x05\x05\x07\x02\x03\x02\x12\ + \x04\xef\x02\x0c\r\n\x0c\n\x02\x05\x08\x12\x06\xf2\x02\0\xf6\x02\x01\n\ + \x0b\n\x03\x05\x08\x01\x12\x04\xf2\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\0\ + \x12\x04\xf3\x02\x04\x0c\n\r\n\x05\x05\x08\x02\0\x01\x12\x04\xf3\x02\x04\ + \x07\n\r\n\x05\x05\x08\x02\0\x02\x12\x04\xf3\x02\n\x0b\n\x0c\n\x04\x05\ + \x08\x02\x01\x12\x04\xf4\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\x12\ + \x04\xf4\x02\x04\x07\n\r\n\x05\x05\x08\x02\x01\x02\x12\x04\xf4\x02\n\x0b\ + \n\x0c\n\x04\x05\x08\x02\x02\x12\x04\xf5\x02\x04\x0c\n\r\n\x05\x05\x08\ + \x02\x02\x01\x12\x04\xf5\x02\x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\x12\ + \x04\xf5\x02\n\x0b\n\x0c\n\x02\x04\x11\x12\x06\xf8\x02\0\x83\x03\x01\n\ + \x0b\n\x03\x04\x11\x01\x12\x04\xf8\x02\x08\x19\n\x0c\n\x04\x04\x11\x02\0\ + \x12\x04\xf9\x02\x04#\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xf9\x02\x04\ + \x0c\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xf9\x02\r\x13\n\r\n\x05\x04\x11\ + \x02\0\x01\x12\x04\xf9\x02\x14\x1e\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\ + \xf9\x02!\"\n\x0c\n\x04\x04\x11\x02\x01\x12\x04\xfa\x02\x04\"\n\r\n\x05\ + \x04\x11\x02\x01\x04\x12\x04\xfa\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x01\ + \x05\x12\x04\xfa\x02\r\x13\n\r\n\x05\x04\x11\x02\x01\x01\x12\x04\xfa\x02\ + \x14\x1d\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xfa\x02\x20!\n\x0c\n\x04\ + \x04\x11\x02\x02\x12\x04\xfc\x02\x04#\n\r\n\x05\x04\x11\x02\x02\x04\x12\ + \x04\xfc\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xfc\x02\r\x13\ + \n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xfc\x02\x14\x1e\n\r\n\x05\x04\x11\ + \x02\x02\x03\x12\x04\xfc\x02!\"\n\x0c\n\x04\x04\x11\x02\x03\x12\x04\xfe\ + \x02\x04-\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xfe\x02\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x03\x06\x12\x04\xfe\x02\r\x1e\n\r\n\x05\x04\x11\x02\x03\ + \x01\x12\x04\xfe\x02\x1f(\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\xfe\x02+\ + ,\n\x0c\n\x04\x04\x11\x02\x04\x12\x04\x80\x03\x04\"\n\r\n\x05\x04\x11\ + \x02\x04\x04\x12\x04\x80\x03\x04\x0c\n\r\n\x05\x04\x11\x02\x04\x05\x12\ + \x04\x80\x03\r\x13\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\x80\x03\x14\x1c\ + \n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\x80\x03\x1f!\n\x0c\n\x04\x04\x11\ + \x02\x05\x12\x04\x81\x03\x04\"\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\x81\ + \x03\x04\x0c\n\r\n\x05\x04\x11\x02\x05\x05\x12\x04\x81\x03\r\x13\n\r\n\ + \x05\x04\x11\x02\x05\x01\x12\x04\x81\x03\x14\x1c\n\r\n\x05\x04\x11\x02\ + \x05\x03\x12\x04\x81\x03\x1f!\n\x0c\n\x04\x04\x11\x02\x06\x12\x04\x82\ + \x03\x04\x20\n\r\n\x05\x04\x11\x02\x06\x04\x12\x04\x82\x03\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x06\x06\x12\x04\x82\x03\r\x14\n\r\n\x05\x04\x11\x02\x06\ + \x01\x12\x04\x82\x03\x15\x1a\n\r\n\x05\x04\x11\x02\x06\x03\x12\x04\x82\ + \x03\x1d\x1f\nT\n\x02\x04\x12\x12\x06\x86\x03\0\x9a\x03\x01\x1aF\x20Addi\ + ng\x20message\x20response\x20from\x20Station\x20to\x20Client\x20for\x20b\ + idirectional\x20API\n\n\x0b\n\x03\x04\x12\x01\x12\x04\x86\x03\x08\x1c\n\ + \x0c\n\x04\x04\x12\x02\0\x12\x04\x87\x03\x02\x20\n\r\n\x05\x04\x12\x02\0\ + \x04\x12\x04\x87\x03\x02\n\n\r\n\x05\x04\x12\x02\0\x05\x12\x04\x87\x03\ + \x0b\x12\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\x87\x03\x13\x1b\n\r\n\x05\ + \x04\x12\x02\0\x03\x12\x04\x87\x03\x1e\x1f\n?\n\x04\x04\x12\x02\x01\x12\ + \x04\x89\x03\x02\x1e\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\ + \x20network\x20byte\x20order\n\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\x89\ + \x03\x02\n\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\x89\x03\x0b\x10\n\r\n\ + \x05\x04\x12\x02\x01\x01\x12\x04\x89\x03\x11\x19\n\r\n\x05\x04\x12\x02\ + \x01\x03\x12\x04\x89\x03\x1c\x1d\n,\n\x04\x04\x12\x02\x02\x12\x04\x8c\ + \x03\x02\x1f\x1a\x1e\x20Respond\x20with\x20randomized\x20port\n\n\r\n\ + \x05\x04\x12\x02\x02\x04\x12\x04\x8c\x03\x02\n\n\r\n\x05\x04\x12\x02\x02\ + \x05\x12\x04\x8c\x03\x0b\x11\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\x8c\ + \x03\x12\x1a\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\x8c\x03\x1d\x1e\nd\n\ + \x04\x04\x12\x02\x03\x12\x04\x90\x03\x02\"\x1aV\x20Future:\x20station\ + \x20provides\x20client\x20with\x20secret,\x20want\x20chanel\x20present\n\ + \x20Leave\x20null\x20for\x20now\n\n\r\n\x05\x04\x12\x02\x03\x04\x12\x04\ + \x90\x03\x02\n\n\r\n\x05\x04\x12\x02\x03\x05\x12\x04\x90\x03\x0b\x10\n\r\ + \n\x05\x04\x12\x02\x03\x01\x12\x04\x90\x03\x11\x1d\n\r\n\x05\x04\x12\x02\ + \x03\x03\x12\x04\x90\x03\x20!\nA\n\x04\x04\x12\x02\x04\x12\x04\x93\x03\ + \x02\x1c\x1a3\x20If\x20registration\x20wrong,\x20populate\x20this\x20err\ + or\x20string\n\n\r\n\x05\x04\x12\x02\x04\x04\x12\x04\x93\x03\x02\n\n\r\n\ + \x05\x04\x12\x02\x04\x05\x12\x04\x93\x03\x0b\x11\n\r\n\x05\x04\x12\x02\ + \x04\x01\x12\x04\x93\x03\x12\x17\n\r\n\x05\x04\x12\x02\x04\x03\x12\x04\ + \x93\x03\x1a\x1b\n+\n\x04\x04\x12\x02\x05\x12\x04\x96\x03\x02%\x1a\x1d\ + \x20ClientConf\x20field\x20(optional)\n\n\r\n\x05\x04\x12\x02\x05\x04\ + \x12\x04\x96\x03\x02\n\n\r\n\x05\x04\x12\x02\x05\x06\x12\x04\x96\x03\x0b\ + \x15\n\r\n\x05\x04\x12\x02\x05\x01\x12\x04\x96\x03\x16\x20\n\r\n\x05\x04\ + \x12\x02\x05\x03\x12\x04\x96\x03#$\nJ\n\x04\x04\x12\x02\x06\x12\x04\x99\ + \x03\x025\x1a<\x20Transport\x20Params\x20to\x20if\x20`allow_registrar_ov\ + errides`\x20is\x20set.\n\n\r\n\x05\x04\x12\x02\x06\x04\x12\x04\x99\x03\ + \x02\n\n\r\n\x05\x04\x12\x02\x06\x06\x12\x04\x99\x03\x0b\x1e\n\r\n\x05\ + \x04\x12\x02\x06\x01\x12\x04\x99\x03\x1f/\n\r\n\x05\x04\x12\x02\x06\x03\ + \x12\x04\x99\x0324\n!\n\x02\x04\x13\x12\x06\x9d\x03\0\xa1\x03\x01\x1a\ + \x13\x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x13\x01\x12\x04\x9d\ + \x03\x08\x13\n\x0c\n\x04\x04\x13\x02\0\x12\x04\x9e\x03\x04\x1e\n\r\n\x05\ + \x04\x13\x02\0\x04\x12\x04\x9e\x03\x04\x0c\n\r\n\x05\x04\x13\x02\0\x05\ + \x12\x04\x9e\x03\r\x11\n\r\n\x05\x04\x13\x02\0\x01\x12\x04\x9e\x03\x12\ + \x19\n\r\n\x05\x04\x13\x02\0\x03\x12\x04\x9e\x03\x1c\x1d\n\x0c\n\x04\x04\ + \x13\x02\x01\x12\x04\x9f\x03\x04*\n\r\n\x05\x04\x13\x02\x01\x04\x12\x04\ + \x9f\x03\x04\x0c\n\r\n\x05\x04\x13\x02\x01\x05\x12\x04\x9f\x03\r\x11\n\r\ + \n\x05\x04\x13\x02\x01\x01\x12\x04\x9f\x03\x12%\n\r\n\x05\x04\x13\x02\ + \x01\x03\x12\x04\x9f\x03()\n\x0c\n\x04\x04\x13\x02\x02\x12\x04\xa0\x03\ + \x04=\n\r\n\x05\x04\x13\x02\x02\x04\x12\x04\xa0\x03\x04\x0c\n\r\n\x05\ + \x04\x13\x02\x02\x06\x12\x04\xa0\x03\r!\n\r\n\x05\x04\x13\x02\x02\x01\ + \x12\x04\xa0\x03\"8\n\r\n\x05\x04\x13\x02\x02\x03\x12\x04\xa0\x03;<\ "; /// `FileDescriptorProto` object which was a source for this generated file @@ -6821,7 +7319,7 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(1); deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(19); + let mut messages = ::std::vec::Vec::with_capacity(20); messages.push(PubKey::generated_message_descriptor_data()); messages.push(TLSDecoySpec::generated_message_descriptor_data()); messages.push(ClientConf::generated_message_descriptor_data()); @@ -6835,6 +7333,7 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { messages.push(StationToClient::generated_message_descriptor_data()); messages.push(RegistrationFlags::generated_message_descriptor_data()); messages.push(ClientToStation::generated_message_descriptor_data()); + messages.push(PrefixTransportParams::generated_message_descriptor_data()); messages.push(GenericTransportParams::generated_message_descriptor_data()); messages.push(C2SWrapper::generated_message_descriptor_data()); messages.push(SessionStats::generated_message_descriptor_data()); diff --git a/src/signalling.rs b/src/signalling.rs index 2430d065..6a5c31b1 100644 --- a/src/signalling.rs +++ b/src/signalling.rs @@ -26,16 +26,16 @@ const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.PubKey) +// @@protoc_insertion_point(message:conjure.PubKey) pub struct PubKey { // message fields /// A public key, as used by the station. - // @@protoc_insertion_point(field:tapdance.PubKey.key) + // @@protoc_insertion_point(field:conjure.PubKey.key) pub key: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.PubKey.type) + // @@protoc_insertion_point(field:conjure.PubKey.type) pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:tapdance.PubKey.special_fields) + // @@protoc_insertion_point(special_field:conjure.PubKey.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -86,7 +86,7 @@ impl PubKey { self.key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .tapdance.KeyType type = 2; + // optional .conjure.KeyType type = 2; pub fn type_(&self) -> KeyType { match self.type_ { @@ -225,37 +225,37 @@ impl ::protobuf::reflect::ProtobufValue for PubKey { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.TLSDecoySpec) +// @@protoc_insertion_point(message:conjure.TLSDecoySpec) pub struct TLSDecoySpec { // message fields /// The hostname/SNI to use for this host /// /// The hostname is the only required field, although other /// fields are expected to be present in most cases. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.hostname) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.hostname) pub hostname: ::std::option::Option<::std::string::String>, /// The 32-bit ipv4 address, in network byte order /// /// If the IPv4 address is absent, then it may be resolved via /// DNS by the client, or the client may discard this decoy spec /// if local DNS is untrusted, or the service may be multihomed. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv4addr) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv6addr) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// The Tapdance station public key to use when contacting this /// decoy /// /// If omitted, the default station public key (if any) is used. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.pubkey) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.pubkey) pub pubkey: ::protobuf::MessageField, /// The maximum duration, in milliseconds, to maintain an open /// connection to this decoy (because the decoy may close the /// connection itself after this length of time) /// /// If omitted, a default of 30,000 milliseconds is assumed. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.timeout) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.timeout) pub timeout: ::std::option::Option, /// The maximum TCP window size to attempt to use for this decoy. /// @@ -264,10 +264,10 @@ pub struct TLSDecoySpec { /// TODO: the default is based on the current heuristic of only /// using decoys that permit windows of 15KB or larger. If this /// heuristic changes, then this default doesn't make sense. - // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.tcpwin) + // @@protoc_insertion_point(field:conjure.TLSDecoySpec.tcpwin) pub tcpwin: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.TLSDecoySpec.special_fields) + // @@protoc_insertion_point(special_field:conjure.TLSDecoySpec.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -593,21 +593,23 @@ impl ::protobuf::reflect::ProtobufValue for TLSDecoySpec { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.ClientConf) +// @@protoc_insertion_point(message:conjure.ClientConf) pub struct ClientConf { // message fields - // @@protoc_insertion_point(field:tapdance.ClientConf.decoy_list) + // @@protoc_insertion_point(field:conjure.ClientConf.decoy_list) pub decoy_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.ClientConf.generation) + // @@protoc_insertion_point(field:conjure.ClientConf.generation) pub generation: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.ClientConf.default_pubkey) + // @@protoc_insertion_point(field:conjure.ClientConf.default_pubkey) pub default_pubkey: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.ClientConf.phantom_subnets_list) + // @@protoc_insertion_point(field:conjure.ClientConf.phantom_subnets_list) pub phantom_subnets_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.ClientConf.conjure_pubkey) + // @@protoc_insertion_point(field:conjure.ClientConf.conjure_pubkey) pub conjure_pubkey: ::protobuf::MessageField, + // @@protoc_insertion_point(field:conjure.ClientConf.dns_reg_conf) + pub dns_reg_conf: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:tapdance.ClientConf.special_fields) + // @@protoc_insertion_point(special_field:conjure.ClientConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -642,7 +644,7 @@ impl ClientConf { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); + let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, DecoyList>( "decoy_list", @@ -669,6 +671,11 @@ impl ClientConf { |m: &ClientConf| { &m.conjure_pubkey }, |m: &mut ClientConf| { &mut m.conjure_pubkey }, )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, DnsRegConf>( + "dns_reg_conf", + |m: &ClientConf| { &m.dns_reg_conf }, + |m: &mut ClientConf| { &mut m.dns_reg_conf }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ClientConf", fields, @@ -681,6 +688,31 @@ impl ::protobuf::Message for ClientConf { const NAME: &'static str = "ClientConf"; fn is_initialized(&self) -> bool { + for v in &self.decoy_list { + if !v.is_initialized() { + return false; + } + }; + for v in &self.default_pubkey { + if !v.is_initialized() { + return false; + } + }; + for v in &self.phantom_subnets_list { + if !v.is_initialized() { + return false; + } + }; + for v in &self.conjure_pubkey { + if !v.is_initialized() { + return false; + } + }; + for v in &self.dns_reg_conf { + if !v.is_initialized() { + return false; + } + }; true } @@ -702,6 +734,9 @@ impl ::protobuf::Message for ClientConf { 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.conjure_pubkey)?; }, + 50 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.dns_reg_conf)?; + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -733,6 +768,10 @@ impl ::protobuf::Message for ClientConf { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.dns_reg_conf.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -754,6 +793,9 @@ impl ::protobuf::Message for ClientConf { if let Some(v) = self.conjure_pubkey.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } + if let Some(v) = self.dns_reg_conf.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -776,6 +818,7 @@ impl ::protobuf::Message for ClientConf { self.default_pubkey.clear(); self.phantom_subnets_list.clear(); self.conjure_pubkey.clear(); + self.dns_reg_conf.clear(); self.special_fields.clear(); } @@ -786,6 +829,7 @@ impl ::protobuf::Message for ClientConf { default_pubkey: ::protobuf::MessageField::none(), phantom_subnets_list: ::protobuf::MessageField::none(), conjure_pubkey: ::protobuf::MessageField::none(), + dns_reg_conf: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -811,27 +855,23 @@ impl ::protobuf::reflect::ProtobufValue for ClientConf { /// Configuration for DNS registrar #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.DnsRegConf) +// @@protoc_insertion_point(message:conjure.DnsRegConf) pub struct DnsRegConf { // message fields - // @@protoc_insertion_point(field:tapdance.DnsRegConf.dns_reg_method) + // @@protoc_insertion_point(field:conjure.DnsRegConf.dns_reg_method) pub dns_reg_method: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.udp_addr) - pub udp_addr: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.dot_addr) - pub dot_addr: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.doh_url) - pub doh_url: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.domain) + // @@protoc_insertion_point(field:conjure.DnsRegConf.target) + pub target: ::std::option::Option<::std::string::String>, + // @@protoc_insertion_point(field:conjure.DnsRegConf.domain) pub domain: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.pubkey) + // @@protoc_insertion_point(field:conjure.DnsRegConf.pubkey) pub pubkey: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.utls_distribution) + // @@protoc_insertion_point(field:conjure.DnsRegConf.utls_distribution) pub utls_distribution: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.DnsRegConf.stun_server) + // @@protoc_insertion_point(field:conjure.DnsRegConf.stun_server) pub stun_server: ::std::option::Option<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:tapdance.DnsRegConf.special_fields) + // @@protoc_insertion_point(special_field:conjure.DnsRegConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -846,7 +886,7 @@ impl DnsRegConf { ::std::default::Default::default() } - // required .tapdance.DnsRegMethod dns_reg_method = 1; + // required .conjure.DnsRegMethod dns_reg_method = 1; pub fn dns_reg_method(&self) -> DnsRegMethod { match self.dns_reg_method { @@ -868,115 +908,43 @@ impl DnsRegConf { self.dns_reg_method = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } - // optional string udp_addr = 2; + // optional string target = 2; - pub fn udp_addr(&self) -> &str { - match self.udp_addr.as_ref() { + pub fn target(&self) -> &str { + match self.target.as_ref() { Some(v) => v, None => "", } } - pub fn clear_udp_addr(&mut self) { - self.udp_addr = ::std::option::Option::None; + pub fn clear_target(&mut self) { + self.target = ::std::option::Option::None; } - pub fn has_udp_addr(&self) -> bool { - self.udp_addr.is_some() + pub fn has_target(&self) -> bool { + self.target.is_some() } // Param is passed by value, moved - pub fn set_udp_addr(&mut self, v: ::std::string::String) { - self.udp_addr = ::std::option::Option::Some(v); + pub fn set_target(&mut self, v: ::std::string::String) { + self.target = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. - pub fn mut_udp_addr(&mut self) -> &mut ::std::string::String { - if self.udp_addr.is_none() { - self.udp_addr = ::std::option::Option::Some(::std::string::String::new()); + pub fn mut_target(&mut self) -> &mut ::std::string::String { + if self.target.is_none() { + self.target = ::std::option::Option::Some(::std::string::String::new()); } - self.udp_addr.as_mut().unwrap() + self.target.as_mut().unwrap() } // Take field - pub fn take_udp_addr(&mut self) -> ::std::string::String { - self.udp_addr.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string dot_addr = 3; - - pub fn dot_addr(&self) -> &str { - match self.dot_addr.as_ref() { - Some(v) => v, - None => "", - } + pub fn take_target(&mut self) -> ::std::string::String { + self.target.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn clear_dot_addr(&mut self) { - self.dot_addr = ::std::option::Option::None; - } - - pub fn has_dot_addr(&self) -> bool { - self.dot_addr.is_some() - } - - // Param is passed by value, moved - pub fn set_dot_addr(&mut self, v: ::std::string::String) { - self.dot_addr = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_dot_addr(&mut self) -> &mut ::std::string::String { - if self.dot_addr.is_none() { - self.dot_addr = ::std::option::Option::Some(::std::string::String::new()); - } - self.dot_addr.as_mut().unwrap() - } - - // Take field - pub fn take_dot_addr(&mut self) -> ::std::string::String { - self.dot_addr.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string doh_url = 4; - - pub fn doh_url(&self) -> &str { - match self.doh_url.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_doh_url(&mut self) { - self.doh_url = ::std::option::Option::None; - } - - pub fn has_doh_url(&self) -> bool { - self.doh_url.is_some() - } - - // Param is passed by value, moved - pub fn set_doh_url(&mut self, v: ::std::string::String) { - self.doh_url = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_doh_url(&mut self) -> &mut ::std::string::String { - if self.doh_url.is_none() { - self.doh_url = ::std::option::Option::Some(::std::string::String::new()); - } - self.doh_url.as_mut().unwrap() - } - - // Take field - pub fn take_doh_url(&mut self) -> ::std::string::String { - self.doh_url.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // required string domain = 5; + // required string domain = 3; pub fn domain(&self) -> &str { match self.domain.as_ref() { @@ -1012,7 +980,7 @@ impl DnsRegConf { self.domain.take().unwrap_or_else(|| ::std::string::String::new()) } - // optional bytes pubkey = 6; + // optional bytes pubkey = 4; pub fn pubkey(&self) -> &[u8] { match self.pubkey.as_ref() { @@ -1048,7 +1016,7 @@ impl DnsRegConf { self.pubkey.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional string utls_distribution = 7; + // optional string utls_distribution = 5; pub fn utls_distribution(&self) -> &str { match self.utls_distribution.as_ref() { @@ -1084,7 +1052,7 @@ impl DnsRegConf { self.utls_distribution.take().unwrap_or_else(|| ::std::string::String::new()) } - // optional string stun_server = 8; + // optional string stun_server = 6; pub fn stun_server(&self) -> &str { match self.stun_server.as_ref() { @@ -1121,7 +1089,7 @@ impl DnsRegConf { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); + let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "dns_reg_method", @@ -1129,19 +1097,9 @@ impl DnsRegConf { |m: &mut DnsRegConf| { &mut m.dns_reg_method }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "udp_addr", - |m: &DnsRegConf| { &m.udp_addr }, - |m: &mut DnsRegConf| { &mut m.udp_addr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "dot_addr", - |m: &DnsRegConf| { &m.dot_addr }, - |m: &mut DnsRegConf| { &mut m.dot_addr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "doh_url", - |m: &DnsRegConf| { &m.doh_url }, - |m: &mut DnsRegConf| { &mut m.doh_url }, + "target", + |m: &DnsRegConf| { &m.target }, + |m: &mut DnsRegConf| { &mut m.target }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "domain", @@ -1191,24 +1149,18 @@ impl ::protobuf::Message for DnsRegConf { self.dns_reg_method = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, 18 => { - self.udp_addr = ::std::option::Option::Some(is.read_string()?); + self.target = ::std::option::Option::Some(is.read_string()?); }, 26 => { - self.dot_addr = ::std::option::Option::Some(is.read_string()?); - }, - 34 => { - self.doh_url = ::std::option::Option::Some(is.read_string()?); - }, - 42 => { self.domain = ::std::option::Option::Some(is.read_string()?); }, - 50 => { + 34 => { self.pubkey = ::std::option::Option::Some(is.read_bytes()?); }, - 58 => { + 42 => { self.utls_distribution = ::std::option::Option::Some(is.read_string()?); }, - 66 => { + 50 => { self.stun_server = ::std::option::Option::Some(is.read_string()?); }, tag => { @@ -1226,26 +1178,20 @@ impl ::protobuf::Message for DnsRegConf { if let Some(v) = self.dns_reg_method { my_size += ::protobuf::rt::int32_size(1, v.value()); } - if let Some(v) = self.udp_addr.as_ref() { + if let Some(v) = self.target.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } - if let Some(v) = self.dot_addr.as_ref() { - my_size += ::protobuf::rt::string_size(3, &v); - } - if let Some(v) = self.doh_url.as_ref() { - my_size += ::protobuf::rt::string_size(4, &v); - } if let Some(v) = self.domain.as_ref() { - my_size += ::protobuf::rt::string_size(5, &v); + my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.pubkey.as_ref() { - my_size += ::protobuf::rt::bytes_size(6, &v); + my_size += ::protobuf::rt::bytes_size(4, &v); } if let Some(v) = self.utls_distribution.as_ref() { - my_size += ::protobuf::rt::string_size(7, &v); + my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.stun_server.as_ref() { - my_size += ::protobuf::rt::string_size(8, &v); + my_size += ::protobuf::rt::string_size(6, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); @@ -1256,26 +1202,20 @@ impl ::protobuf::Message for DnsRegConf { if let Some(v) = self.dns_reg_method { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; } - if let Some(v) = self.udp_addr.as_ref() { + if let Some(v) = self.target.as_ref() { os.write_string(2, v)?; } - if let Some(v) = self.dot_addr.as_ref() { - os.write_string(3, v)?; - } - if let Some(v) = self.doh_url.as_ref() { - os.write_string(4, v)?; - } if let Some(v) = self.domain.as_ref() { - os.write_string(5, v)?; + os.write_string(3, v)?; } if let Some(v) = self.pubkey.as_ref() { - os.write_bytes(6, v)?; + os.write_bytes(4, v)?; } if let Some(v) = self.utls_distribution.as_ref() { - os.write_string(7, v)?; + os.write_string(5, v)?; } if let Some(v) = self.stun_server.as_ref() { - os.write_string(8, v)?; + os.write_string(6, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) @@ -1295,9 +1235,7 @@ impl ::protobuf::Message for DnsRegConf { fn clear(&mut self) { self.dns_reg_method = ::std::option::Option::None; - self.udp_addr = ::std::option::Option::None; - self.dot_addr = ::std::option::Option::None; - self.doh_url = ::std::option::Option::None; + self.target = ::std::option::Option::None; self.domain = ::std::option::Option::None; self.pubkey = ::std::option::Option::None; self.utls_distribution = ::std::option::Option::None; @@ -1308,9 +1246,7 @@ impl ::protobuf::Message for DnsRegConf { fn default_instance() -> &'static DnsRegConf { static instance: DnsRegConf = DnsRegConf { dns_reg_method: ::std::option::Option::None, - udp_addr: ::std::option::Option::None, - dot_addr: ::std::option::Option::None, - doh_url: ::std::option::Option::None, + target: ::std::option::Option::None, domain: ::std::option::Option::None, pubkey: ::std::option::Option::None, utls_distribution: ::std::option::Option::None, @@ -1339,13 +1275,13 @@ impl ::protobuf::reflect::ProtobufValue for DnsRegConf { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.DecoyList) +// @@protoc_insertion_point(message:conjure.DecoyList) pub struct DecoyList { // message fields - // @@protoc_insertion_point(field:tapdance.DecoyList.tls_decoys) + // @@protoc_insertion_point(field:conjure.DecoyList.tls_decoys) pub tls_decoys: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:tapdance.DecoyList.special_fields) + // @@protoc_insertion_point(special_field:conjure.DecoyList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1462,13 +1398,13 @@ impl ::protobuf::reflect::ProtobufValue for DecoyList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.PhantomSubnetsList) +// @@protoc_insertion_point(message:conjure.PhantomSubnetsList) pub struct PhantomSubnetsList { // message fields - // @@protoc_insertion_point(field:tapdance.PhantomSubnetsList.weighted_subnets) + // @@protoc_insertion_point(field:conjure.PhantomSubnetsList.weighted_subnets) pub weighted_subnets: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:tapdance.PhantomSubnetsList.special_fields) + // @@protoc_insertion_point(special_field:conjure.PhantomSubnetsList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1585,15 +1521,15 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnetsList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.PhantomSubnets) +// @@protoc_insertion_point(message:conjure.PhantomSubnets) pub struct PhantomSubnets { // message fields - // @@protoc_insertion_point(field:tapdance.PhantomSubnets.weight) + // @@protoc_insertion_point(field:conjure.PhantomSubnets.weight) pub weight: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.PhantomSubnets.subnets) + // @@protoc_insertion_point(field:conjure.PhantomSubnets.subnets) pub subnets: ::std::vec::Vec<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:tapdance.PhantomSubnets.special_fields) + // @@protoc_insertion_point(special_field:conjure.PhantomSubnets.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1745,19 +1681,19 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnets { /// Deflated ICE Candidate by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.WebRTCICECandidate) +// @@protoc_insertion_point(message:conjure.WebRTCICECandidate) pub struct WebRTCICECandidate { // message fields /// IP is represented in its 16-byte form - // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_upper) + // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_upper) pub ip_upper: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_lower) + // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_lower) pub ip_lower: ::std::option::Option, /// Composed info includes port, tcptype (unset if not tcp), candidate type (host, srflx, prflx), protocol (TCP/UDP), and component (RTP/RTCP) - // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.composed_info) + // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.composed_info) pub composed_info: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.WebRTCICECandidate.special_fields) + // @@protoc_insertion_point(special_field:conjure.WebRTCICECandidate.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1972,15 +1908,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCICECandidate { /// Deflated SDP for WebRTC by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.WebRTCSDP) +// @@protoc_insertion_point(message:conjure.WebRTCSDP) pub struct WebRTCSDP { // message fields - // @@protoc_insertion_point(field:tapdance.WebRTCSDP.type) + // @@protoc_insertion_point(field:conjure.WebRTCSDP.type) pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.WebRTCSDP.candidates) + // @@protoc_insertion_point(field:conjure.WebRTCSDP.candidates) pub candidates: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:tapdance.WebRTCSDP.special_fields) + // @@protoc_insertion_point(special_field:conjure.WebRTCSDP.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2141,15 +2077,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSDP { /// WebRTCSignal includes a deflated SDP and a seed #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.WebRTCSignal) +// @@protoc_insertion_point(message:conjure.WebRTCSignal) pub struct WebRTCSignal { // message fields - // @@protoc_insertion_point(field:tapdance.WebRTCSignal.seed) + // @@protoc_insertion_point(field:conjure.WebRTCSignal.seed) pub seed: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.WebRTCSignal.sdp) + // @@protoc_insertion_point(field:conjure.WebRTCSignal.sdp) pub sdp: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:tapdance.WebRTCSignal.special_fields) + // @@protoc_insertion_point(special_field:conjure.WebRTCSignal.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2329,34 +2265,34 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSignal { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.StationToClient) +// @@protoc_insertion_point(message:conjure.StationToClient) pub struct StationToClient { // message fields /// Should accompany (at least) SESSION_INIT and CONFIRM_RECONNECT. - // @@protoc_insertion_point(field:tapdance.StationToClient.protocol_version) + // @@protoc_insertion_point(field:conjure.StationToClient.protocol_version) pub protocol_version: ::std::option::Option, /// There might be a state transition. May be absent; absence should be /// treated identically to NO_CHANGE. - // @@protoc_insertion_point(field:tapdance.StationToClient.state_transition) + // @@protoc_insertion_point(field:conjure.StationToClient.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The station can send client config info piggybacked /// on any message, as it sees fit - // @@protoc_insertion_point(field:tapdance.StationToClient.config_info) + // @@protoc_insertion_point(field:conjure.StationToClient.config_info) pub config_info: ::protobuf::MessageField, /// If state_transition == S2C_ERROR, this field is the explanation. - // @@protoc_insertion_point(field:tapdance.StationToClient.err_reason) + // @@protoc_insertion_point(field:conjure.StationToClient.err_reason) pub err_reason: ::std::option::Option<::protobuf::EnumOrUnknown>, /// Signals client to stop connecting for following amount of seconds - // @@protoc_insertion_point(field:tapdance.StationToClient.tmp_backoff) + // @@protoc_insertion_point(field:conjure.StationToClient.tmp_backoff) pub tmp_backoff: ::std::option::Option, /// Sent in SESSION_INIT, identifies the station that picked up - // @@protoc_insertion_point(field:tapdance.StationToClient.station_id) + // @@protoc_insertion_point(field:conjure.StationToClient.station_id) pub station_id: ::std::option::Option<::std::string::String>, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:tapdance.StationToClient.padding) + // @@protoc_insertion_point(field:conjure.StationToClient.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:tapdance.StationToClient.special_fields) + // @@protoc_insertion_point(special_field:conjure.StationToClient.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2390,7 +2326,7 @@ impl StationToClient { self.protocol_version = ::std::option::Option::Some(v); } - // optional .tapdance.S2C_Transition state_transition = 2; + // optional .conjure.S2C_Transition state_transition = 2; pub fn state_transition(&self) -> S2C_Transition { match self.state_transition { @@ -2412,7 +2348,7 @@ impl StationToClient { self.state_transition = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } - // optional .tapdance.ErrorReasonS2C err_reason = 4; + // optional .conjure.ErrorReasonS2C err_reason = 4; pub fn err_reason(&self) -> ErrorReasonS2C { match self.err_reason { @@ -2575,6 +2511,11 @@ impl ::protobuf::Message for StationToClient { const NAME: &'static str = "StationToClient"; fn is_initialized(&self) -> bool { + for v in &self.config_info { + if !v.is_initialized() { + return false; + } + }; true } @@ -2723,21 +2664,21 @@ impl ::protobuf::reflect::ProtobufValue for StationToClient { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.RegistrationFlags) +// @@protoc_insertion_point(message:conjure.RegistrationFlags) pub struct RegistrationFlags { // message fields - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.upload_only) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.upload_only) pub upload_only: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.dark_decoy) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.dark_decoy) pub dark_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.proxy_header) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.proxy_header) pub proxy_header: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.use_TIL) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.use_TIL) pub use_TIL: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.RegistrationFlags.prescanned) + // @@protoc_insertion_point(field:conjure.RegistrationFlags.prescanned) pub prescanned: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.RegistrationFlags.special_fields) + // @@protoc_insertion_point(special_field:conjure.RegistrationFlags.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3012,36 +2953,41 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationFlags { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.ClientToStation) +// @@protoc_insertion_point(message:conjure.ClientToStation) pub struct ClientToStation { // message fields - // @@protoc_insertion_point(field:tapdance.ClientToStation.protocol_version) + // @@protoc_insertion_point(field:conjure.ClientToStation.protocol_version) pub protocol_version: ::std::option::Option, /// The client reports its decoy list's version number here, which the /// station can use to decide whether to send an updated one. The station /// should always send a list if this field is set to 0. - // @@protoc_insertion_point(field:tapdance.ClientToStation.decoy_list_generation) + // @@protoc_insertion_point(field:conjure.ClientToStation.decoy_list_generation) pub decoy_list_generation: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.ClientToStation.state_transition) + // @@protoc_insertion_point(field:conjure.ClientToStation.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The position in the overall session's upload sequence where the current /// YIELD=>ACQUIRE switchover is happening. - // @@protoc_insertion_point(field:tapdance.ClientToStation.upload_sync) + // @@protoc_insertion_point(field:conjure.ClientToStation.upload_sync) pub upload_sync: ::std::option::Option, /// High level client library version used for indicating feature support, or /// lack therof. - // @@protoc_insertion_point(field:tapdance.ClientToStation.client_lib_version) + // @@protoc_insertion_point(field:conjure.ClientToStation.client_lib_version) pub client_lib_version: ::std::option::Option, + /// Indicates whether the client will allow the registrar to provide alternative parameters that + /// may work better in substitute for the deterministically selected parameters. This only works + /// for bidirectional registration methods where the client receives a RegistrationResponse. + // @@protoc_insertion_point(field:conjure.ClientToStation.allow_registrar_overrides) + pub allow_registrar_overrides: ::std::option::Option, /// List of decoys that client have unsuccessfully tried in current session. /// Could be sent in chunks - // @@protoc_insertion_point(field:tapdance.ClientToStation.failed_decoys) + // @@protoc_insertion_point(field:conjure.ClientToStation.failed_decoys) pub failed_decoys: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.ClientToStation.stats) + // @@protoc_insertion_point(field:conjure.ClientToStation.stats) pub stats: ::protobuf::MessageField, /// NullTransport, MinTransport, Obfs4Transport, etc. Transport type we want from phantom proxy - // @@protoc_insertion_point(field:tapdance.ClientToStation.transport) + // @@protoc_insertion_point(field:conjure.ClientToStation.transport) pub transport: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:tapdance.ClientToStation.transport_params) + // @@protoc_insertion_point(field:conjure.ClientToStation.transport_params) pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, /// Station is only required to check this variable during session initialization. /// If set, station must facilitate connection to said target by itself, i.e. write into squid @@ -3049,28 +2995,28 @@ pub struct ClientToStation { /// covert_address must have exactly one ':' colon, that separates host (literal IP address or /// resolvable hostname) and port /// TODO: make it required for initialization, and stop connecting any client straight to squid? - // @@protoc_insertion_point(field:tapdance.ClientToStation.covert_address) + // @@protoc_insertion_point(field:conjure.ClientToStation.covert_address) pub covert_address: ::std::option::Option<::std::string::String>, /// Used in dark decoys to signal which dark decoy it will connect to. - // @@protoc_insertion_point(field:tapdance.ClientToStation.masked_decoy_server_name) + // @@protoc_insertion_point(field:conjure.ClientToStation.masked_decoy_server_name) pub masked_decoy_server_name: ::std::option::Option<::std::string::String>, /// Used to indicate to server if client is registering v4, v6 or both - // @@protoc_insertion_point(field:tapdance.ClientToStation.v6_support) + // @@protoc_insertion_point(field:conjure.ClientToStation.v6_support) pub v6_support: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.ClientToStation.v4_support) + // @@protoc_insertion_point(field:conjure.ClientToStation.v4_support) pub v4_support: ::std::option::Option, /// A collection of optional flags for the registration. - // @@protoc_insertion_point(field:tapdance.ClientToStation.flags) + // @@protoc_insertion_point(field:conjure.ClientToStation.flags) pub flags: ::protobuf::MessageField, /// Transport Extensions /// TODO(jmwample) - move to WebRTC specific transport params protobuf message. - // @@protoc_insertion_point(field:tapdance.ClientToStation.webrtc_signal) + // @@protoc_insertion_point(field:conjure.ClientToStation.webrtc_signal) pub webrtc_signal: ::protobuf::MessageField, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:tapdance.ClientToStation.padding) + // @@protoc_insertion_point(field:conjure.ClientToStation.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:tapdance.ClientToStation.special_fields) + // @@protoc_insertion_point(special_field:conjure.ClientToStation.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3123,7 +3069,7 @@ impl ClientToStation { self.decoy_list_generation = ::std::option::Option::Some(v); } - // optional .tapdance.C2S_Transition state_transition = 3; + // optional .conjure.C2S_Transition state_transition = 3; pub fn state_transition(&self) -> C2S_Transition { match self.state_transition { @@ -3183,7 +3129,26 @@ impl ClientToStation { self.client_lib_version = ::std::option::Option::Some(v); } - // optional .tapdance.TransportType transport = 12; + // optional bool allow_registrar_overrides = 6; + + pub fn allow_registrar_overrides(&self) -> bool { + self.allow_registrar_overrides.unwrap_or(false) + } + + pub fn clear_allow_registrar_overrides(&mut self) { + self.allow_registrar_overrides = ::std::option::Option::None; + } + + pub fn has_allow_registrar_overrides(&self) -> bool { + self.allow_registrar_overrides.is_some() + } + + // Param is passed by value, moved + pub fn set_allow_registrar_overrides(&mut self, v: bool) { + self.allow_registrar_overrides = ::std::option::Option::Some(v); + } + + // optional .conjure.TransportType transport = 12; pub fn transport(&self) -> TransportType { match self.transport { @@ -3352,7 +3317,7 @@ impl ClientToStation { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(16); + let mut fields = ::std::vec::Vec::with_capacity(17); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "protocol_version", @@ -3379,6 +3344,11 @@ impl ClientToStation { |m: &ClientToStation| { &m.client_lib_version }, |m: &mut ClientToStation| { &mut m.client_lib_version }, )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "allow_registrar_overrides", + |m: &ClientToStation| { &m.allow_registrar_overrides }, + |m: &mut ClientToStation| { &mut m.allow_registrar_overrides }, + )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "failed_decoys", |m: &ClientToStation| { &m.failed_decoys }, @@ -3487,6 +3457,9 @@ impl ::protobuf::Message for ClientToStation { 40 => { self.client_lib_version = ::std::option::Option::Some(is.read_uint32()?); }, + 48 => { + self.allow_registrar_overrides = ::std::option::Option::Some(is.read_bool()?); + }, 82 => { self.failed_decoys.push(is.read_string()?); }, @@ -3547,6 +3520,9 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { my_size += ::protobuf::rt::uint32_size(5, v); } + if let Some(v) = self.allow_registrar_overrides { + my_size += 1 + 1; + } for value in &self.failed_decoys { my_size += ::protobuf::rt::string_size(10, &value); }; @@ -3605,6 +3581,9 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { os.write_uint32(5, v)?; } + if let Some(v) = self.allow_registrar_overrides { + os.write_bool(6, v)?; + } for v in &self.failed_decoys { os.write_string(10, &v)?; }; @@ -3660,6 +3639,7 @@ impl ::protobuf::Message for ClientToStation { self.state_transition = ::std::option::Option::None; self.upload_sync = ::std::option::Option::None; self.client_lib_version = ::std::option::Option::None; + self.allow_registrar_overrides = ::std::option::Option::None; self.failed_decoys.clear(); self.stats.clear(); self.transport = ::std::option::Option::None; @@ -3681,6 +3661,7 @@ impl ::protobuf::Message for ClientToStation { state_transition: ::std::option::Option::None, upload_sync: ::std::option::Option::None, client_lib_version: ::std::option::Option::None, + allow_registrar_overrides: ::std::option::Option::None, failed_decoys: ::std::vec::Vec::new(), stats: ::protobuf::MessageField::none(), transport: ::std::option::Option::None, @@ -3716,16 +3697,254 @@ impl ::protobuf::reflect::ProtobufValue for ClientToStation { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.GenericTransportParams) +// @@protoc_insertion_point(message:conjure.PrefixTransportParams) +pub struct PrefixTransportParams { + // message fields + /// Prefix Identifier + // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix_id) + pub prefix_id: ::std::option::Option, + /// Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) + /// as the station cannot take this into account when attempting to identify a connection. + // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix) + pub prefix: ::std::option::Option<::std::vec::Vec>, + /// Indicates whether the client has elected to use destination port randomization. Should be + /// checked against selected transport to ensure that destination port randomization is + /// supported. + // @@protoc_insertion_point(field:conjure.PrefixTransportParams.randomize_dst_port) + pub randomize_dst_port: ::std::option::Option, + // special fields + // @@protoc_insertion_point(special_field:conjure.PrefixTransportParams.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a PrefixTransportParams { + fn default() -> &'a PrefixTransportParams { + ::default_instance() + } +} + +impl PrefixTransportParams { + pub fn new() -> PrefixTransportParams { + ::std::default::Default::default() + } + + // optional int32 prefix_id = 1; + + pub fn prefix_id(&self) -> i32 { + self.prefix_id.unwrap_or(0) + } + + pub fn clear_prefix_id(&mut self) { + self.prefix_id = ::std::option::Option::None; + } + + pub fn has_prefix_id(&self) -> bool { + self.prefix_id.is_some() + } + + // Param is passed by value, moved + pub fn set_prefix_id(&mut self, v: i32) { + self.prefix_id = ::std::option::Option::Some(v); + } + + // optional bytes prefix = 2; + + pub fn prefix(&self) -> &[u8] { + match self.prefix.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_prefix(&mut self) { + self.prefix = ::std::option::Option::None; + } + + pub fn has_prefix(&self) -> bool { + self.prefix.is_some() + } + + // Param is passed by value, moved + pub fn set_prefix(&mut self, v: ::std::vec::Vec) { + self.prefix = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_prefix(&mut self) -> &mut ::std::vec::Vec { + if self.prefix.is_none() { + self.prefix = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.prefix.as_mut().unwrap() + } + + // Take field + pub fn take_prefix(&mut self) -> ::std::vec::Vec { + self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bool randomize_dst_port = 13; + + pub fn randomize_dst_port(&self) -> bool { + self.randomize_dst_port.unwrap_or(false) + } + + pub fn clear_randomize_dst_port(&mut self) { + self.randomize_dst_port = ::std::option::Option::None; + } + + pub fn has_randomize_dst_port(&self) -> bool { + self.randomize_dst_port.is_some() + } + + // Param is passed by value, moved + pub fn set_randomize_dst_port(&mut self, v: bool) { + self.randomize_dst_port = ::std::option::Option::Some(v); + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "prefix_id", + |m: &PrefixTransportParams| { &m.prefix_id }, + |m: &mut PrefixTransportParams| { &mut m.prefix_id }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "prefix", + |m: &PrefixTransportParams| { &m.prefix }, + |m: &mut PrefixTransportParams| { &mut m.prefix }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "randomize_dst_port", + |m: &PrefixTransportParams| { &m.randomize_dst_port }, + |m: &mut PrefixTransportParams| { &mut m.randomize_dst_port }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "PrefixTransportParams", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for PrefixTransportParams { + const NAME: &'static str = "PrefixTransportParams"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 8 => { + self.prefix_id = ::std::option::Option::Some(is.read_int32()?); + }, + 18 => { + self.prefix = ::std::option::Option::Some(is.read_bytes()?); + }, + 104 => { + self.randomize_dst_port = ::std::option::Option::Some(is.read_bool()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if let Some(v) = self.prefix_id { + my_size += ::protobuf::rt::int32_size(1, v); + } + if let Some(v) = self.prefix.as_ref() { + my_size += ::protobuf::rt::bytes_size(2, &v); + } + if let Some(v) = self.randomize_dst_port { + my_size += 1 + 1; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if let Some(v) = self.prefix_id { + os.write_int32(1, v)?; + } + if let Some(v) = self.prefix.as_ref() { + os.write_bytes(2, v)?; + } + if let Some(v) = self.randomize_dst_port { + os.write_bool(13, v)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> PrefixTransportParams { + PrefixTransportParams::new() + } + + fn clear(&mut self) { + self.prefix_id = ::std::option::Option::None; + self.prefix = ::std::option::Option::None; + self.randomize_dst_port = ::std::option::Option::None; + self.special_fields.clear(); + } + + fn default_instance() -> &'static PrefixTransportParams { + static instance: PrefixTransportParams = PrefixTransportParams { + prefix_id: ::std::option::Option::None, + prefix: ::std::option::Option::None, + randomize_dst_port: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for PrefixTransportParams { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("PrefixTransportParams").unwrap()).clone() + } +} + +impl ::std::fmt::Display for PrefixTransportParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for PrefixTransportParams { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +#[derive(PartialEq,Clone,Default,Debug)] +// @@protoc_insertion_point(message:conjure.GenericTransportParams) pub struct GenericTransportParams { // message fields - /// Indicates whether the client has elected to use destination port - /// randomization. Should be checked against selected transport to ensure - /// that destination port randomization is supported. - // @@protoc_insertion_point(field:tapdance.GenericTransportParams.randomize_dst_port) + /// Indicates whether the client has elected to use destination port randomization. Should be + /// checked against selected transport to ensure that destination port randomization is + /// supported. + // @@protoc_insertion_point(field:conjure.GenericTransportParams.randomize_dst_port) pub randomize_dst_port: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.GenericTransportParams.special_fields) + // @@protoc_insertion_point(special_field:conjure.GenericTransportParams.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3860,25 +4079,39 @@ impl ::protobuf::reflect::ProtobufValue for GenericTransportParams { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.C2SWrapper) +// @@protoc_insertion_point(message:conjure.C2SWrapper) pub struct C2SWrapper { // message fields - // @@protoc_insertion_point(field:tapdance.C2SWrapper.shared_secret) + // @@protoc_insertion_point(field:conjure.C2SWrapper.shared_secret) pub shared_secret: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_payload) + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_payload) pub registration_payload: ::protobuf::MessageField, - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_source) + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_source) pub registration_source: ::std::option::Option<::protobuf::EnumOrUnknown>, /// client source address when receiving a registration - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_address) + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_address) pub registration_address: ::std::option::Option<::std::vec::Vec>, /// Decoy address used when registering over Decoy registrar - // @@protoc_insertion_point(field:tapdance.C2SWrapper.decoy_address) + // @@protoc_insertion_point(field:conjure.C2SWrapper.decoy_address) pub decoy_address: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_response) + /// The next three fields allow an independent registrar (trusted by a station w/ a zmq keypair) to + /// share the registration overrides that it assigned to the client with the station(s). + /// Registration Respose is here to allow a parsed object with direct access to the fields within. + /// RegRespBytes provides a serialized verion of the Registration response so that the signature of + /// the Bidirectional registrar can be validated before a station applies any overrides present in + /// the Registration Response. + /// + /// If you are reading this in the future and you want to extend the functionality here it might + /// make sense to make the RegistrationResponse that is sent to the client a distinct message from + /// the one that gets sent to the stations. + // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_response) pub registration_response: ::protobuf::MessageField, + // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespBytes) + pub RegRespBytes: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespSignature) + pub RegRespSignature: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:tapdance.C2SWrapper.special_fields) + // @@protoc_insertion_point(special_field:conjure.C2SWrapper.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3929,7 +4162,7 @@ impl C2SWrapper { self.shared_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .tapdance.RegistrationSource registration_source = 4; + // optional .conjure.RegistrationSource registration_source = 4; pub fn registration_source(&self) -> RegistrationSource { match self.registration_source { @@ -4023,8 +4256,80 @@ impl C2SWrapper { self.decoy_address.take().unwrap_or_else(|| ::std::vec::Vec::new()) } + // optional bytes RegRespBytes = 9; + + pub fn RegRespBytes(&self) -> &[u8] { + match self.RegRespBytes.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_RegRespBytes(&mut self) { + self.RegRespBytes = ::std::option::Option::None; + } + + pub fn has_RegRespBytes(&self) -> bool { + self.RegRespBytes.is_some() + } + + // Param is passed by value, moved + pub fn set_RegRespBytes(&mut self, v: ::std::vec::Vec) { + self.RegRespBytes = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_RegRespBytes(&mut self) -> &mut ::std::vec::Vec { + if self.RegRespBytes.is_none() { + self.RegRespBytes = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.RegRespBytes.as_mut().unwrap() + } + + // Take field + pub fn take_RegRespBytes(&mut self) -> ::std::vec::Vec { + self.RegRespBytes.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + + // optional bytes RegRespSignature = 10; + + pub fn RegRespSignature(&self) -> &[u8] { + match self.RegRespSignature.as_ref() { + Some(v) => v, + None => &[], + } + } + + pub fn clear_RegRespSignature(&mut self) { + self.RegRespSignature = ::std::option::Option::None; + } + + pub fn has_RegRespSignature(&self) -> bool { + self.RegRespSignature.is_some() + } + + // Param is passed by value, moved + pub fn set_RegRespSignature(&mut self, v: ::std::vec::Vec) { + self.RegRespSignature = ::std::option::Option::Some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_RegRespSignature(&mut self) -> &mut ::std::vec::Vec { + if self.RegRespSignature.is_none() { + self.RegRespSignature = ::std::option::Option::Some(::std::vec::Vec::new()); + } + self.RegRespSignature.as_mut().unwrap() + } + + // Take field + pub fn take_RegRespSignature(&mut self) -> ::std::vec::Vec { + self.RegRespSignature.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); + let mut fields = ::std::vec::Vec::with_capacity(8); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "shared_secret", @@ -4056,6 +4361,16 @@ impl C2SWrapper { |m: &C2SWrapper| { &m.registration_response }, |m: &mut C2SWrapper| { &mut m.registration_response }, )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "RegRespBytes", + |m: &C2SWrapper| { &m.RegRespBytes }, + |m: &mut C2SWrapper| { &mut m.RegRespBytes }, + )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "RegRespSignature", + |m: &C2SWrapper| { &m.RegRespSignature }, + |m: &mut C2SWrapper| { &mut m.RegRespSignature }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "C2SWrapper", fields, @@ -4102,6 +4417,12 @@ impl ::protobuf::Message for C2SWrapper { 66 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.registration_response)?; }, + 74 => { + self.RegRespBytes = ::std::option::Option::Some(is.read_bytes()?); + }, + 82 => { + self.RegRespSignature = ::std::option::Option::Some(is.read_bytes()?); + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -4134,6 +4455,12 @@ impl ::protobuf::Message for C2SWrapper { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.RegRespBytes.as_ref() { + my_size += ::protobuf::rt::bytes_size(9, &v); + } + if let Some(v) = self.RegRespSignature.as_ref() { + my_size += ::protobuf::rt::bytes_size(10, &v); + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -4158,6 +4485,12 @@ impl ::protobuf::Message for C2SWrapper { if let Some(v) = self.registration_response.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; } + if let Some(v) = self.RegRespBytes.as_ref() { + os.write_bytes(9, v)?; + } + if let Some(v) = self.RegRespSignature.as_ref() { + os.write_bytes(10, v)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4181,6 +4514,8 @@ impl ::protobuf::Message for C2SWrapper { self.registration_address = ::std::option::Option::None; self.decoy_address = ::std::option::Option::None; self.registration_response.clear(); + self.RegRespBytes = ::std::option::Option::None; + self.RegRespSignature = ::std::option::Option::None; self.special_fields.clear(); } @@ -4192,6 +4527,8 @@ impl ::protobuf::Message for C2SWrapper { registration_address: ::std::option::Option::None, decoy_address: ::std::option::Option::None, registration_response: ::protobuf::MessageField::none(), + RegRespBytes: ::std::option::Option::None, + RegRespSignature: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -4216,23 +4553,23 @@ impl ::protobuf::reflect::ProtobufValue for C2SWrapper { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.SessionStats) +// @@protoc_insertion_point(message:conjure.SessionStats) pub struct SessionStats { // message fields - // @@protoc_insertion_point(field:tapdance.SessionStats.failed_decoys_amount) + // @@protoc_insertion_point(field:conjure.SessionStats.failed_decoys_amount) pub failed_decoys_amount: ::std::option::Option, /// Applicable to whole session: - // @@protoc_insertion_point(field:tapdance.SessionStats.total_time_to_connect) + // @@protoc_insertion_point(field:conjure.SessionStats.total_time_to_connect) pub total_time_to_connect: ::std::option::Option, /// Last (i.e. successful) decoy: - // @@protoc_insertion_point(field:tapdance.SessionStats.rtt_to_station) + // @@protoc_insertion_point(field:conjure.SessionStats.rtt_to_station) pub rtt_to_station: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.SessionStats.tls_to_decoy) + // @@protoc_insertion_point(field:conjure.SessionStats.tls_to_decoy) pub tls_to_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.SessionStats.tcp_to_decoy) + // @@protoc_insertion_point(field:conjure.SessionStats.tcp_to_decoy) pub tcp_to_decoy: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:tapdance.SessionStats.special_fields) + // @@protoc_insertion_point(special_field:conjure.SessionStats.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4507,25 +4844,25 @@ impl ::protobuf::reflect::ProtobufValue for SessionStats { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.StationToDetector) +// @@protoc_insertion_point(message:conjure.StationToDetector) pub struct StationToDetector { // message fields - // @@protoc_insertion_point(field:tapdance.StationToDetector.phantom_ip) + // @@protoc_insertion_point(field:conjure.StationToDetector.phantom_ip) pub phantom_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.StationToDetector.client_ip) + // @@protoc_insertion_point(field:conjure.StationToDetector.client_ip) pub client_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:tapdance.StationToDetector.timeout_ns) + // @@protoc_insertion_point(field:conjure.StationToDetector.timeout_ns) pub timeout_ns: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.StationToDetector.operation) + // @@protoc_insertion_point(field:conjure.StationToDetector.operation) pub operation: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:tapdance.StationToDetector.dst_port) + // @@protoc_insertion_point(field:conjure.StationToDetector.dst_port) pub dst_port: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.StationToDetector.src_port) + // @@protoc_insertion_point(field:conjure.StationToDetector.src_port) pub src_port: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.StationToDetector.proto) + // @@protoc_insertion_point(field:conjure.StationToDetector.proto) pub proto: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:tapdance.StationToDetector.special_fields) + // @@protoc_insertion_point(special_field:conjure.StationToDetector.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4631,7 +4968,7 @@ impl StationToDetector { self.timeout_ns = ::std::option::Option::Some(v); } - // optional .tapdance.StationOperations operation = 4; + // optional .conjure.StationOperations operation = 4; pub fn operation(&self) -> StationOperations { match self.operation { @@ -4691,7 +5028,7 @@ impl StationToDetector { self.src_port = ::std::option::Option::Some(v); } - // optional .tapdance.IPProto proto = 12; + // optional .conjure.IPProto proto = 12; pub fn proto(&self) -> IPProto { match self.proto { @@ -4911,29 +5248,32 @@ impl ::protobuf::reflect::ProtobufValue for StationToDetector { /// Adding message response from Station to Client for bidirectional API #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.RegistrationResponse) +// @@protoc_insertion_point(message:conjure.RegistrationResponse) pub struct RegistrationResponse { // message fields - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv4addr) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv6addr) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// Respond with randomized port - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.dst_port) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.dst_port) pub dst_port: ::std::option::Option, /// Future: station provides client with secret, want chanel present /// Leave null for now - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.serverRandom) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.serverRandom) pub serverRandom: ::std::option::Option<::std::vec::Vec>, /// If registration wrong, populate this error string - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.error) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.error) pub error: ::std::option::Option<::std::string::String>, /// ClientConf field (optional) - // @@protoc_insertion_point(field:tapdance.RegistrationResponse.clientConf) + // @@protoc_insertion_point(field:conjure.RegistrationResponse.clientConf) pub clientConf: ::protobuf::MessageField, + /// Transport Params to if `allow_registrar_overrides` is set. + // @@protoc_insertion_point(field:conjure.RegistrationResponse.transport_params) + pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, // special fields - // @@protoc_insertion_point(special_field:tapdance.RegistrationResponse.special_fields) + // @@protoc_insertion_point(special_field:conjure.RegistrationResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5095,7 +5435,7 @@ impl RegistrationResponse { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); + let mut fields = ::std::vec::Vec::with_capacity(7); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "ipv4addr", @@ -5127,6 +5467,11 @@ impl RegistrationResponse { |m: &RegistrationResponse| { &m.clientConf }, |m: &mut RegistrationResponse| { &mut m.clientConf }, )); + fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( + "transport_params", + |m: &RegistrationResponse| { &m.transport_params }, + |m: &mut RegistrationResponse| { &mut m.transport_params }, + )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RegistrationResponse", fields, @@ -5139,6 +5484,16 @@ impl ::protobuf::Message for RegistrationResponse { const NAME: &'static str = "RegistrationResponse"; fn is_initialized(&self) -> bool { + for v in &self.clientConf { + if !v.is_initialized() { + return false; + } + }; + for v in &self.transport_params { + if !v.is_initialized() { + return false; + } + }; true } @@ -5163,6 +5518,9 @@ impl ::protobuf::Message for RegistrationResponse { 50 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.clientConf)?; }, + 82 => { + ::protobuf::rt::read_singular_message_into_field(is, &mut self.transport_params)?; + }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -5194,6 +5552,10 @@ impl ::protobuf::Message for RegistrationResponse { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } + if let Some(v) = self.transport_params.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -5218,6 +5580,9 @@ impl ::protobuf::Message for RegistrationResponse { if let Some(v) = self.clientConf.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; } + if let Some(v) = self.transport_params.as_ref() { + ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; + } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -5241,6 +5606,7 @@ impl ::protobuf::Message for RegistrationResponse { self.serverRandom = ::std::option::Option::None; self.error = ::std::option::Option::None; self.clientConf.clear(); + self.transport_params.clear(); self.special_fields.clear(); } @@ -5252,6 +5618,7 @@ impl ::protobuf::Message for RegistrationResponse { serverRandom: ::std::option::Option::None, error: ::std::option::Option::None, clientConf: ::protobuf::MessageField::none(), + transport_params: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -5277,17 +5644,17 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationResponse { /// response from dns #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:tapdance.DnsResponse) +// @@protoc_insertion_point(message:conjure.DnsResponse) pub struct DnsResponse { // message fields - // @@protoc_insertion_point(field:tapdance.DnsResponse.success) + // @@protoc_insertion_point(field:conjure.DnsResponse.success) pub success: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.DnsResponse.clientconf_outdated) + // @@protoc_insertion_point(field:conjure.DnsResponse.clientconf_outdated) pub clientconf_outdated: ::std::option::Option, - // @@protoc_insertion_point(field:tapdance.DnsResponse.bidirectional_response) + // @@protoc_insertion_point(field:conjure.DnsResponse.bidirectional_response) pub bidirectional_response: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:tapdance.DnsResponse.special_fields) + // @@protoc_insertion_point(special_field:conjure.DnsResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5370,6 +5737,11 @@ impl ::protobuf::Message for DnsResponse { const NAME: &'static str = "DnsResponse"; fn is_initialized(&self) -> bool { + for v in &self.bidirectional_response { + if !v.is_initialized() { + return false; + } + }; true } @@ -5474,11 +5846,11 @@ impl ::protobuf::reflect::ProtobufValue for DnsResponse { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.KeyType) +// @@protoc_insertion_point(enum:conjure.KeyType) pub enum KeyType { - // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_128) + // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_128) AES_GCM_128 = 90, - // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_256) + // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_256) AES_GCM_256 = 91, } @@ -5532,14 +5904,14 @@ impl KeyType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.DnsRegMethod) +// @@protoc_insertion_point(enum:conjure.DnsRegMethod) pub enum DnsRegMethod { - // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.UDP) - UDP = 0, - // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOT) - DOT = 1, - // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOH) - DOH = 2, + // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.UDP) + UDP = 1, + // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOT) + DOT = 2, + // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOH) + DOH = 3, } impl ::protobuf::Enum for DnsRegMethod { @@ -5551,9 +5923,9 @@ impl ::protobuf::Enum for DnsRegMethod { fn from_i32(value: i32) -> ::std::option::Option { match value { - 0 => ::std::option::Option::Some(DnsRegMethod::UDP), - 1 => ::std::option::Option::Some(DnsRegMethod::DOT), - 2 => ::std::option::Option::Some(DnsRegMethod::DOH), + 1 => ::std::option::Option::Some(DnsRegMethod::UDP), + 2 => ::std::option::Option::Some(DnsRegMethod::DOT), + 3 => ::std::option::Option::Some(DnsRegMethod::DOH), _ => ::std::option::Option::None } } @@ -5572,11 +5944,16 @@ impl ::protobuf::EnumFull for DnsRegMethod { } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; + let index = match self { + DnsRegMethod::UDP => 0, + DnsRegMethod::DOT => 1, + DnsRegMethod::DOH => 2, + }; Self::enum_descriptor().value_by_index(index) } } +// Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for DnsRegMethod { fn default() -> Self { DnsRegMethod::UDP @@ -5591,25 +5968,25 @@ impl DnsRegMethod { /// State transitions of the client #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.C2S_Transition) +// @@protoc_insertion_point(enum:conjure.C2S_Transition) pub enum C2S_Transition { - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_NO_CHANGE) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_NO_CHANGE) C2S_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_INIT) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_INIT) C2S_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_COVERT_INIT) C2S_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_RECONNECT) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_RECONNECT) C2S_EXPECT_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_CLOSE) C2S_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_YIELD_UPLOAD) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_YIELD_UPLOAD) C2S_YIELD_UPLOAD = 4, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ACQUIRE_UPLOAD) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ACQUIRE_UPLOAD) C2S_ACQUIRE_UPLOAD = 5, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) C2S_EXPECT_UPLOADONLY_RECONN = 6, - // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ERROR) + // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ERROR) C2S_ERROR = 255, } @@ -5684,19 +6061,19 @@ impl C2S_Transition { /// State transitions of the server #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.S2C_Transition) +// @@protoc_insertion_point(enum:conjure.S2C_Transition) pub enum S2C_Transition { - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_NO_CHANGE) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_NO_CHANGE) S2C_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_INIT) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_INIT) S2C_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_COVERT_INIT) S2C_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_CONFIRM_RECONNECT) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_CONFIRM_RECONNECT) S2C_CONFIRM_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_CLOSE) S2C_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_ERROR) + // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_ERROR) S2C_ERROR = 255, } @@ -5762,23 +6139,23 @@ impl S2C_Transition { /// Should accompany all S2C_ERROR messages. #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.ErrorReasonS2C) +// @@protoc_insertion_point(enum:conjure.ErrorReasonS2C) pub enum ErrorReasonS2C { - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.NO_ERROR) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.NO_ERROR) NO_ERROR = 0, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.COVERT_STREAM) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.COVERT_STREAM) COVERT_STREAM = 1, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_REPORTED) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_REPORTED) CLIENT_REPORTED = 2, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_PROTOCOL) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_PROTOCOL) CLIENT_PROTOCOL = 3, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.STATION_INTERNAL) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.STATION_INTERNAL) STATION_INTERNAL = 4, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.DECOY_OVERLOAD) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.DECOY_OVERLOAD) DECOY_OVERLOAD = 5, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_STREAM) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_STREAM) CLIENT_STREAM = 100, - // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_TIMEOUT) + // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_TIMEOUT) CLIENT_TIMEOUT = 101, } @@ -5849,15 +6226,29 @@ impl ErrorReasonS2C { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.TransportType) +// @@protoc_insertion_point(enum:conjure.TransportType) pub enum TransportType { - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Null) + // @@protoc_insertion_point(enum_value:conjure.TransportType.Null) Null = 0, - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Min) + // @@protoc_insertion_point(enum_value:conjure.TransportType.Min) Min = 1, - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Obfs4) + // @@protoc_insertion_point(enum_value:conjure.TransportType.Obfs4) Obfs4 = 2, - // @@protoc_insertion_point(enum_value:tapdance.TransportType.Webrtc) + // @@protoc_insertion_point(enum_value:conjure.TransportType.DTLS) + DTLS = 3, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Prefix) + Prefix = 4, + // @@protoc_insertion_point(enum_value:conjure.TransportType.uTLS) + uTLS = 5, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Format) + Format = 6, + // @@protoc_insertion_point(enum_value:conjure.TransportType.WASM) + WASM = 7, + // @@protoc_insertion_point(enum_value:conjure.TransportType.FTE) + FTE = 8, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Quic) + Quic = 9, + // @@protoc_insertion_point(enum_value:conjure.TransportType.Webrtc) Webrtc = 99, } @@ -5873,6 +6264,13 @@ impl ::protobuf::Enum for TransportType { 0 => ::std::option::Option::Some(TransportType::Null), 1 => ::std::option::Option::Some(TransportType::Min), 2 => ::std::option::Option::Some(TransportType::Obfs4), + 3 => ::std::option::Option::Some(TransportType::DTLS), + 4 => ::std::option::Option::Some(TransportType::Prefix), + 5 => ::std::option::Option::Some(TransportType::uTLS), + 6 => ::std::option::Option::Some(TransportType::Format), + 7 => ::std::option::Option::Some(TransportType::WASM), + 8 => ::std::option::Option::Some(TransportType::FTE), + 9 => ::std::option::Option::Some(TransportType::Quic), 99 => ::std::option::Option::Some(TransportType::Webrtc), _ => ::std::option::Option::None } @@ -5882,6 +6280,13 @@ impl ::protobuf::Enum for TransportType { TransportType::Null, TransportType::Min, TransportType::Obfs4, + TransportType::DTLS, + TransportType::Prefix, + TransportType::uTLS, + TransportType::Format, + TransportType::WASM, + TransportType::FTE, + TransportType::Quic, TransportType::Webrtc, ]; } @@ -5897,7 +6302,14 @@ impl ::protobuf::EnumFull for TransportType { TransportType::Null => 0, TransportType::Min => 1, TransportType::Obfs4 => 2, - TransportType::Webrtc => 3, + TransportType::DTLS => 3, + TransportType::Prefix => 4, + TransportType::uTLS => 5, + TransportType::Format => 6, + TransportType::WASM => 7, + TransportType::FTE => 8, + TransportType::Quic => 9, + TransportType::Webrtc => 10, }; Self::enum_descriptor().value_by_index(index) } @@ -5916,21 +6328,21 @@ impl TransportType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.RegistrationSource) +// @@protoc_insertion_point(enum:conjure.RegistrationSource) pub enum RegistrationSource { - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Unspecified) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Unspecified) Unspecified = 0, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Detector) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Detector) Detector = 1, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.API) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.API) API = 2, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DetectorPrescan) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DetectorPrescan) DetectorPrescan = 3, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalAPI) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalAPI) BidirectionalAPI = 4, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DNS) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DNS) DNS = 5, - // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalDNS) + // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalDNS) BidirectionalDNS = 6, } @@ -5990,15 +6402,15 @@ impl RegistrationSource { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.StationOperations) +// @@protoc_insertion_point(enum:conjure.StationOperations) pub enum StationOperations { - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Unknown) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.Unknown) Unknown = 0, - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.New) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.New) New = 1, - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Update) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.Update) Update = 2, - // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Clear) + // @@protoc_insertion_point(enum_value:conjure.StationOperations.Clear) Clear = 3, } @@ -6052,13 +6464,13 @@ impl StationOperations { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:tapdance.IPProto) +// @@protoc_insertion_point(enum:conjure.IPProto) pub enum IPProto { - // @@protoc_insertion_point(enum_value:tapdance.IPProto.Unk) + // @@protoc_insertion_point(enum_value:conjure.IPProto.Unk) Unk = 0, - // @@protoc_insertion_point(enum_value:tapdance.IPProto.Tcp) + // @@protoc_insertion_point(enum_value:conjure.IPProto.Tcp) Tcp = 1, - // @@protoc_insertion_point(enum_value:tapdance.IPProto.Udp) + // @@protoc_insertion_point(enum_value:conjure.IPProto.Udp) Udp = 2, } @@ -6110,699 +6522,785 @@ impl IPProto { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10signalling.proto\x12\x08tapdance\x1a\x19google/protobuf/any.proto\ - \"A\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12%\n\x04\ - type\x18\x02\x20\x01(\x0e2\x11.tapdance.KeyTypeR\x04type\"\xbe\x01\n\x0c\ - TLSDecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\ - \x1a\n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6ad\ - dr\x18\x06\x20\x01(\x0cR\x08ipv6addr\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\"\ - \xa2\x02\n\nClientConf\x122\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x13.tapd\ - ance.DecoyListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\nge\ - neration\x127\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x10.tapdance.Pub\ - KeyR\rdefaultPubkey\x12N\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\ - \x1c.tapdance.PhantomSubnetsListR\x12phantomSubnetsList\x127\n\x0econjur\ - e_pubkey\x18\x05\x20\x01(\x0b2\x10.tapdance.PubKeyR\rconjurePubkey\"\x97\ - \x02\n\nDnsRegConf\x12<\n\x0edns_reg_method\x18\x01\x20\x02(\x0e2\x16.ta\ - pdance.DnsRegMethodR\x0cdnsRegMethod\x12\x19\n\x08udp_addr\x18\x02\x20\ - \x01(\tR\x07udpAddr\x12\x19\n\x08dot_addr\x18\x03\x20\x01(\tR\x07dotAddr\ - \x12\x17\n\x07doh_url\x18\x04\x20\x01(\tR\x06dohUrl\x12\x16\n\x06domain\ - \x18\x05\x20\x02(\tR\x06domain\x12\x16\n\x06pubkey\x18\x06\x20\x01(\x0cR\ - \x06pubkey\x12+\n\x11utls_distribution\x18\x07\x20\x01(\tR\x10utlsDistri\ - bution\x12\x1f\n\x0bstun_server\x18\x08\x20\x01(\tR\nstunServer\"B\n\tDe\ - coyList\x125\n\ntls_decoys\x18\x01\x20\x03(\x0b2\x16.tapdance.TLSDecoySp\ - ecR\ttlsDecoys\"Y\n\x12PhantomSubnetsList\x12C\n\x10weighted_subnets\x18\ - \x01\x20\x03(\x0b2\x18.tapdance.PhantomSubnetsR\x0fweightedSubnets\"B\n\ - \x0ePhantomSubnets\x12\x16\n\x06weight\x18\x01\x20\x01(\rR\x06weight\x12\ - \x18\n\x07subnets\x18\x02\x20\x03(\tR\x07subnets\"o\n\x12WebRTCICECandid\ - ate\x12\x19\n\x08ip_upper\x18\x01\x20\x02(\x04R\x07ipUpper\x12\x19\n\x08\ - ip_lower\x18\x02\x20\x02(\x04R\x07ipLower\x12#\n\rcomposed_info\x18\x03\ - \x20\x02(\rR\x0ccomposedInfo\"]\n\tWebRTCSDP\x12\x12\n\x04type\x18\x01\ - \x20\x02(\rR\x04type\x12<\n\ncandidates\x18\x02\x20\x03(\x0b2\x1c.tapdan\ - ce.WebRTCICECandidateR\ncandidates\"I\n\x0cWebRTCSignal\x12\x12\n\x04see\ - d\x18\x01\x20\x02(\tR\x04seed\x12%\n\x03sdp\x18\x02\x20\x02(\x0b2\x13.ta\ - pdance.WebRTCSDPR\x03sdp\"\xcb\x02\n\x0fStationToClient\x12)\n\x10protoc\ - ol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x12C\n\x10state_transi\ - tion\x18\x02\x20\x01(\x0e2\x18.tapdance.S2C_TransitionR\x0fstateTransiti\ - on\x125\n\x0bconfig_info\x18\x03\x20\x01(\x0b2\x14.tapdance.ClientConfR\ - \nconfigInfo\x127\n\nerr_reason\x18\x04\x20\x01(\x0e2\x18.tapdance.Error\ - ReasonS2CR\terrReason\x12\x1f\n\x0btmp_backoff\x18\x05\x20\x01(\rR\ntmpB\ - ackoff\x12\x1d\n\nstation_id\x18\x06\x20\x01(\tR\tstationId\x12\x18\n\ - \x07padding\x18d\x20\x01(\x0cR\x07padding\"\xaf\x01\n\x11RegistrationFla\ - gs\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\x12\x1e\n\nprescanned\x18\x05\x20\x01(\x08R\nprescanned\ - \"\xf7\x05\n\x0fClientToStation\x12)\n\x10protocol_version\x18\x01\x20\ - \x01(\rR\x0fprotocolVersion\x122\n\x15decoy_list_generation\x18\x02\x20\ - \x01(\rR\x13decoyListGeneration\x12C\n\x10state_transition\x18\x03\x20\ - \x01(\x0e2\x18.tapdance.C2S_TransitionR\x0fstateTransition\x12\x1f\n\x0b\ - upload_sync\x18\x04\x20\x01(\x04R\nuploadSync\x12,\n\x12client_lib_versi\ - on\x18\x05\x20\x01(\rR\x10clientLibVersion\x12#\n\rfailed_decoys\x18\n\ - \x20\x03(\tR\x0cfailedDecoys\x12,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.t\ - apdance.SessionStatsR\x05stats\x125\n\ttransport\x18\x0c\x20\x01(\x0e2\ - \x17.tapdance.TransportTypeR\ttransport\x12?\n\x10transport_params\x18\r\ - \x20\x01(\x0b2\x14.google.protobuf.AnyR\x0ftransportParams\x12%\n\x0ecov\ - ert_address\x18\x14\x20\x01(\tR\rcovertAddress\x127\n\x18masked_decoy_se\ - rver_name\x18\x15\x20\x01(\tR\x15maskedDecoyServerName\x12\x1d\n\nv6_sup\ - port\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;\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\ - \x16.tapdance.WebRTCSignalR\x0cwebrtcSignal\x12\x18\n\x07padding\x18d\ - \x20\x01(\x0cR\x07padding\"F\n\x16GenericTransportParams\x12,\n\x12rando\ - mize_dst_port\x18\r\x20\x01(\x08R\x10randomizeDstPort\"\xfb\x02\n\nC2SWr\ - apper\x12#\n\rshared_secret\x18\x01\x20\x01(\x0cR\x0csharedSecret\x12L\n\ - \x14registration_payload\x18\x03\x20\x01(\x0b2\x19.tapdance.ClientToStat\ - ionR\x13registrationPayload\x12M\n\x13registration_source\x18\x04\x20\ - \x01(\x0e2\x1c.tapdance.RegistrationSourceR\x12registrationSource\x121\n\ - \x14registration_address\x18\x06\x20\x01(\x0cR\x13registrationAddress\ - \x12#\n\rdecoy_address\x18\x07\x20\x01(\x0cR\x0cdecoyAddress\x12S\n\x15r\ - egistration_response\x18\x08\x20\x01(\x0b2\x1e.tapdance.RegistrationResp\ - onseR\x14registrationResponse\"\xdd\x01\n\x0cSessionStats\x120\n\x14fail\ - ed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAmount\x121\n\x15tot\ - al_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToConnect\x12$\n\x0er\ - tt_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\"\x88\x02\n\x11StationToDetector\x12\x1d\n\nphantom_ip\x18\ - \x01\x20\x01(\tR\tphantomIp\x12\x1b\n\tclient_ip\x18\x02\x20\x01(\tR\x08\ - clientIp\x12\x1d\n\ntimeout_ns\x18\x03\x20\x01(\x04R\ttimeoutNs\x129\n\t\ - operation\x18\x04\x20\x01(\x0e2\x1b.tapdance.StationOperationsR\toperati\ - on\x12\x19\n\x08dst_port\x18\n\x20\x01(\rR\x07dstPort\x12\x19\n\x08src_p\ - ort\x18\x0b\x20\x01(\rR\x07srcPort\x12'\n\x05proto\x18\x0c\x20\x01(\x0e2\ - \x11.tapdance.IPProtoR\x05proto\"\xd9\x01\n\x14RegistrationResponse\x12\ - \x1a\n\x08ipv4addr\x18\x01\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6ad\ - dr\x18\x02\x20\x01(\x0cR\x08ipv6addr\x12\x19\n\x08dst_port\x18\x03\x20\ - \x01(\rR\x07dstPort\x12\"\n\x0cserverRandom\x18\x04\x20\x01(\x0cR\x0cser\ - verRandom\x12\x14\n\x05error\x18\x05\x20\x01(\tR\x05error\x124\n\nclient\ - Conf\x18\x06\x20\x01(\x0b2\x14.tapdance.ClientConfR\nclientConf\"\xaf\ - \x01\n\x0bDnsResponse\x12\x18\n\x07success\x18\x01\x20\x01(\x08R\x07succ\ - ess\x12/\n\x13clientconf_outdated\x18\x02\x20\x01(\x08R\x12clientconfOut\ - dated\x12U\n\x16bidirectional_response\x18\x03\x20\x01(\x0b2\x1e.tapdanc\ - e.RegistrationResponseR\x15bidirectionalResponse*+\n\x07KeyType\x12\x0f\ - \n\x0bAES_GCM_128\x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\ - \x12\x07\n\x03UDP\x10\0\x12\x07\n\x03DOT\x10\x01\x12\x07\n\x03DOH\x10\ - \x02*\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\x10e*9\n\rTransportType\x12\x08\n\x04Null\x10\0\ - \x12\x07\n\x03Min\x10\x01\x12\t\n\x05Obfs4\x10\x02\x12\n\n\x06Webrtc\x10\ - c*\x86\x01\n\x12RegistrationSource\x12\x0f\n\x0bUnspecified\x10\0\x12\ - \x0c\n\x08Detector\x10\x01\x12\x07\n\x03API\x10\x02\x12\x13\n\x0fDetecto\ - rPrescan\x10\x03\x12\x14\n\x10BidirectionalAPI\x10\x04\x12\x07\n\x03DNS\ - \x10\x05\x12\x14\n\x10BidirectionalDNS\x10\x06*@\n\x11StationOperations\ - \x12\x0b\n\x07Unknown\x10\0\x12\x07\n\x03New\x10\x01\x12\n\n\x06Update\ - \x10\x02\x12\t\n\x05Clear\x10\x03*$\n\x07IPProto\x12\x07\n\x03Unk\x10\0\ - \x12\x07\n\x03Tcp\x10\x01\x12\x07\n\x03Udp\x10\x02J\x8fy\n\x07\x12\x05\0\ - \0\xf3\x02\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\x20\ - point\x20we\x20will\x20want\x20to\x20migrate\x20to\x20proto3,\x20but\x20\ - we\x20are\x20not\n\x20using\x20any\x20proto3\x20features\x20yet.\n\n\t\n\ - \x02\x03\0\x12\x03\x08\0#\n\n\n\x02\x05\0\x12\x04\n\0\r\x01\n\n\n\x03\ - \x05\0\x01\x12\x03\n\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\x0b\x04\x15\ - \n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x0b\x04\x0f\n\x0c\n\x05\x05\0\x02\0\ - \x02\x12\x03\x0b\x12\x14\n\x20\n\x04\x05\0\x02\x01\x12\x03\x0c\x04\x15\"\ - \x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\ - \x0c\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x0c\x12\x14\n\n\n\x02\ - \x04\0\x12\x04\x0f\0\x14\x01\n\n\n\x03\x04\0\x01\x12\x03\x0f\x08\x0e\n4\ - \n\x04\x04\0\x02\0\x12\x03\x11\x04\x1b\x1a'\x20A\x20public\x20key,\x20as\ - \x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\ - \x11\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x11\r\x12\n\x0c\n\x05\ - \x04\0\x02\0\x01\x12\x03\x11\x13\x16\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\ - \x11\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x13\x04\x1e\n\x0c\n\x05\ - \x04\0\x02\x01\x04\x12\x03\x13\x04\x0c\n\x0c\n\x05\x04\0\x02\x01\x06\x12\ - \x03\x13\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x13\x15\x19\n\x0c\n\ - \x05\x04\0\x02\x01\x03\x12\x03\x13\x1c\x1d\n\n\n\x02\x04\x01\x12\x04\x16\ - \0<\x01\n\n\n\x03\x04\x01\x01\x12\x03\x16\x08\x14\n\xa1\x01\n\x04\x04\ - \x01\x02\0\x12\x03\x1b\x04!\x1a\x93\x01\x20The\x20hostname/SNI\x20to\x20\ - use\x20for\x20this\x20host\n\n\x20The\x20hostname\x20is\x20the\x20only\ - \x20required\x20field,\x20although\x20other\n\x20fields\x20are\x20expect\ - ed\x20to\x20be\x20present\x20in\x20most\x20cases.\n\n\x0c\n\x05\x04\x01\ - \x02\0\x04\x12\x03\x1b\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x1b\ - \r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x1b\x14\x1c\n\x0c\n\x05\x04\ - \x01\x02\0\x03\x12\x03\x1b\x1f\x20\n\xf7\x01\n\x04\x04\x01\x02\x01\x12\ - \x03\"\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20ipv4\x20address,\x20in\x20n\ - etwork\x20byte\x20order\n\n\x20If\x20the\x20IPv4\x20address\x20is\x20abs\ - ent,\x20then\x20it\x20may\x20be\x20resolved\x20via\n\x20DNS\x20by\x20the\ - \x20client,\x20or\x20the\x20client\x20may\x20discard\x20this\x20decoy\ - \x20spec\n\x20if\x20local\x20DNS\x20is\x20untrusted,\x20or\x20the\x20ser\ - vice\x20may\x20be\x20multihomed.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\ - \x03\"\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\"\r\x14\n\x0c\n\ - \x05\x04\x01\x02\x01\x01\x12\x03\"\x15\x1d\n\x0c\n\x05\x04\x01\x02\x01\ - \x03\x12\x03\"\x20!\n>\n\x04\x04\x01\x02\x02\x12\x03%\x04\x20\x1a1\x20Th\ - e\x20128-bit\x20ipv6\x20address,\x20in\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\x20default\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\x032\x04\x20\x1a\xe0\ - \x01\x20The\x20maximum\x20duration,\x20in\x20milliseconds,\x20to\x20main\ - tain\x20an\x20open\n\x20connection\x20to\x20this\x20decoy\x20(because\ - \x20the\x20decoy\x20may\x20close\x20the\n\x20connection\x20itself\x20aft\ - er\x20this\x20length\x20of\x20time)\n\n\x20If\x20omitted,\x20a\x20defaul\ - t\x20of\x2030,000\x20milliseconds\x20is\x20assumed.\n\n\x0c\n\x05\x04\ - \x01\x02\x04\x04\x12\x032\x04\x0c\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\ - \x032\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x032\x14\x1b\n\x0c\n\x05\ - \x04\x01\x02\x04\x03\x12\x032\x1e\x1f\n\xb0\x02\n\x04\x04\x01\x02\x05\ - \x12\x03;\x04\x1f\x1a\xa2\x02\x20The\x20maximum\x20TCP\x20window\x20size\ - \x20to\x20attempt\x20to\x20use\x20for\x20this\x20decoy.\n\n\x20If\x20omi\ - tted,\x20a\x20default\x20of\x2015360\x20is\x20assumed.\n\n\x20TODO:\x20t\ - he\x20default\x20is\x20based\x20on\x20the\x20current\x20heuristic\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\x03;\x04\x0c\n\x0c\n\x05\x04\x01\x02\x05\x05\x12\x03;\r\ - \x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03;\x14\x1a\n\x0c\n\x05\x04\ - \x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\x08\n\x02\x04\x02\x12\x04S\0Y\ - \x012\xf6\x07\x20In\x20version\x201,\x20the\x20request\x20is\x20very\x20\ - simple:\x20when\n\x20the\x20client\x20sends\x20a\x20MSG_PROTO\x20to\x20t\ - he\x20station,\x20if\x20the\n\x20generation\x20number\x20is\x20present,\ - \x20then\x20this\x20request\x20includes\n\x20(in\x20addition\x20to\x20wh\ - atever\x20other\x20operations\x20are\x20part\x20of\x20the\n\x20request)\ - \x20a\x20request\x20for\x20the\x20station\x20to\x20send\x20a\x20copy\x20\ - of\n\x20the\x20current\x20decoy\x20set\x20that\x20has\x20a\x20generation\ - \x20number\x20greater\n\x20than\x20the\x20generation\x20number\x20in\x20\ - its\x20request.\n\n\x20If\x20the\x20response\x20contains\x20a\x20DecoyLi\ - stUpdate\x20with\x20a\x20generation\x20number\x20equal\n\x20to\x20that\ - \x20which\x20the\x20client\x20sent,\x20then\x20the\x20client\x20is\x20\"\ - caught\x20up\"\x20with\n\x20the\x20station\x20and\x20the\x20response\x20\ - contains\x20no\x20new\x20information\n\x20(and\x20all\x20other\x20fields\ - \x20may\x20be\x20omitted\x20or\x20empty).\x20\x20Otherwise,\n\x20the\x20\ - station\x20will\x20send\x20the\x20latest\x20configuration\x20information\ - ,\n\x20along\x20with\x20its\x20generation\x20number.\n\n\x20The\x20stati\ - on\x20can\x20also\x20send\x20ClientConf\x20messages\n\x20(as\x20part\x20\ - of\x20Station2Client\x20messages)\x20whenever\x20it\x20wants.\n\x20The\ - \x20client\x20is\x20expected\x20to\x20react\x20as\x20if\x20it\x20had\x20\ - requested\n\x20such\x20messages\x20--\x20possibly\x20by\x20ignoring\x20t\ - hem,\x20if\x20the\x20client\n\x20is\x20already\x20up-to-date\x20accordin\ - g\x20to\x20the\x20generation\x20number.\n\n\n\n\x03\x04\x02\x01\x12\x03S\ - \x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\x03T\x04&\n\x0c\n\x05\x04\x02\x02\ - \0\x04\x12\x03T\x04\x0c\n\x0c\n\x05\x04\x02\x02\0\x06\x12\x03T\r\x16\n\ - \x0c\n\x05\x04\x02\x02\0\x01\x12\x03T\x17!\n\x0c\n\x05\x04\x02\x02\0\x03\ - \x12\x03T$%\n\x0b\n\x04\x04\x02\x02\x01\x12\x03U\x04#\n\x0c\n\x05\x04\ - \x02\x02\x01\x04\x12\x03U\x04\x0c\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\ - \x03U\r\x13\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\ - \x04\x02\x02\x01\x03\x12\x03U!\"\n\x0b\n\x04\x04\x02\x02\x02\x12\x03V\ - \x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03V\x04\x0c\n\x0c\n\x05\x04\ - \x02\x02\x02\x06\x12\x03V\r\x13\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03V\ - \x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03V%&\n\x0b\n\x04\x04\x02\ - \x02\x03\x12\x03W\x049\n\x0c\n\x05\x04\x02\x02\x03\x04\x12\x03W\x04\x0c\ - \n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\ - \x03\x01\x12\x03W\x204\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03W78\n\x0b\ - \n\x04\x04\x02\x02\x04\x12\x03X\x04'\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\ - \x03X\x04\x0c\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\ - \x04\x02\x02\x04\x01\x12\x03X\x14\"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\ - \x03X%&\n-\n\x02\x04\x03\x12\x04\\\0e\x01\x1a!\x20Configuration\x20for\ - \x20DNS\x20registrar\n\n\n\n\x03\x04\x03\x01\x12\x03\\\x08\x12\n\x0b\n\ - \x04\x04\x03\x02\0\x12\x03]\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03]\ - \x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03]\r\x19\n\x0c\n\x05\x04\ - \x03\x02\0\x01\x12\x03]\x1a(\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03]+,\n\ - \x0b\n\x04\x04\x03\x02\x01\x12\x03^\x04!\n\x0c\n\x05\x04\x03\x02\x01\x04\ - \x12\x03^\x04\x0c\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03^\r\x13\n\x0c\n\ - \x05\x04\x03\x02\x01\x01\x12\x03^\x14\x1c\n\x0c\n\x05\x04\x03\x02\x01\ - \x03\x12\x03^\x1f\x20\n\x0b\n\x04\x04\x03\x02\x02\x12\x03_\x04!\n\x0c\n\ - \x05\x04\x03\x02\x02\x04\x12\x03_\x04\x0c\n\x0c\n\x05\x04\x03\x02\x02\ - \x05\x12\x03_\r\x13\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03_\x14\x1c\n\ - \x0c\n\x05\x04\x03\x02\x02\x03\x12\x03_\x1f\x20\n\x0b\n\x04\x04\x03\x02\ - \x03\x12\x03`\x04\x20\n\x0c\n\x05\x04\x03\x02\x03\x04\x12\x03`\x04\x0c\n\ - \x0c\n\x05\x04\x03\x02\x03\x05\x12\x03`\r\x13\n\x0c\n\x05\x04\x03\x02\ - \x03\x01\x12\x03`\x14\x1b\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x03`\x1e\ - \x1f\n\x0b\n\x04\x04\x03\x02\x04\x12\x03a\x04\x1f\n\x0c\n\x05\x04\x03\ - \x02\x04\x04\x12\x03a\x04\x0c\n\x0c\n\x05\x04\x03\x02\x04\x05\x12\x03a\r\ - \x13\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03a\x14\x1a\n\x0c\n\x05\x04\ - \x03\x02\x04\x03\x12\x03a\x1d\x1e\n\x0b\n\x04\x04\x03\x02\x05\x12\x03b\ - \x04\x1e\n\x0c\n\x05\x04\x03\x02\x05\x04\x12\x03b\x04\x0c\n\x0c\n\x05\ - \x04\x03\x02\x05\x05\x12\x03b\r\x12\n\x0c\n\x05\x04\x03\x02\x05\x01\x12\ - \x03b\x13\x19\n\x0c\n\x05\x04\x03\x02\x05\x03\x12\x03b\x1c\x1d\n\x0b\n\ - \x04\x04\x03\x02\x06\x12\x03c\x04*\n\x0c\n\x05\x04\x03\x02\x06\x04\x12\ - \x03c\x04\x0c\n\x0c\n\x05\x04\x03\x02\x06\x05\x12\x03c\r\x13\n\x0c\n\x05\ - \x04\x03\x02\x06\x01\x12\x03c\x14%\n\x0c\n\x05\x04\x03\x02\x06\x03\x12\ - \x03c()\n\x0b\n\x04\x04\x03\x02\x07\x12\x03d\x04$\n\x0c\n\x05\x04\x03\ - \x02\x07\x04\x12\x03d\x04\x0c\n\x0c\n\x05\x04\x03\x02\x07\x05\x12\x03d\r\ - \x13\n\x0c\n\x05\x04\x03\x02\x07\x01\x12\x03d\x14\x1f\n\x0c\n\x05\x04\ - \x03\x02\x07\x03\x12\x03d\"#\n\n\n\x02\x05\x01\x12\x04g\0k\x01\n\n\n\x03\ - \x05\x01\x01\x12\x03g\x05\x11\n\x0b\n\x04\x05\x01\x02\0\x12\x03h\x04\x0c\ - \n\x0c\n\x05\x05\x01\x02\0\x01\x12\x03h\x04\x07\n\x0c\n\x05\x05\x01\x02\ - \0\x02\x12\x03h\n\x0b\n\x0b\n\x04\x05\x01\x02\x01\x12\x03i\x04\x0c\n\x0c\ - \n\x05\x05\x01\x02\x01\x01\x12\x03i\x04\x07\n\x0c\n\x05\x05\x01\x02\x01\ - \x02\x12\x03i\n\x0b\n\x0b\n\x04\x05\x01\x02\x02\x12\x03j\x04\x0c\n\x0c\n\ - \x05\x05\x01\x02\x02\x01\x12\x03j\x04\x07\n\x0c\n\x05\x05\x01\x02\x02\ - \x02\x12\x03j\n\x0b\n\n\n\x02\x04\x04\x12\x04m\0o\x01\n\n\n\x03\x04\x04\ - \x01\x12\x03m\x08\x11\n\x0b\n\x04\x04\x04\x02\0\x12\x03n\x04)\n\x0c\n\ - \x05\x04\x04\x02\0\x04\x12\x03n\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x06\ - \x12\x03n\r\x19\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03n\x1a$\n\x0c\n\x05\ - \x04\x04\x02\0\x03\x12\x03n'(\n\n\n\x02\x04\x05\x12\x04q\0s\x01\n\n\n\ - \x03\x04\x05\x01\x12\x03q\x08\x1a\n\x0b\n\x04\x04\x05\x02\0\x12\x03r\x04\ - 1\n\x0c\n\x05\x04\x05\x02\0\x04\x12\x03r\x04\x0c\n\x0c\n\x05\x04\x05\x02\ - \0\x06\x12\x03r\r\x1b\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03r\x1c,\n\x0c\ - \n\x05\x04\x05\x02\0\x03\x12\x03r/0\n\n\n\x02\x04\x06\x12\x04u\0x\x01\n\ - \n\n\x03\x04\x06\x01\x12\x03u\x08\x16\n\x0b\n\x04\x04\x06\x02\0\x12\x03v\ - \x04\x1f\n\x0c\n\x05\x04\x06\x02\0\x04\x12\x03v\x04\x0c\n\x0c\n\x05\x04\ - \x06\x02\0\x05\x12\x03v\r\x13\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03v\x14\ - \x1a\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03v\x1d\x1e\n\x0b\n\x04\x04\x06\ - \x02\x01\x12\x03w\x04\x20\n\x0c\n\x05\x04\x06\x02\x01\x04\x12\x03w\x04\ - \x0c\n\x0c\n\x05\x04\x06\x02\x01\x05\x12\x03w\r\x13\n\x0c\n\x05\x04\x06\ - \x02\x01\x01\x12\x03w\x14\x1b\n\x0c\n\x05\x04\x06\x02\x01\x03\x12\x03w\ - \x1e\x1f\n.\n\x02\x05\x02\x12\x05{\0\x85\x01\x01\x1a!\x20State\x20transi\ - tions\x20of\x20the\x20client\n\n\n\n\x03\x05\x02\x01\x12\x03{\x05\x13\n\ - \x0b\n\x04\x05\x02\x02\0\x12\x03|\x04\x16\n\x0c\n\x05\x05\x02\x02\0\x01\ - \x12\x03|\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\x03|\x14\x15\n\"\n\ - \x04\x05\x02\x02\x01\x12\x03}\x04\x19\"\x15\x20connect\x20me\x20to\x20sq\ - uid\n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03}\x04\x14\n\x0c\n\x05\x05\ - \x02\x02\x01\x02\x12\x03}\x17\x18\n,\n\x04\x05\x02\x02\x02\x12\x03~\x04!\ + \n\x10signalling.proto\x12\x07conjure\x1a\x19google/protobuf/any.proto\"\ + @\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12$\n\x04ty\ + pe\x18\x02\x20\x01(\x0e2\x10.conjure.KeyTypeR\x04type\"\xbd\x01\n\x0cTLS\ + DecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\x1a\ + \n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\ + \x18\x06\x20\x01(\x0cR\x08ipv6addr\x12'\n\x06pubkey\x18\x03\x20\x01(\x0b\ + 2\x0f.conjure.PubKeyR\x06pubkey\x12\x18\n\x07timeout\x18\x04\x20\x01(\rR\ + \x07timeout\x12\x16\n\x06tcpwin\x18\x05\x20\x01(\rR\x06tcpwin\"\xd5\x02\ + \n\nClientConf\x121\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x12.conjure.Deco\ + yListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\ngeneration\ + \x126\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x0f.conjure.PubKeyR\rdef\ + aultPubkey\x12M\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\x1b.conj\ + ure.PhantomSubnetsListR\x12phantomSubnetsList\x126\n\x0econjure_pubkey\ + \x18\x05\x20\x01(\x0b2\x0f.conjure.PubKeyR\rconjurePubkey\x125\n\x0cdns_\ + reg_conf\x18\x06\x20\x01(\x0b2\x13.conjure.DnsRegConfR\ndnsRegConf\"\xdf\ + \x01\n\nDnsRegConf\x12;\n\x0edns_reg_method\x18\x01\x20\x02(\x0e2\x15.co\ + njure.DnsRegMethodR\x0cdnsRegMethod\x12\x16\n\x06target\x18\x02\x20\x01(\ + \tR\x06target\x12\x16\n\x06domain\x18\x03\x20\x02(\tR\x06domain\x12\x16\ + \n\x06pubkey\x18\x04\x20\x01(\x0cR\x06pubkey\x12+\n\x11utls_distribution\ + \x18\x05\x20\x01(\tR\x10utlsDistribution\x12\x1f\n\x0bstun_server\x18\ + \x06\x20\x01(\tR\nstunServer\"A\n\tDecoyList\x124\n\ntls_decoys\x18\x01\ + \x20\x03(\x0b2\x15.conjure.TLSDecoySpecR\ttlsDecoys\"X\n\x12PhantomSubne\ + tsList\x12B\n\x10weighted_subnets\x18\x01\x20\x03(\x0b2\x17.conjure.Phan\ + tomSubnetsR\x0fweightedSubnets\"B\n\x0ePhantomSubnets\x12\x16\n\x06weigh\ + t\x18\x01\x20\x01(\rR\x06weight\x12\x18\n\x07subnets\x18\x02\x20\x03(\tR\ + \x07subnets\"o\n\x12WebRTCICECandidate\x12\x19\n\x08ip_upper\x18\x01\x20\ + \x02(\x04R\x07ipUpper\x12\x19\n\x08ip_lower\x18\x02\x20\x02(\x04R\x07ipL\ + ower\x12#\n\rcomposed_info\x18\x03\x20\x02(\rR\x0ccomposedInfo\"\\\n\tWe\ + bRTCSDP\x12\x12\n\x04type\x18\x01\x20\x02(\rR\x04type\x12;\n\ncandidates\ + \x18\x02\x20\x03(\x0b2\x1b.conjure.WebRTCICECandidateR\ncandidates\"H\n\ + \x0cWebRTCSignal\x12\x12\n\x04seed\x18\x01\x20\x02(\tR\x04seed\x12$\n\ + \x03sdp\x18\x02\x20\x02(\x0b2\x12.conjure.WebRTCSDPR\x03sdp\"\xc8\x02\n\ + \x0fStationToClient\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fpr\ + otocolVersion\x12B\n\x10state_transition\x18\x02\x20\x01(\x0e2\x17.conju\ + re.S2C_TransitionR\x0fstateTransition\x124\n\x0bconfig_info\x18\x03\x20\ + \x01(\x0b2\x13.conjure.ClientConfR\nconfigInfo\x126\n\nerr_reason\x18\ + \x04\x20\x01(\x0e2\x17.conjure.ErrorReasonS2CR\terrReason\x12\x1f\n\x0bt\ + mp_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\x07paddi\ + ng\"\xaf\x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_only\x18\x01\x20\ + \x01(\x08R\nuploadOnly\x12\x1d\n\ndark_decoy\x18\x02\x20\x01(\x08R\tdark\ + Decoy\x12!\n\x0cproxy_header\x18\x03\x20\x01(\x08R\x0bproxyHeader\x12\ + \x17\n\x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\x12\x1e\n\nprescanned\ + \x18\x05\x20\x01(\x08R\nprescanned\"\xae\x06\n\x0fClientToStation\x12)\n\ + \x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x122\n\x15de\ + coy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGeneration\x12B\n\ + \x10state_transition\x18\x03\x20\x01(\x0e2\x17.conjure.C2S_TransitionR\ + \x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\x04R\nuplo\ + adSync\x12,\n\x12client_lib_version\x18\x05\x20\x01(\rR\x10clientLibVers\ + ion\x12:\n\x19allow_registrar_overrides\x18\x06\x20\x01(\x08R\x17allowRe\ + gistrarOverrides\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoys\ + \x12+\n\x05stats\x18\x0b\x20\x01(\x0b2\x15.conjure.SessionStatsR\x05stat\ + s\x124\n\ttransport\x18\x0c\x20\x01(\x0e2\x16.conjure.TransportTypeR\ttr\ + ansport\x12?\n\x10transport_params\x18\r\x20\x01(\x0b2\x14.google.protob\ + uf.AnyR\x0ftransportParams\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\ + \rcovertAddress\x127\n\x18masked_decoy_server_name\x18\x15\x20\x01(\tR\ + \x15maskedDecoyServerName\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv\ + 6Support\x12\x1d\n\nv4_support\x18\x17\x20\x01(\x08R\tv4Support\x120\n\ + \x05flags\x18\x18\x20\x01(\x0b2\x1a.conjure.RegistrationFlagsR\x05flags\ + \x12:\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\x15.conjure.WebRTCSignalR\ + \x0cwebrtcSignal\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"z\n\ + \x15PrefixTransportParams\x12\x1b\n\tprefix_id\x18\x01\x20\x01(\x05R\x08\ + prefixId\x12\x16\n\x06prefix\x18\x02\x20\x01(\x0cR\x06prefix\x12,\n\x12r\ + andomize_dst_port\x18\r\x20\x01(\x08R\x10randomizeDstPort\"F\n\x16Generi\ + cTransportParams\x12,\n\x12randomize_dst_port\x18\r\x20\x01(\x08R\x10ran\ + domizeDstPort\"\xc8\x03\n\nC2SWrapper\x12#\n\rshared_secret\x18\x01\x20\ + \x01(\x0cR\x0csharedSecret\x12K\n\x14registration_payload\x18\x03\x20\ + \x01(\x0b2\x18.conjure.ClientToStationR\x13registrationPayload\x12L\n\ + \x13registration_source\x18\x04\x20\x01(\x0e2\x1b.conjure.RegistrationSo\ + urceR\x12registrationSource\x121\n\x14registration_address\x18\x06\x20\ + \x01(\x0cR\x13registrationAddress\x12#\n\rdecoy_address\x18\x07\x20\x01(\ + \x0cR\x0cdecoyAddress\x12R\n\x15registration_response\x18\x08\x20\x01(\ + \x0b2\x1d.conjure.RegistrationResponseR\x14registrationResponse\x12\"\n\ + \x0cRegRespBytes\x18\t\x20\x01(\x0cR\x0cRegRespBytes\x12*\n\x10RegRespSi\ + gnature\x18\n\x20\x01(\x0cR\x10RegRespSignature\"\xdd\x01\n\x0cSessionSt\ + ats\x120\n\x14failed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAm\ + ount\x121\n\x15total_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToC\ + onnect\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_deco\ + y\x18'\x20\x01(\rR\ntcpToDecoy\"\x86\x02\n\x11StationToDetector\x12\x1d\ + \n\nphantom_ip\x18\x01\x20\x01(\tR\tphantomIp\x12\x1b\n\tclient_ip\x18\ + \x02\x20\x01(\tR\x08clientIp\x12\x1d\n\ntimeout_ns\x18\x03\x20\x01(\x04R\ + \ttimeoutNs\x128\n\toperation\x18\x04\x20\x01(\x0e2\x1a.conjure.StationO\ + perationsR\toperation\x12\x19\n\x08dst_port\x18\n\x20\x01(\rR\x07dstPort\ + \x12\x19\n\x08src_port\x18\x0b\x20\x01(\rR\x07srcPort\x12&\n\x05proto\ + \x18\x0c\x20\x01(\x0e2\x10.conjure.IPProtoR\x05proto\"\x99\x02\n\x14Regi\ + strationResponse\x12\x1a\n\x08ipv4addr\x18\x01\x20\x01(\x07R\x08ipv4addr\ + \x12\x1a\n\x08ipv6addr\x18\x02\x20\x01(\x0cR\x08ipv6addr\x12\x19\n\x08ds\ + t_port\x18\x03\x20\x01(\rR\x07dstPort\x12\"\n\x0cserverRandom\x18\x04\ + \x20\x01(\x0cR\x0cserverRandom\x12\x14\n\x05error\x18\x05\x20\x01(\tR\ + \x05error\x123\n\nclientConf\x18\x06\x20\x01(\x0b2\x13.conjure.ClientCon\ + fR\nclientConf\x12?\n\x10transport_params\x18\n\x20\x01(\x0b2\x14.google\ + .protobuf.AnyR\x0ftransportParams\"\xae\x01\n\x0bDnsResponse\x12\x18\n\ + \x07success\x18\x01\x20\x01(\x08R\x07success\x12/\n\x13clientconf_outdat\ + ed\x18\x02\x20\x01(\x08R\x12clientconfOutdated\x12T\n\x16bidirectional_r\ + esponse\x18\x03\x20\x01(\x0b2\x1d.conjure.RegistrationResponseR\x15bidir\ + ectionalResponse*+\n\x07KeyType\x12\x0f\n\x0bAES_GCM_128\x10Z\x12\x0f\n\ + \x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\x12\x07\n\x03UDP\x10\x01\x12\ + \x07\n\x03DOT\x10\x02\x12\x07\n\x03DOH\x10\x03*\xe7\x01\n\x0eC2S_Transit\ + ion\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_RE\ + CONNECT\x10\x02\x12\x15\n\x11C2S_SESSION_CLOSE\x10\x03\x12\x14\n\x10C2S_\ + YIELD_UPLOAD\x10\x04\x12\x16\n\x12C2S_ACQUIRE_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\x0eErrorReaso\ + nS2C\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*\x82\ + \x01\n\rTransportType\x12\x08\n\x04Null\x10\0\x12\x07\n\x03Min\x10\x01\ + \x12\t\n\x05Obfs4\x10\x02\x12\x08\n\x04DTLS\x10\x03\x12\n\n\x06Prefix\ + \x10\x04\x12\x08\n\x04uTLS\x10\x05\x12\n\n\x06Format\x10\x06\x12\x08\n\ + \x04WASM\x10\x07\x12\x07\n\x03FTE\x10\x08\x12\x08\n\x04Quic\x10\t\x12\n\ + \n\x06Webrtc\x10c*\x86\x01\n\x12RegistrationSource\x12\x0f\n\x0bUnspecif\ + ied\x10\0\x12\x0c\n\x08Detector\x10\x01\x12\x07\n\x03API\x10\x02\x12\x13\ + \n\x0fDetectorPrescan\x10\x03\x12\x14\n\x10BidirectionalAPI\x10\x04\x12\ + \x07\n\x03DNS\x10\x05\x12\x14\n\x10BidirectionalDNS\x10\x06*@\n\x11Stati\ + onOperations\x12\x0b\n\x07Unknown\x10\0\x12\x07\n\x03New\x10\x01\x12\n\n\ + \x06Update\x10\x02\x12\t\n\x05Clear\x10\x03*$\n\x07IPProto\x12\x07\n\x03\ + Unk\x10\0\x12\x07\n\x03Tcp\x10\x01\x12\x07\n\x03Udp\x10\x02J\xc0\x8d\x01\ + \n\x07\x12\x05\0\0\xa1\x03\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\ + \n\x01\x02\x12\x03\x06\0\x102\xa5\x01\x20TODO:\x20We're\x20using\x20prot\ + o2\x20because\x20it's\x20the\x20default\x20on\x20Ubuntu\x2016.04.\n\x20A\ + t\x20some\x20point\x20we\x20will\x20want\x20to\x20migrate\x20to\x20proto\ + 3,\x20but\x20we\x20are\x20not\n\x20using\x20any\x20proto3\x20features\ + \x20yet.\n\n\t\n\x02\x03\0\x12\x03\x08\0#\n\n\n\x02\x05\0\x12\x04\n\0\r\ + \x01\n\n\n\x03\x05\0\x01\x12\x03\n\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\ + \x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x0b\x04\x0f\n\x0c\n\ + \x05\x05\0\x02\0\x02\x12\x03\x0b\x12\x14\n\x20\n\x04\x05\0\x02\x01\x12\ + \x03\x0c\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\ + \x02\x01\x01\x12\x03\x0c\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\ + \x0c\x12\x14\n\n\n\x02\x04\0\x12\x04\x0f\0\x14\x01\n\n\n\x03\x04\0\x01\ + \x12\x03\x0f\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x11\x04\x1b\x1a'\x20A\ + \x20public\x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\ + \x04\0\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ + \x11\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x11\x13\x16\n\x0c\n\x05\ + \x04\0\x02\0\x03\x12\x03\x11\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\ + \x13\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x13\x04\x0c\n\x0c\n\ + \x05\x04\0\x02\x01\x06\x12\x03\x13\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\ + \x12\x03\x13\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x13\x1c\x1d\n\ + \n\n\x02\x04\x01\x12\x04\x16\0<\x01\n\n\n\x03\x04\x01\x01\x12\x03\x16\ + \x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x1b\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\x1b\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\0\x05\x12\x03\x1b\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\ + \x1b\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1b\x1f\x20\n\xf7\x01\ + \n\x04\x04\x01\x02\x01\x12\x03\"\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20i\ + pv4\x20address,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\x20IP\ + v4\x20address\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resolved\ + \x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20the\x20client\x20may\ + \x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20un\ + trusted,\x20or\x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\ + \x05\x04\x01\x02\x01\x04\x12\x03\"\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\ + \x05\x12\x03\"\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\"\x15\x1d\n\ + \x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\"\x20!\n>\n\x04\x04\x01\x02\x02\ + \x12\x03%\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20ne\ + twork\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\x20\ + contacting\x20this\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20default\ + \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\x032\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20duration,\x20in\ + \x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connection\x20to\ + \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\x032\x04\x0c\n\x0c\n\ + \x05\x04\x01\x02\x04\x05\x12\x032\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\ + \x12\x032\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x032\x1e\x1f\n\xb0\ + \x02\n\x04\x04\x01\x02\x05\x12\x03;\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\x03;\x04\x0c\n\x0c\n\x05\x04\ + \x01\x02\x05\x05\x12\x03;\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03;\ + \x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\x08\n\ + \x02\x04\x02\x12\x04S\0Z\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\x03S\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\ + \x03T\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03T\x04\x0c\n\x0c\n\x05\ + \x04\x02\x02\0\x06\x12\x03T\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03T\ + \x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03T$%\n\x0b\n\x04\x04\x02\x02\ + \x01\x12\x03U\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03U\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\x01\x05\x12\x03U\r\x13\n\x0c\n\x05\x04\x02\x02\ + \x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03U!\"\n\ + \x0b\n\x04\x04\x02\x02\x02\x12\x03V\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\ + \x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03V\r\x13\n\x0c\n\ + \x05\x04\x02\x02\x02\x01\x12\x03V\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\ + \x12\x03V%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03W\x049\n\x0c\n\x05\x04\ + \x02\x02\x03\x04\x12\x03W\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\ + \x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03W\x204\n\x0c\n\x05\ + \x04\x02\x02\x03\x03\x12\x03W78\n\x0b\n\x04\x04\x02\x02\x04\x12\x03X\x04\ + '\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03X\x04\x0c\n\x0c\n\x05\x04\x02\ + \x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03X\x14\ + \"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03X%&\n\x0b\n\x04\x04\x02\x02\ + \x05\x12\x03Y\x04)\n\x0c\n\x05\x04\x02\x02\x05\x04\x12\x03Y\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\x05\x06\x12\x03Y\r\x17\n\x0c\n\x05\x04\x02\x02\ + \x05\x01\x12\x03Y\x18$\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03Y'(\n-\n\ + \x02\x04\x03\x12\x04]\0d\x01\x1a!\x20Configuration\x20for\x20DNS\x20regi\ + strar\n\n\n\n\x03\x04\x03\x01\x12\x03]\x08\x12\n\x0b\n\x04\x04\x03\x02\0\ + \x12\x03^\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03^\x04\x0c\n\x0c\n\ + \x05\x04\x03\x02\0\x06\x12\x03^\r\x19\n\x0c\n\x05\x04\x03\x02\0\x01\x12\ + \x03^\x1a(\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03^+,\n\x0b\n\x04\x04\x03\ + \x02\x01\x12\x03_\x04\x1f\n\x0c\n\x05\x04\x03\x02\x01\x04\x12\x03_\x04\ + \x0c\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03_\r\x13\n\x0c\n\x05\x04\x03\ + \x02\x01\x01\x12\x03_\x14\x1a\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03_\ + \x1d\x1e\n\x0b\n\x04\x04\x03\x02\x02\x12\x03`\x04\x1f\n\x0c\n\x05\x04\ + \x03\x02\x02\x04\x12\x03`\x04\x0c\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\ + \x03`\r\x13\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03`\x14\x1a\n\x0c\n\x05\ + \x04\x03\x02\x02\x03\x12\x03`\x1d\x1e\n\x0b\n\x04\x04\x03\x02\x03\x12\ + \x03a\x04\x1e\n\x0c\n\x05\x04\x03\x02\x03\x04\x12\x03a\x04\x0c\n\x0c\n\ + \x05\x04\x03\x02\x03\x05\x12\x03a\r\x12\n\x0c\n\x05\x04\x03\x02\x03\x01\ + \x12\x03a\x13\x19\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x03a\x1c\x1d\n\x0b\ + \n\x04\x04\x03\x02\x04\x12\x03b\x04*\n\x0c\n\x05\x04\x03\x02\x04\x04\x12\ + \x03b\x04\x0c\n\x0c\n\x05\x04\x03\x02\x04\x05\x12\x03b\r\x13\n\x0c\n\x05\ + \x04\x03\x02\x04\x01\x12\x03b\x14%\n\x0c\n\x05\x04\x03\x02\x04\x03\x12\ + \x03b()\n\x0b\n\x04\x04\x03\x02\x05\x12\x03c\x04$\n\x0c\n\x05\x04\x03\ + \x02\x05\x04\x12\x03c\x04\x0c\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\x03c\r\ + \x13\n\x0c\n\x05\x04\x03\x02\x05\x01\x12\x03c\x14\x1f\n\x0c\n\x05\x04\ + \x03\x02\x05\x03\x12\x03c\"#\n\n\n\x02\x05\x01\x12\x04f\0j\x01\n\n\n\x03\ + \x05\x01\x01\x12\x03f\x05\x11\n\x0b\n\x04\x05\x01\x02\0\x12\x03g\x04\x0c\ + \n\x0c\n\x05\x05\x01\x02\0\x01\x12\x03g\x04\x07\n\x0c\n\x05\x05\x01\x02\ + \0\x02\x12\x03g\n\x0b\n\x0b\n\x04\x05\x01\x02\x01\x12\x03h\x04\x0c\n\x0c\ + \n\x05\x05\x01\x02\x01\x01\x12\x03h\x04\x07\n\x0c\n\x05\x05\x01\x02\x01\ + \x02\x12\x03h\n\x0b\n\x0b\n\x04\x05\x01\x02\x02\x12\x03i\x04\x0c\n\x0c\n\ + \x05\x05\x01\x02\x02\x01\x12\x03i\x04\x07\n\x0c\n\x05\x05\x01\x02\x02\ + \x02\x12\x03i\n\x0b\n\n\n\x02\x04\x04\x12\x04l\0n\x01\n\n\n\x03\x04\x04\ + \x01\x12\x03l\x08\x11\n\x0b\n\x04\x04\x04\x02\0\x12\x03m\x04)\n\x0c\n\ + \x05\x04\x04\x02\0\x04\x12\x03m\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x06\ + \x12\x03m\r\x19\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03m\x1a$\n\x0c\n\x05\ + \x04\x04\x02\0\x03\x12\x03m'(\n\n\n\x02\x04\x05\x12\x04p\0r\x01\n\n\n\ + \x03\x04\x05\x01\x12\x03p\x08\x1a\n\x0b\n\x04\x04\x05\x02\0\x12\x03q\x04\ + 1\n\x0c\n\x05\x04\x05\x02\0\x04\x12\x03q\x04\x0c\n\x0c\n\x05\x04\x05\x02\ + \0\x06\x12\x03q\r\x1b\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03q\x1c,\n\x0c\ + \n\x05\x04\x05\x02\0\x03\x12\x03q/0\n\n\n\x02\x04\x06\x12\x04t\0w\x01\n\ + \n\n\x03\x04\x06\x01\x12\x03t\x08\x16\n\x0b\n\x04\x04\x06\x02\0\x12\x03u\ + \x04\x1f\n\x0c\n\x05\x04\x06\x02\0\x04\x12\x03u\x04\x0c\n\x0c\n\x05\x04\ + \x06\x02\0\x05\x12\x03u\r\x13\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03u\x14\ + \x1a\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03u\x1d\x1e\n\x0b\n\x04\x04\x06\ + \x02\x01\x12\x03v\x04\x20\n\x0c\n\x05\x04\x06\x02\x01\x04\x12\x03v\x04\ + \x0c\n\x0c\n\x05\x04\x06\x02\x01\x05\x12\x03v\r\x13\n\x0c\n\x05\x04\x06\ + \x02\x01\x01\x12\x03v\x14\x1b\n\x0c\n\x05\x04\x06\x02\x01\x03\x12\x03v\ + \x1e\x1f\n.\n\x02\x05\x02\x12\x05z\0\x84\x01\x01\x1a!\x20State\x20transi\ + tions\x20of\x20the\x20client\n\n\n\n\x03\x05\x02\x01\x12\x03z\x05\x13\n\ + \x0b\n\x04\x05\x02\x02\0\x12\x03{\x04\x16\n\x0c\n\x05\x05\x02\x02\0\x01\ + \x12\x03{\x04\x11\n\x0c\n\x05\x05\x02\x02\0\x02\x12\x03{\x14\x15\n\"\n\ + \x04\x05\x02\x02\x01\x12\x03|\x04\x19\"\x15\x20connect\x20me\x20to\x20sq\ + uid\n\n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03|\x04\x14\n\x0c\n\x05\x05\ + \x02\x02\x01\x02\x12\x03|\x17\x18\n,\n\x04\x05\x02\x02\x02\x12\x03}\x04!\ \"\x1f\x20connect\x20me\x20to\x20provided\x20covert\n\n\x0c\n\x05\x05\ - \x02\x02\x02\x01\x12\x03~\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\x12\ - \x03~\x1e\x20\n\x0b\n\x04\x05\x02\x02\x03\x12\x03\x7f\x04\x1d\n\x0c\n\ - \x05\x05\x02\x02\x03\x01\x12\x03\x7f\x04\x18\n\x0c\n\x05\x05\x02\x02\x03\ - \x02\x12\x03\x7f\x1b\x1c\n\x0c\n\x04\x05\x02\x02\x04\x12\x04\x80\x01\x04\ - \x1a\n\r\n\x05\x05\x02\x02\x04\x01\x12\x04\x80\x01\x04\x15\n\r\n\x05\x05\ - \x02\x02\x04\x02\x12\x04\x80\x01\x18\x19\n\x0c\n\x04\x05\x02\x02\x05\x12\ - \x04\x81\x01\x04\x19\n\r\n\x05\x05\x02\x02\x05\x01\x12\x04\x81\x01\x04\ - \x14\n\r\n\x05\x05\x02\x02\x05\x02\x12\x04\x81\x01\x17\x18\n\x0c\n\x04\ - \x05\x02\x02\x06\x12\x04\x82\x01\x04\x1b\n\r\n\x05\x05\x02\x02\x06\x01\ - \x12\x04\x82\x01\x04\x16\n\r\n\x05\x05\x02\x02\x06\x02\x12\x04\x82\x01\ - \x19\x1a\n\x0c\n\x04\x05\x02\x02\x07\x12\x04\x83\x01\x04%\n\r\n\x05\x05\ - \x02\x02\x07\x01\x12\x04\x83\x01\x04\x20\n\r\n\x05\x05\x02\x02\x07\x02\ - \x12\x04\x83\x01#$\n\x0c\n\x04\x05\x02\x02\x08\x12\x04\x84\x01\x04\x14\n\ - \r\n\x05\x05\x02\x02\x08\x01\x12\x04\x84\x01\x04\r\n\r\n\x05\x05\x02\x02\ - \x08\x02\x12\x04\x84\x01\x10\x13\n/\n\x02\x05\x03\x12\x06\x88\x01\0\x90\ - \x01\x01\x1a!\x20State\x20transitions\x20of\x20the\x20server\n\n\x0b\n\ - \x03\x05\x03\x01\x12\x04\x88\x01\x05\x13\n\x0c\n\x04\x05\x03\x02\0\x12\ - \x04\x89\x01\x04\x16\n\r\n\x05\x05\x03\x02\0\x01\x12\x04\x89\x01\x04\x11\ - \n\r\n\x05\x05\x03\x02\0\x02\x12\x04\x89\x01\x14\x15\n\"\n\x04\x05\x03\ - \x02\x01\x12\x04\x8a\x01\x04\x19\"\x14\x20connected\x20to\x20squid\n\n\r\ - \n\x05\x05\x03\x02\x01\x01\x12\x04\x8a\x01\x04\x14\n\r\n\x05\x05\x03\x02\ - \x01\x02\x12\x04\x8a\x01\x17\x18\n(\n\x04\x05\x03\x02\x02\x12\x04\x8b\ - \x01\x04!\"\x1a\x20connected\x20to\x20covert\x20host\n\n\r\n\x05\x05\x03\ - \x02\x02\x01\x12\x04\x8b\x01\x04\x1b\n\r\n\x05\x05\x03\x02\x02\x02\x12\ - \x04\x8b\x01\x1e\x20\n\x0c\n\x04\x05\x03\x02\x03\x12\x04\x8c\x01\x04\x1e\ - \n\r\n\x05\x05\x03\x02\x03\x01\x12\x04\x8c\x01\x04\x19\n\r\n\x05\x05\x03\ - \x02\x03\x02\x12\x04\x8c\x01\x1c\x1d\n\x0c\n\x04\x05\x03\x02\x04\x12\x04\ - \x8d\x01\x04\x1a\n\r\n\x05\x05\x03\x02\x04\x01\x12\x04\x8d\x01\x04\x15\n\ - \r\n\x05\x05\x03\x02\x04\x02\x12\x04\x8d\x01\x18\x19\nS\n\x04\x05\x03\ - \x02\x05\x12\x04\x8f\x01\x04\x14\x1aE\x20TODO\x20should\x20probably\x20a\ - lso\x20allow\x20EXPECT_RECONNECT\x20here,\x20for\x20DittoTap\n\n\r\n\x05\ - \x05\x03\x02\x05\x01\x12\x04\x8f\x01\x04\r\n\r\n\x05\x05\x03\x02\x05\x02\ - \x12\x04\x8f\x01\x10\x13\n8\n\x02\x05\x04\x12\x06\x93\x01\0\x9d\x01\x01\ - \x1a*\x20Should\x20accompany\x20all\x20S2C_ERROR\x20messages.\n\n\x0b\n\ - \x03\x05\x04\x01\x12\x04\x93\x01\x05\x13\n\x0c\n\x04\x05\x04\x02\0\x12\ - \x04\x94\x01\x04\x11\n\r\n\x05\x05\x04\x02\0\x01\x12\x04\x94\x01\x04\x0c\ - \n\r\n\x05\x05\x04\x02\0\x02\x12\x04\x94\x01\x0f\x10\n*\n\x04\x05\x04\ - \x02\x01\x12\x04\x95\x01\x04\x16\"\x1c\x20Squid\x20TCP\x20connection\x20\ - broke\n\n\r\n\x05\x05\x04\x02\x01\x01\x12\x04\x95\x01\x04\x11\n\r\n\x05\ - \x05\x04\x02\x01\x02\x12\x04\x95\x01\x14\x15\n7\n\x04\x05\x04\x02\x02\ - \x12\x04\x96\x01\x04\x18\")\x20You\x20told\x20me\x20something\x20was\x20\ - wrong,\x20client\n\n\r\n\x05\x05\x04\x02\x02\x01\x12\x04\x96\x01\x04\x13\ - \n\r\n\x05\x05\x04\x02\x02\x02\x12\x04\x96\x01\x16\x17\n@\n\x04\x05\x04\ - \x02\x03\x12\x04\x97\x01\x04\x18\"2\x20You\x20messed\x20up,\x20client\ - \x20(e.g.\x20sent\x20a\x20bad\x20protobuf)\n\n\r\n\x05\x05\x04\x02\x03\ - \x01\x12\x04\x97\x01\x04\x13\n\r\n\x05\x05\x04\x02\x03\x02\x12\x04\x97\ - \x01\x16\x17\n\x17\n\x04\x05\x04\x02\x04\x12\x04\x98\x01\x04\x19\"\t\x20\ - I\x20broke\n\n\r\n\x05\x05\x04\x02\x04\x01\x12\x04\x98\x01\x04\x14\n\r\n\ - \x05\x05\x04\x02\x04\x02\x12\x04\x98\x01\x17\x18\nE\n\x04\x05\x04\x02\ - \x05\x12\x04\x99\x01\x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\ - \x20use\x20this\x20decoy\x20right\x20now\n\n\r\n\x05\x05\x04\x02\x05\x01\ - \x12\x04\x99\x01\x04\x12\n\r\n\x05\x05\x04\x02\x05\x02\x12\x04\x99\x01\ - \x15\x16\nD\n\x04\x05\x04\x02\x06\x12\x04\x9b\x01\x04\x18\"6\x20My\x20st\ - ream\x20to\x20you\x20broke.\x20(This\x20is\x20impossible\x20to\x20send)\ - \n\n\r\n\x05\x05\x04\x02\x06\x01\x12\x04\x9b\x01\x04\x11\n\r\n\x05\x05\ - \x04\x02\x06\x02\x12\x04\x9b\x01\x14\x17\nA\n\x04\x05\x04\x02\x07\x12\ - \x04\x9c\x01\x04\x19\"3\x20You\x20never\x20came\x20back.\x20(This\x20is\ - \x20impossible\x20to\x20send)\n\n\r\n\x05\x05\x04\x02\x07\x01\x12\x04\ - \x9c\x01\x04\x12\n\r\n\x05\x05\x04\x02\x07\x02\x12\x04\x9c\x01\x15\x18\n\ - \x0c\n\x02\x05\x05\x12\x06\x9f\x01\0\xa4\x01\x01\n\x0b\n\x03\x05\x05\x01\ - \x12\x04\x9f\x01\x05\x12\n\x0c\n\x04\x05\x05\x02\0\x12\x04\xa0\x01\x04\r\ - \n\r\n\x05\x05\x05\x02\0\x01\x12\x04\xa0\x01\x04\x08\n\r\n\x05\x05\x05\ - \x02\0\x02\x12\x04\xa0\x01\x0b\x0c\n`\n\x04\x05\x05\x02\x01\x12\x04\xa1\ - \x01\x04\x0c\"R\x20Send\x20a\x2032-byte\x20HMAC\x20id\x20to\x20let\x20th\ - e\x20station\x20distinguish\x20registrations\x20to\x20same\x20host\n\n\r\ - \n\x05\x05\x05\x02\x01\x01\x12\x04\xa1\x01\x04\x07\n\r\n\x05\x05\x05\x02\ - \x01\x02\x12\x04\xa1\x01\n\x0b\n$\n\x04\x05\x05\x02\x02\x12\x04\xa2\x01\ - \x04\x0e\"\x16\x20Not\x20implemented\x20yet?\n\n\r\n\x05\x05\x05\x02\x02\ - \x01\x12\x04\xa2\x01\x04\t\n\r\n\x05\x05\x05\x02\x02\x02\x12\x04\xa2\x01\ - \x0c\r\n1\n\x04\x05\x05\x02\x03\x12\x04\xa3\x01\x04\x10\"#\x20UDP\x20tra\ - nsport:\x20WebRTC\x20DataChannel\n\n\r\n\x05\x05\x05\x02\x03\x01\x12\x04\ - \xa3\x01\x04\n\n\r\n\x05\x05\x05\x02\x03\x02\x12\x04\xa3\x01\r\x0f\n:\n\ - \x02\x04\x07\x12\x06\xa7\x01\0\xad\x01\x01\x1a,\x20Deflated\x20ICE\x20Ca\ - ndidate\x20by\x20seed2sdp\x20package\n\n\x0b\n\x03\x04\x07\x01\x12\x04\ - \xa7\x01\x08\x1a\n5\n\x04\x04\x07\x02\0\x12\x04\xa9\x01\x04!\x1a'\x20IP\ - \x20is\x20represented\x20in\x20its\x2016-byte\x20form\n\n\r\n\x05\x04\ - \x07\x02\0\x04\x12\x04\xa9\x01\x04\x0c\n\r\n\x05\x04\x07\x02\0\x05\x12\ - \x04\xa9\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\xa9\x01\x14\x1c\n\ - \r\n\x05\x04\x07\x02\0\x03\x12\x04\xa9\x01\x1f\x20\n\x0c\n\x04\x04\x07\ - \x02\x01\x12\x04\xaa\x01\x04!\n\r\n\x05\x04\x07\x02\x01\x04\x12\x04\xaa\ - \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x01\x05\x12\x04\xaa\x01\r\x13\n\r\n\ - \x05\x04\x07\x02\x01\x01\x12\x04\xaa\x01\x14\x1c\n\r\n\x05\x04\x07\x02\ - \x01\x03\x12\x04\xaa\x01\x1f\x20\n\x9b\x01\n\x04\x04\x07\x02\x02\x12\x04\ - \xac\x01\x04&\x1a\x8c\x01\x20Composed\x20info\x20includes\x20port,\x20tc\ - ptype\x20(unset\x20if\x20not\x20tcp),\x20candidate\x20type\x20(host,\x20\ - srflx,\x20prflx),\x20protocol\x20(TCP/UDP),\x20and\x20component\x20(RTP/\ - RTCP)\n\n\r\n\x05\x04\x07\x02\x02\x04\x12\x04\xac\x01\x04\x0c\n\r\n\x05\ - \x04\x07\x02\x02\x05\x12\x04\xac\x01\r\x13\n\r\n\x05\x04\x07\x02\x02\x01\ - \x12\x04\xac\x01\x14!\n\r\n\x05\x04\x07\x02\x02\x03\x12\x04\xac\x01$%\n;\ - \n\x02\x04\x08\x12\x06\xb0\x01\0\xb3\x01\x01\x1a-\x20Deflated\x20SDP\x20\ - for\x20WebRTC\x20by\x20seed2sdp\x20package\n\n\x0b\n\x03\x04\x08\x01\x12\ - \x04\xb0\x01\x08\x11\n\x0c\n\x04\x04\x08\x02\0\x12\x04\xb1\x01\x04\x1d\n\ - \r\n\x05\x04\x08\x02\0\x04\x12\x04\xb1\x01\x04\x0c\n\r\n\x05\x04\x08\x02\ - \0\x05\x12\x04\xb1\x01\r\x13\n\r\n\x05\x04\x08\x02\0\x01\x12\x04\xb1\x01\ - \x14\x18\n\r\n\x05\x04\x08\x02\0\x03\x12\x04\xb1\x01\x1b\x1c\n2\n\x04\ - \x04\x08\x02\x01\x12\x04\xb2\x01\x04/\"$\x20there\x20could\x20be\x20mult\ - iple\x20candidates\n\n\r\n\x05\x04\x08\x02\x01\x04\x12\x04\xb2\x01\x04\ - \x0c\n\r\n\x05\x04\x08\x02\x01\x06\x12\x04\xb2\x01\r\x1f\n\r\n\x05\x04\ - \x08\x02\x01\x01\x12\x04\xb2\x01\x20*\n\r\n\x05\x04\x08\x02\x01\x03\x12\ - \x04\xb2\x01-.\n?\n\x02\x04\t\x12\x06\xb6\x01\0\xb9\x01\x01\x1a1\x20WebR\ - TCSignal\x20includes\x20a\x20deflated\x20SDP\x20and\x20a\x20seed\n\n\x0b\ - \n\x03\x04\t\x01\x12\x04\xb6\x01\x08\x14\n\x0c\n\x04\x04\t\x02\0\x12\x04\ - \xb7\x01\x04\x1d\n\r\n\x05\x04\t\x02\0\x04\x12\x04\xb7\x01\x04\x0c\n\r\n\ - \x05\x04\t\x02\0\x05\x12\x04\xb7\x01\r\x13\n\r\n\x05\x04\t\x02\0\x01\x12\ - \x04\xb7\x01\x14\x18\n\r\n\x05\x04\t\x02\0\x03\x12\x04\xb7\x01\x1b\x1c\n\ - \x0c\n\x04\x04\t\x02\x01\x12\x04\xb8\x01\x04\x1f\n\r\n\x05\x04\t\x02\x01\ - \x04\x12\x04\xb8\x01\x04\x0c\n\r\n\x05\x04\t\x02\x01\x06\x12\x04\xb8\x01\ - \r\x16\n\r\n\x05\x04\t\x02\x01\x01\x12\x04\xb8\x01\x17\x1a\n\r\n\x05\x04\ - \t\x02\x01\x03\x12\x04\xb8\x01\x1d\x1e\n\x0c\n\x02\x04\n\x12\x06\xbb\x01\ - \0\xd2\x01\x01\n\x0b\n\x03\x04\n\x01\x12\x04\xbb\x01\x08\x17\nO\n\x04\ - \x04\n\x02\0\x12\x04\xbd\x01\x04)\x1aA\x20Should\x20accompany\x20(at\x20\ - least)\x20SESSION_INIT\x20and\x20CONFIRM_RECONNECT.\n\n\r\n\x05\x04\n\ - \x02\0\x04\x12\x04\xbd\x01\x04\x0c\n\r\n\x05\x04\n\x02\0\x05\x12\x04\xbd\ - \x01\r\x13\n\r\n\x05\x04\n\x02\0\x01\x12\x04\xbd\x01\x14$\n\r\n\x05\x04\ - \n\x02\0\x03\x12\x04\xbd\x01'(\nv\n\x04\x04\n\x02\x01\x12\x04\xc1\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\n\x02\x01\x04\x12\x04\xc1\x01\x04\ - \x0c\n\r\n\x05\x04\n\x02\x01\x06\x12\x04\xc1\x01\r\x1b\n\r\n\x05\x04\n\ - \x02\x01\x01\x12\x04\xc1\x01\x1c,\n\r\n\x05\x04\n\x02\x01\x03\x12\x04\ - \xc1\x01/0\nc\n\x04\x04\n\x02\x02\x12\x04\xc5\x01\x04(\x1aU\x20The\x20st\ - ation\x20can\x20send\x20client\x20config\x20info\x20piggybacked\n\x20on\ - \x20any\x20message,\x20as\x20it\x20sees\x20fit\n\n\r\n\x05\x04\n\x02\x02\ - \x04\x12\x04\xc5\x01\x04\x0c\n\r\n\x05\x04\n\x02\x02\x06\x12\x04\xc5\x01\ - \r\x17\n\r\n\x05\x04\n\x02\x02\x01\x12\x04\xc5\x01\x18#\n\r\n\x05\x04\n\ - \x02\x02\x03\x12\x04\xc5\x01&'\nP\n\x04\x04\n\x02\x03\x12\x04\xc8\x01\ - \x04+\x1aB\x20If\x20state_transition\x20==\x20S2C_ERROR,\x20this\x20fiel\ - d\x20is\x20the\x20explanation.\n\n\r\n\x05\x04\n\x02\x03\x04\x12\x04\xc8\ - \x01\x04\x0c\n\r\n\x05\x04\n\x02\x03\x06\x12\x04\xc8\x01\r\x1b\n\r\n\x05\ - \x04\n\x02\x03\x01\x12\x04\xc8\x01\x1c&\n\r\n\x05\x04\n\x02\x03\x03\x12\ - \x04\xc8\x01)*\nQ\n\x04\x04\n\x02\x04\x12\x04\xcb\x01\x04$\x1aC\x20Signa\ - ls\x20client\x20to\x20stop\x20connecting\x20for\x20following\x20amount\ - \x20of\x20seconds\n\n\r\n\x05\x04\n\x02\x04\x04\x12\x04\xcb\x01\x04\x0c\ - \n\r\n\x05\x04\n\x02\x04\x05\x12\x04\xcb\x01\r\x13\n\r\n\x05\x04\n\x02\ - \x04\x01\x12\x04\xcb\x01\x14\x1f\n\r\n\x05\x04\n\x02\x04\x03\x12\x04\xcb\ - \x01\"#\nK\n\x04\x04\n\x02\x05\x12\x04\xce\x01\x04#\x1a=\x20Sent\x20in\ - \x20SESSION_INIT,\x20identifies\x20the\x20station\x20that\x20picked\x20u\ - p\n\n\r\n\x05\x04\n\x02\x05\x04\x12\x04\xce\x01\x04\x0c\n\r\n\x05\x04\n\ - \x02\x05\x05\x12\x04\xce\x01\r\x13\n\r\n\x05\x04\n\x02\x05\x01\x12\x04\ - \xce\x01\x14\x1e\n\r\n\x05\x04\n\x02\x05\x03\x12\x04\xce\x01!\"\nG\n\x04\ - \x04\n\x02\x06\x12\x04\xd1\x01\x04!\x1a9\x20Random-sized\x20junk\x20to\ - \x20defeat\x20packet\x20size\x20fingerprinting.\n\n\r\n\x05\x04\n\x02\ - \x06\x04\x12\x04\xd1\x01\x04\x0c\n\r\n\x05\x04\n\x02\x06\x05\x12\x04\xd1\ - \x01\r\x12\n\r\n\x05\x04\n\x02\x06\x01\x12\x04\xd1\x01\x13\x1a\n\r\n\x05\ - \x04\n\x02\x06\x03\x12\x04\xd1\x01\x1d\x20\n\x0c\n\x02\x04\x0b\x12\x06\ - \xd4\x01\0\xda\x01\x01\n\x0b\n\x03\x04\x0b\x01\x12\x04\xd4\x01\x08\x19\n\ - \x0c\n\x04\x04\x0b\x02\0\x12\x04\xd5\x01\x08&\n\r\n\x05\x04\x0b\x02\0\ - \x04\x12\x04\xd5\x01\x08\x10\n\r\n\x05\x04\x0b\x02\0\x05\x12\x04\xd5\x01\ - \x11\x15\n\r\n\x05\x04\x0b\x02\0\x01\x12\x04\xd5\x01\x16!\n\r\n\x05\x04\ - \x0b\x02\0\x03\x12\x04\xd5\x01$%\n\x0c\n\x04\x04\x0b\x02\x01\x12\x04\xd6\ - \x01\x08%\n\r\n\x05\x04\x0b\x02\x01\x04\x12\x04\xd6\x01\x08\x10\n\r\n\ - \x05\x04\x0b\x02\x01\x05\x12\x04\xd6\x01\x11\x15\n\r\n\x05\x04\x0b\x02\ - \x01\x01\x12\x04\xd6\x01\x16\x20\n\r\n\x05\x04\x0b\x02\x01\x03\x12\x04\ - \xd6\x01#$\n\x0c\n\x04\x04\x0b\x02\x02\x12\x04\xd7\x01\x08'\n\r\n\x05\ - \x04\x0b\x02\x02\x04\x12\x04\xd7\x01\x08\x10\n\r\n\x05\x04\x0b\x02\x02\ - \x05\x12\x04\xd7\x01\x11\x15\n\r\n\x05\x04\x0b\x02\x02\x01\x12\x04\xd7\ - \x01\x16\"\n\r\n\x05\x04\x0b\x02\x02\x03\x12\x04\xd7\x01%&\n\x0c\n\x04\ - \x04\x0b\x02\x03\x12\x04\xd8\x01\x04\x1e\n\r\n\x05\x04\x0b\x02\x03\x04\ - \x12\x04\xd8\x01\x04\x0c\n\r\n\x05\x04\x0b\x02\x03\x05\x12\x04\xd8\x01\r\ - \x11\n\r\n\x05\x04\x0b\x02\x03\x01\x12\x04\xd8\x01\x12\x19\n\r\n\x05\x04\ - \x0b\x02\x03\x03\x12\x04\xd8\x01\x1c\x1d\n\x0c\n\x04\x04\x0b\x02\x04\x12\ - \x04\xd9\x01\x04!\n\r\n\x05\x04\x0b\x02\x04\x04\x12\x04\xd9\x01\x04\x0c\ - \n\r\n\x05\x04\x0b\x02\x04\x05\x12\x04\xd9\x01\r\x11\n\r\n\x05\x04\x0b\ - \x02\x04\x01\x12\x04\xd9\x01\x12\x1c\n\r\n\x05\x04\x0b\x02\x04\x03\x12\ - \x04\xd9\x01\x1f\x20\n\x0c\n\x02\x04\x0c\x12\x06\xdc\x01\0\x91\x02\x01\n\ - \x0b\n\x03\x04\x0c\x01\x12\x04\xdc\x01\x08\x17\n\x0c\n\x04\x04\x0c\x02\0\ - \x12\x04\xdd\x01\x04)\n\r\n\x05\x04\x0c\x02\0\x04\x12\x04\xdd\x01\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\0\x05\x12\x04\xdd\x01\r\x13\n\r\n\x05\x04\x0c\ - \x02\0\x01\x12\x04\xdd\x01\x14$\n\r\n\x05\x04\x0c\x02\0\x03\x12\x04\xdd\ - \x01'(\n\xd0\x01\n\x04\x04\x0c\x02\x01\x12\x04\xe2\x01\x04.\x1a\xc1\x01\ - \x20The\x20client\x20reports\x20its\x20decoy\x20list's\x20version\x20num\ - ber\x20here,\x20which\x20the\n\x20station\x20can\x20use\x20to\x20decide\ - \x20whether\x20to\x20send\x20an\x20updated\x20one.\x20The\x20station\n\ - \x20should\x20always\x20send\x20a\x20list\x20if\x20this\x20field\x20is\ - \x20set\x20to\x200.\n\n\r\n\x05\x04\x0c\x02\x01\x04\x12\x04\xe2\x01\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\x01\x05\x12\x04\xe2\x01\r\x13\n\r\n\x05\x04\ - \x0c\x02\x01\x01\x12\x04\xe2\x01\x14)\n\r\n\x05\x04\x0c\x02\x01\x03\x12\ - \x04\xe2\x01,-\n\x0c\n\x04\x04\x0c\x02\x02\x12\x04\xe4\x01\x041\n\r\n\ - \x05\x04\x0c\x02\x02\x04\x12\x04\xe4\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\ - \x02\x06\x12\x04\xe4\x01\r\x1b\n\r\n\x05\x04\x0c\x02\x02\x01\x12\x04\xe4\ - \x01\x1c,\n\r\n\x05\x04\x0c\x02\x02\x03\x12\x04\xe4\x01/0\n\x80\x01\n\ - \x04\x04\x0c\x02\x03\x12\x04\xe8\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\x0c\x02\x03\x04\x12\x04\xe8\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\ - \x03\x05\x12\x04\xe8\x01\r\x13\n\r\n\x05\x04\x0c\x02\x03\x01\x12\x04\xe8\ - \x01\x14\x1f\n\r\n\x05\x04\x0c\x02\x03\x03\x12\x04\xe8\x01\"#\ng\n\x04\ - \x04\x0c\x02\x04\x12\x04\xec\x01\x04+\x1aY\x20High\x20level\x20client\ - \x20library\x20version\x20used\x20for\x20indicating\x20feature\x20suppor\ - t,\x20or\n\x20lack\x20therof.\n\n\r\n\x05\x04\x0c\x02\x04\x04\x12\x04\ - \xec\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x04\x05\x12\x04\xec\x01\r\x13\n\r\ - \n\x05\x04\x0c\x02\x04\x01\x12\x04\xec\x01\x14&\n\r\n\x05\x04\x0c\x02\ - \x04\x03\x12\x04\xec\x01)*\nq\n\x04\x04\x0c\x02\x05\x12\x04\xf0\x01\x04'\ - \x1ac\x20List\x20of\x20decoys\x20that\x20client\x20have\x20unsuccessfull\ - y\x20tried\x20in\x20current\x20session.\n\x20Could\x20be\x20sent\x20in\ - \x20chunks\n\n\r\n\x05\x04\x0c\x02\x05\x04\x12\x04\xf0\x01\x04\x0c\n\r\n\ - \x05\x04\x0c\x02\x05\x05\x12\x04\xf0\x01\r\x13\n\r\n\x05\x04\x0c\x02\x05\ - \x01\x12\x04\xf0\x01\x14!\n\r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf0\x01$\ - &\n\x0c\n\x04\x04\x0c\x02\x06\x12\x04\xf2\x01\x04%\n\r\n\x05\x04\x0c\x02\ - \x06\x04\x12\x04\xf2\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x06\x06\x12\x04\ - \xf2\x01\r\x19\n\r\n\x05\x04\x0c\x02\x06\x01\x12\x04\xf2\x01\x1a\x1f\n\r\ - \n\x05\x04\x0c\x02\x06\x03\x12\x04\xf2\x01\"$\nk\n\x04\x04\x0c\x02\x07\ - \x12\x04\xf5\x01\x04*\x1a]\x20NullTransport,\x20MinTransport,\x20Obfs4Tr\ - ansport,\x20etc.\x20Transport\x20type\x20we\x20want\x20from\x20phantom\ - \x20proxy\n\n\r\n\x05\x04\x0c\x02\x07\x04\x12\x04\xf5\x01\x04\x0c\n\r\n\ - \x05\x04\x0c\x02\x07\x06\x12\x04\xf5\x01\r\x1a\n\r\n\x05\x04\x0c\x02\x07\ - \x01\x12\x04\xf5\x01\x1b$\n\r\n\x05\x04\x0c\x02\x07\x03\x12\x04\xf5\x01'\ - )\n\x0c\n\x04\x04\x0c\x02\x08\x12\x04\xf7\x01\x047\n\r\n\x05\x04\x0c\x02\ - \x08\x04\x12\x04\xf7\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x08\x06\x12\x04\ - \xf7\x01\r\x20\n\r\n\x05\x04\x0c\x02\x08\x01\x12\x04\xf7\x01!1\n\r\n\x05\ - \x04\x0c\x02\x08\x03\x12\x04\xf7\x0146\n\xc8\x03\n\x04\x04\x0c\x02\t\x12\ - \x04\xff\x01\x04(\x1a\xb9\x03\x20Station\x20is\x20only\x20required\x20to\ - \x20check\x20this\x20variable\x20during\x20session\x20initialization.\n\ - \x20If\x20set,\x20station\x20must\x20facilitate\x20connection\x20to\x20s\ - aid\x20target\x20by\x20itself,\x20i.e.\x20write\x20into\x20squid\n\x20so\ - cket\x20an\x20HTTP/SOCKS/any\x20other\x20connection\x20request.\n\x20cov\ - ert_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\x20str\ - aight\x20to\x20squid?\n\n\r\n\x05\x04\x0c\x02\t\x04\x12\x04\xff\x01\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\t\x05\x12\x04\xff\x01\r\x13\n\r\n\x05\x04\x0c\ - \x02\t\x01\x12\x04\xff\x01\x14\"\n\r\n\x05\x04\x0c\x02\t\x03\x12\x04\xff\ - \x01%'\nR\n\x04\x04\x0c\x02\n\x12\x04\x82\x02\x042\x1aD\x20Used\x20in\ - \x20dark\x20decoys\x20to\x20signal\x20which\x20dark\x20decoy\x20it\x20wi\ - ll\x20connect\x20to.\n\n\r\n\x05\x04\x0c\x02\n\x04\x12\x04\x82\x02\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\n\x05\x12\x04\x82\x02\r\x13\n\r\n\x05\x04\x0c\ - \x02\n\x01\x12\x04\x82\x02\x14,\n\r\n\x05\x04\x0c\x02\n\x03\x12\x04\x82\ - \x02/1\nR\n\x04\x04\x0c\x02\x0b\x12\x04\x85\x02\x04\"\x1aD\x20Used\x20to\ - \x20indicate\x20to\x20server\x20if\x20client\x20is\x20registering\x20v4,\ - \x20v6\x20or\x20both\n\n\r\n\x05\x04\x0c\x02\x0b\x04\x12\x04\x85\x02\x04\ - \x0c\n\r\n\x05\x04\x0c\x02\x0b\x05\x12\x04\x85\x02\r\x11\n\r\n\x05\x04\ - \x0c\x02\x0b\x01\x12\x04\x85\x02\x12\x1c\n\r\n\x05\x04\x0c\x02\x0b\x03\ - \x12\x04\x85\x02\x1f!\n\x0c\n\x04\x04\x0c\x02\x0c\x12\x04\x86\x02\x04\"\ - \n\r\n\x05\x04\x0c\x02\x0c\x04\x12\x04\x86\x02\x04\x0c\n\r\n\x05\x04\x0c\ - \x02\x0c\x05\x12\x04\x86\x02\r\x11\n\r\n\x05\x04\x0c\x02\x0c\x01\x12\x04\ - \x86\x02\x12\x1c\n\r\n\x05\x04\x0c\x02\x0c\x03\x12\x04\x86\x02\x1f!\nD\n\ - \x04\x04\x0c\x02\r\x12\x04\x89\x02\x04*\x1a6\x20A\x20collection\x20of\ - \x20optional\x20flags\x20for\x20the\x20registration.\n\n\r\n\x05\x04\x0c\ - \x02\r\x04\x12\x04\x89\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\r\x06\x12\x04\ - \x89\x02\r\x1e\n\r\n\x05\x04\x0c\x02\r\x01\x12\x04\x89\x02\x1f$\n\r\n\ - \x05\x04\x0c\x02\r\x03\x12\x04\x89\x02')\nq\n\x04\x04\x0c\x02\x0e\x12\ - \x04\x8d\x02\x04-\x1ac\x20Transport\x20Extensions\n\x20TODO(jmwample)\ - \x20-\x20move\x20to\x20WebRTC\x20specific\x20transport\x20params\x20prot\ - obuf\x20message.\n\n\r\n\x05\x04\x0c\x02\x0e\x04\x12\x04\x8d\x02\x04\x0c\ - \n\r\n\x05\x04\x0c\x02\x0e\x06\x12\x04\x8d\x02\r\x19\n\r\n\x05\x04\x0c\ - \x02\x0e\x01\x12\x04\x8d\x02\x1a'\n\r\n\x05\x04\x0c\x02\x0e\x03\x12\x04\ - \x8d\x02*,\nG\n\x04\x04\x0c\x02\x0f\x12\x04\x90\x02\x04!\x1a9\x20Random-\ - sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprinting.\n\n\r\ - \n\x05\x04\x0c\x02\x0f\x04\x12\x04\x90\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\ - \x0f\x05\x12\x04\x90\x02\r\x12\n\r\n\x05\x04\x0c\x02\x0f\x01\x12\x04\x90\ - \x02\x13\x1a\n\r\n\x05\x04\x0c\x02\x0f\x03\x12\x04\x90\x02\x1d\x20\n\x0c\ - \n\x02\x04\r\x12\x06\x93\x02\0\x98\x02\x01\n\x0b\n\x03\x04\r\x01\x12\x04\ - \x93\x02\x08\x1e\n\xcb\x01\n\x04\x04\r\x02\0\x12\x04\x97\x02\x04*\x1a\ - \xbc\x01\x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20t\ - o\x20use\x20destination\x20port\n\x20randomization.\x20Should\x20be\x20c\ - hecked\x20against\x20selected\x20transport\x20to\x20ensure\n\x20that\x20\ - destination\x20port\x20randomization\x20is\x20supported.\n\n\r\n\x05\x04\ - \r\x02\0\x04\x12\x04\x97\x02\x04\x0c\n\r\n\x05\x04\r\x02\0\x05\x12\x04\ - \x97\x02\r\x11\n\r\n\x05\x04\r\x02\0\x01\x12\x04\x97\x02\x12$\n\r\n\x05\ - \x04\r\x02\0\x03\x12\x04\x97\x02')\n\x0c\n\x02\x05\x06\x12\x06\x9a\x02\0\ - \xa2\x02\x01\n\x0b\n\x03\x05\x06\x01\x12\x04\x9a\x02\x05\x17\n\x0c\n\x04\ - \x05\x06\x02\0\x12\x04\x9b\x02\x02\x12\n\r\n\x05\x05\x06\x02\0\x01\x12\ - \x04\x9b\x02\x02\r\n\r\n\x05\x05\x06\x02\0\x02\x12\x04\x9b\x02\x10\x11\n\ - \x0c\n\x04\x05\x06\x02\x01\x12\x04\x9c\x02\x08\x15\n\r\n\x05\x05\x06\x02\ - \x01\x01\x12\x04\x9c\x02\x08\x10\n\r\n\x05\x05\x06\x02\x01\x02\x12\x04\ - \x9c\x02\x13\x14\n\x0c\n\x04\x05\x06\x02\x02\x12\x04\x9d\x02\x08\x10\n\r\ - \n\x05\x05\x06\x02\x02\x01\x12\x04\x9d\x02\x08\x0b\n\r\n\x05\x05\x06\x02\ - \x02\x02\x12\x04\x9d\x02\x0e\x0f\n\x0c\n\x04\x05\x06\x02\x03\x12\x04\x9e\ - \x02\x02\x16\n\r\n\x05\x05\x06\x02\x03\x01\x12\x04\x9e\x02\x02\x11\n\r\n\ - \x05\x05\x06\x02\x03\x02\x12\x04\x9e\x02\x14\x15\n\x0c\n\x04\x05\x06\x02\ - \x04\x12\x04\x9f\x02\x02\x17\n\r\n\x05\x05\x06\x02\x04\x01\x12\x04\x9f\ - \x02\x02\x12\n\r\n\x05\x05\x06\x02\x04\x02\x12\x04\x9f\x02\x15\x16\n\x0c\ - \n\x04\x05\x06\x02\x05\x12\x04\xa0\x02\x02\n\n\r\n\x05\x05\x06\x02\x05\ - \x01\x12\x04\xa0\x02\x02\x05\n\r\n\x05\x05\x06\x02\x05\x02\x12\x04\xa0\ - \x02\x08\t\n\x0c\n\x04\x05\x06\x02\x06\x12\x04\xa1\x02\x02\x17\n\r\n\x05\ - \x05\x06\x02\x06\x01\x12\x04\xa1\x02\x02\x12\n\r\n\x05\x05\x06\x02\x06\ - \x02\x12\x04\xa1\x02\x15\x16\n\x0c\n\x02\x04\x0e\x12\x06\xa4\x02\0\xb0\ - \x02\x01\n\x0b\n\x03\x04\x0e\x01\x12\x04\xa4\x02\x08\x12\n\x0c\n\x04\x04\ - \x0e\x02\0\x12\x04\xa5\x02\x02#\n\r\n\x05\x04\x0e\x02\0\x04\x12\x04\xa5\ - \x02\x02\n\n\r\n\x05\x04\x0e\x02\0\x05\x12\x04\xa5\x02\x0b\x10\n\r\n\x05\ - \x04\x0e\x02\0\x01\x12\x04\xa5\x02\x11\x1e\n\r\n\x05\x04\x0e\x02\0\x03\ - \x12\x04\xa5\x02!\"\n\x0c\n\x04\x04\x0e\x02\x01\x12\x04\xa6\x02\x024\n\r\ - \n\x05\x04\x0e\x02\x01\x04\x12\x04\xa6\x02\x02\n\n\r\n\x05\x04\x0e\x02\ - \x01\x06\x12\x04\xa6\x02\x0b\x1a\n\r\n\x05\x04\x0e\x02\x01\x01\x12\x04\ - \xa6\x02\x1b/\n\r\n\x05\x04\x0e\x02\x01\x03\x12\x04\xa6\x0223\n\x0c\n\ - \x04\x04\x0e\x02\x02\x12\x04\xa7\x02\x026\n\r\n\x05\x04\x0e\x02\x02\x04\ - \x12\x04\xa7\x02\x02\n\n\r\n\x05\x04\x0e\x02\x02\x06\x12\x04\xa7\x02\x0b\ - \x1d\n\r\n\x05\x04\x0e\x02\x02\x01\x12\x04\xa7\x02\x1e1\n\r\n\x05\x04\ - \x0e\x02\x02\x03\x12\x04\xa7\x0245\nC\n\x04\x04\x0e\x02\x03\x12\x04\xaa\ - \x02\x02*\x1a5\x20client\x20source\x20address\x20when\x20receiving\x20a\ - \x20registration\n\n\r\n\x05\x04\x0e\x02\x03\x04\x12\x04\xaa\x02\x02\n\n\ - \r\n\x05\x04\x0e\x02\x03\x05\x12\x04\xaa\x02\x0b\x10\n\r\n\x05\x04\x0e\ - \x02\x03\x01\x12\x04\xaa\x02\x11%\n\r\n\x05\x04\x0e\x02\x03\x03\x12\x04\ - \xaa\x02()\nH\n\x04\x04\x0e\x02\x04\x12\x04\xad\x02\x02#\x1a:\x20Decoy\ - \x20address\x20used\x20when\x20registering\x20over\x20Decoy\x20registrar\ - \n\n\r\n\x05\x04\x0e\x02\x04\x04\x12\x04\xad\x02\x02\n\n\r\n\x05\x04\x0e\ - \x02\x04\x05\x12\x04\xad\x02\x0b\x10\n\r\n\x05\x04\x0e\x02\x04\x01\x12\ - \x04\xad\x02\x11\x1e\n\r\n\x05\x04\x0e\x02\x04\x03\x12\x04\xad\x02!\"\n\ - \x0c\n\x04\x04\x0e\x02\x05\x12\x04\xaf\x02\x02:\n\r\n\x05\x04\x0e\x02\ - \x05\x04\x12\x04\xaf\x02\x02\n\n\r\n\x05\x04\x0e\x02\x05\x06\x12\x04\xaf\ - \x02\x0b\x1f\n\r\n\x05\x04\x0e\x02\x05\x01\x12\x04\xaf\x02\x205\n\r\n\ - \x05\x04\x0e\x02\x05\x03\x12\x04\xaf\x0289\n\x0c\n\x02\x04\x0f\x12\x06\ - \xb2\x02\0\xbe\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\x04\xb2\x02\x08\x14\n\ - 9\n\x04\x04\x0f\x02\0\x12\x04\xb3\x02\x04.\"+\x20how\x20many\x20decoys\ - \x20were\x20tried\x20before\x20success\n\n\r\n\x05\x04\x0f\x02\0\x04\x12\ - \x04\xb3\x02\x04\x0c\n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\xb3\x02\r\x13\n\ - \r\n\x05\x04\x0f\x02\0\x01\x12\x04\xb3\x02\x14(\n\r\n\x05\x04\x0f\x02\0\ - \x03\x12\x04\xb3\x02+-\nm\n\x04\x04\x0f\x02\x01\x12\x04\xb8\x02\x04/\x1a\ - \x1e\x20Applicable\x20to\x20whole\x20session:\n\"\x1a\x20includes\x20fai\ - led\x20attempts\n2#\x20Timings\x20below\x20are\x20in\x20milliseconds\n\n\ - \r\n\x05\x04\x0f\x02\x01\x04\x12\x04\xb8\x02\x04\x0c\n\r\n\x05\x04\x0f\ - \x02\x01\x05\x12\x04\xb8\x02\r\x13\n\r\n\x05\x04\x0f\x02\x01\x01\x12\x04\ - \xb8\x02\x14)\n\r\n\x05\x04\x0f\x02\x01\x03\x12\x04\xb8\x02,.\nR\n\x04\ - \x04\x0f\x02\x02\x12\x04\xbb\x02\x04(\x1a\x1f\x20Last\x20(i.e.\x20succes\ - sful)\x20decoy:\n\"#\x20measured\x20during\x20initial\x20handshake\n\n\r\ - \n\x05\x04\x0f\x02\x02\x04\x12\x04\xbb\x02\x04\x0c\n\r\n\x05\x04\x0f\x02\ - \x02\x05\x12\x04\xbb\x02\r\x13\n\r\n\x05\x04\x0f\x02\x02\x01\x12\x04\xbb\ - \x02\x14\"\n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xbb\x02%'\n%\n\x04\x04\ - \x0f\x02\x03\x12\x04\xbc\x02\x04&\"\x17\x20includes\x20tcp\x20to\x20deco\ - y\n\n\r\n\x05\x04\x0f\x02\x03\x04\x12\x04\xbc\x02\x04\x0c\n\r\n\x05\x04\ - \x0f\x02\x03\x05\x12\x04\xbc\x02\r\x13\n\r\n\x05\x04\x0f\x02\x03\x01\x12\ - \x04\xbc\x02\x14\x20\n\r\n\x05\x04\x0f\x02\x03\x03\x12\x04\xbc\x02#%\nB\ - \n\x04\x04\x0f\x02\x04\x12\x04\xbd\x02\x04&\"4\x20measured\x20when\x20es\ - tablishing\x20tcp\x20connection\x20to\x20decot\n\n\r\n\x05\x04\x0f\x02\ - \x04\x04\x12\x04\xbd\x02\x04\x0c\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\ - \xbd\x02\r\x13\n\r\n\x05\x04\x0f\x02\x04\x01\x12\x04\xbd\x02\x14\x20\n\r\ - \n\x05\x04\x0f\x02\x04\x03\x12\x04\xbd\x02#%\n\x0c\n\x02\x05\x07\x12\x06\ - \xc0\x02\0\xc5\x02\x01\n\x0b\n\x03\x05\x07\x01\x12\x04\xc0\x02\x05\x16\n\ - \x0c\n\x04\x05\x07\x02\0\x12\x04\xc1\x02\x04\x10\n\r\n\x05\x05\x07\x02\0\ - \x01\x12\x04\xc1\x02\x04\x0b\n\r\n\x05\x05\x07\x02\0\x02\x12\x04\xc1\x02\ - \x0e\x0f\n\x0c\n\x04\x05\x07\x02\x01\x12\x04\xc2\x02\x04\x0c\n\r\n\x05\ - \x05\x07\x02\x01\x01\x12\x04\xc2\x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\ - \x02\x12\x04\xc2\x02\n\x0b\n\x0c\n\x04\x05\x07\x02\x02\x12\x04\xc3\x02\ - \x04\x0f\n\r\n\x05\x05\x07\x02\x02\x01\x12\x04\xc3\x02\x04\n\n\r\n\x05\ - \x05\x07\x02\x02\x02\x12\x04\xc3\x02\r\x0e\n\x0c\n\x04\x05\x07\x02\x03\ - \x12\x04\xc4\x02\x04\x0e\n\r\n\x05\x05\x07\x02\x03\x01\x12\x04\xc4\x02\ - \x04\t\n\r\n\x05\x05\x07\x02\x03\x02\x12\x04\xc4\x02\x0c\r\n\x0c\n\x02\ - \x05\x08\x12\x06\xc7\x02\0\xcb\x02\x01\n\x0b\n\x03\x05\x08\x01\x12\x04\ - \xc7\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\0\x12\x04\xc8\x02\x04\x0c\n\r\n\ - \x05\x05\x08\x02\0\x01\x12\x04\xc8\x02\x04\x07\n\r\n\x05\x05\x08\x02\0\ - \x02\x12\x04\xc8\x02\n\x0b\n\x0c\n\x04\x05\x08\x02\x01\x12\x04\xc9\x02\ - \x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\x12\x04\xc9\x02\x04\x07\n\r\n\x05\ - \x05\x08\x02\x01\x02\x12\x04\xc9\x02\n\x0b\n\x0c\n\x04\x05\x08\x02\x02\ - \x12\x04\xca\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x02\x01\x12\x04\xca\x02\ - \x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\x12\x04\xca\x02\n\x0b\n\x0c\n\x02\ - \x04\x10\x12\x06\xcd\x02\0\xd8\x02\x01\n\x0b\n\x03\x04\x10\x01\x12\x04\ - \xcd\x02\x08\x19\n\x0c\n\x04\x04\x10\x02\0\x12\x04\xce\x02\x04#\n\r\n\ - \x05\x04\x10\x02\0\x04\x12\x04\xce\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\ - \x05\x12\x04\xce\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xce\x02\ - \x14\x1e\n\r\n\x05\x04\x10\x02\0\x03\x12\x04\xce\x02!\"\n\x0c\n\x04\x04\ - \x10\x02\x01\x12\x04\xcf\x02\x04\"\n\r\n\x05\x04\x10\x02\x01\x04\x12\x04\ - \xcf\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xcf\x02\r\x13\n\r\ - \n\x05\x04\x10\x02\x01\x01\x12\x04\xcf\x02\x14\x1d\n\r\n\x05\x04\x10\x02\ - \x01\x03\x12\x04\xcf\x02\x20!\n\x0c\n\x04\x04\x10\x02\x02\x12\x04\xd1\ - \x02\x04#\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xd1\x02\x04\x0c\n\r\n\ - \x05\x04\x10\x02\x02\x05\x12\x04\xd1\x02\r\x13\n\r\n\x05\x04\x10\x02\x02\ - \x01\x12\x04\xd1\x02\x14\x1e\n\r\n\x05\x04\x10\x02\x02\x03\x12\x04\xd1\ - \x02!\"\n\x0c\n\x04\x04\x10\x02\x03\x12\x04\xd3\x02\x04-\n\r\n\x05\x04\ - \x10\x02\x03\x04\x12\x04\xd3\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x06\ - \x12\x04\xd3\x02\r\x1e\n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xd3\x02\x1f\ - (\n\r\n\x05\x04\x10\x02\x03\x03\x12\x04\xd3\x02+,\n\x0c\n\x04\x04\x10\ - \x02\x04\x12\x04\xd5\x02\x04\"\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xd5\ - \x02\x04\x0c\n\r\n\x05\x04\x10\x02\x04\x05\x12\x04\xd5\x02\r\x13\n\r\n\ - \x05\x04\x10\x02\x04\x01\x12\x04\xd5\x02\x14\x1c\n\r\n\x05\x04\x10\x02\ - \x04\x03\x12\x04\xd5\x02\x1f!\n\x0c\n\x04\x04\x10\x02\x05\x12\x04\xd6\ - \x02\x04\"\n\r\n\x05\x04\x10\x02\x05\x04\x12\x04\xd6\x02\x04\x0c\n\r\n\ - \x05\x04\x10\x02\x05\x05\x12\x04\xd6\x02\r\x13\n\r\n\x05\x04\x10\x02\x05\ - \x01\x12\x04\xd6\x02\x14\x1c\n\r\n\x05\x04\x10\x02\x05\x03\x12\x04\xd6\ - \x02\x1f!\n\x0c\n\x04\x04\x10\x02\x06\x12\x04\xd7\x02\x04\x20\n\r\n\x05\ - \x04\x10\x02\x06\x04\x12\x04\xd7\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x06\ - \x06\x12\x04\xd7\x02\r\x14\n\r\n\x05\x04\x10\x02\x06\x01\x12\x04\xd7\x02\ - \x15\x1a\n\r\n\x05\x04\x10\x02\x06\x03\x12\x04\xd7\x02\x1d\x1f\nT\n\x02\ - \x04\x11\x12\x06\xdb\x02\0\xec\x02\x01\x1aF\x20Adding\x20message\x20resp\ - onse\x20from\x20Station\x20to\x20Client\x20for\x20bidirectional\x20API\n\ - \n\x0b\n\x03\x04\x11\x01\x12\x04\xdb\x02\x08\x1c\n\x0c\n\x04\x04\x11\x02\ - \0\x12\x04\xdc\x02\x02\x20\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xdc\x02\ - \x02\n\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xdc\x02\x0b\x12\n\r\n\x05\x04\ - \x11\x02\0\x01\x12\x04\xdc\x02\x13\x1b\n\r\n\x05\x04\x11\x02\0\x03\x12\ - \x04\xdc\x02\x1e\x1f\n?\n\x04\x04\x11\x02\x01\x12\x04\xde\x02\x02\x1e\ - \x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20network\x20byte\x20\ - order\n\n\r\n\x05\x04\x11\x02\x01\x04\x12\x04\xde\x02\x02\n\n\r\n\x05\ - \x04\x11\x02\x01\x05\x12\x04\xde\x02\x0b\x10\n\r\n\x05\x04\x11\x02\x01\ - \x01\x12\x04\xde\x02\x11\x19\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xde\ - \x02\x1c\x1d\n,\n\x04\x04\x11\x02\x02\x12\x04\xe1\x02\x02\x1f\x1a\x1e\ - \x20Respond\x20with\x20randomized\x20port\n\n\r\n\x05\x04\x11\x02\x02\ - \x04\x12\x04\xe1\x02\x02\n\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xe1\x02\ - \x0b\x11\n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xe1\x02\x12\x1a\n\r\n\x05\ - \x04\x11\x02\x02\x03\x12\x04\xe1\x02\x1d\x1e\nd\n\x04\x04\x11\x02\x03\ - \x12\x04\xe5\x02\x02\"\x1aV\x20Future:\x20station\x20provides\x20client\ - \x20with\x20secret,\x20want\x20chanel\x20present\n\x20Leave\x20null\x20f\ - or\x20now\n\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xe5\x02\x02\n\n\r\n\ - \x05\x04\x11\x02\x03\x05\x12\x04\xe5\x02\x0b\x10\n\r\n\x05\x04\x11\x02\ - \x03\x01\x12\x04\xe5\x02\x11\x1d\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\ - \xe5\x02\x20!\nA\n\x04\x04\x11\x02\x04\x12\x04\xe8\x02\x02\x1c\x1a3\x20I\ - f\x20registration\x20wrong,\x20populate\x20this\x20error\x20string\n\n\r\ - \n\x05\x04\x11\x02\x04\x04\x12\x04\xe8\x02\x02\n\n\r\n\x05\x04\x11\x02\ - \x04\x05\x12\x04\xe8\x02\x0b\x11\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\ - \xe8\x02\x12\x17\n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\xe8\x02\x1a\x1b\n\ - +\n\x04\x04\x11\x02\x05\x12\x04\xeb\x02\x02%\x1a\x1d\x20ClientConf\x20fi\ - eld\x20(optional)\n\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\xeb\x02\x02\n\ - \n\r\n\x05\x04\x11\x02\x05\x06\x12\x04\xeb\x02\x0b\x15\n\r\n\x05\x04\x11\ - \x02\x05\x01\x12\x04\xeb\x02\x16\x20\n\r\n\x05\x04\x11\x02\x05\x03\x12\ - \x04\xeb\x02#$\n!\n\x02\x04\x12\x12\x06\xef\x02\0\xf3\x02\x01\x1a\x13\ - \x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x12\x01\x12\x04\xef\x02\ - \x08\x13\n\x0c\n\x04\x04\x12\x02\0\x12\x04\xf0\x02\x04\x1e\n\r\n\x05\x04\ - \x12\x02\0\x04\x12\x04\xf0\x02\x04\x0c\n\r\n\x05\x04\x12\x02\0\x05\x12\ - \x04\xf0\x02\r\x11\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\xf0\x02\x12\x19\n\ - \r\n\x05\x04\x12\x02\0\x03\x12\x04\xf0\x02\x1c\x1d\n\x0c\n\x04\x04\x12\ - \x02\x01\x12\x04\xf1\x02\x04*\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\xf1\ - \x02\x04\x0c\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\xf1\x02\r\x11\n\r\n\ - \x05\x04\x12\x02\x01\x01\x12\x04\xf1\x02\x12%\n\r\n\x05\x04\x12\x02\x01\ - \x03\x12\x04\xf1\x02()\n\x0c\n\x04\x04\x12\x02\x02\x12\x04\xf2\x02\x04=\ - \n\r\n\x05\x04\x12\x02\x02\x04\x12\x04\xf2\x02\x04\x0c\n\r\n\x05\x04\x12\ - \x02\x02\x06\x12\x04\xf2\x02\r!\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\ - \xf2\x02\"8\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\xf2\x02;<\ + \x02\x02\x02\x01\x12\x03}\x04\x1b\n\x0c\n\x05\x05\x02\x02\x02\x02\x12\ + \x03}\x1e\x20\n\x0b\n\x04\x05\x02\x02\x03\x12\x03~\x04\x1d\n\x0c\n\x05\ + \x05\x02\x02\x03\x01\x12\x03~\x04\x18\n\x0c\n\x05\x05\x02\x02\x03\x02\ + \x12\x03~\x1b\x1c\n\x0b\n\x04\x05\x02\x02\x04\x12\x03\x7f\x04\x1a\n\x0c\ + \n\x05\x05\x02\x02\x04\x01\x12\x03\x7f\x04\x15\n\x0c\n\x05\x05\x02\x02\ + \x04\x02\x12\x03\x7f\x18\x19\n\x0c\n\x04\x05\x02\x02\x05\x12\x04\x80\x01\ + \x04\x19\n\r\n\x05\x05\x02\x02\x05\x01\x12\x04\x80\x01\x04\x14\n\r\n\x05\ + \x05\x02\x02\x05\x02\x12\x04\x80\x01\x17\x18\n\x0c\n\x04\x05\x02\x02\x06\ + \x12\x04\x81\x01\x04\x1b\n\r\n\x05\x05\x02\x02\x06\x01\x12\x04\x81\x01\ + \x04\x16\n\r\n\x05\x05\x02\x02\x06\x02\x12\x04\x81\x01\x19\x1a\n\x0c\n\ + \x04\x05\x02\x02\x07\x12\x04\x82\x01\x04%\n\r\n\x05\x05\x02\x02\x07\x01\ + \x12\x04\x82\x01\x04\x20\n\r\n\x05\x05\x02\x02\x07\x02\x12\x04\x82\x01#$\ + \n\x0c\n\x04\x05\x02\x02\x08\x12\x04\x83\x01\x04\x14\n\r\n\x05\x05\x02\ + \x02\x08\x01\x12\x04\x83\x01\x04\r\n\r\n\x05\x05\x02\x02\x08\x02\x12\x04\ + \x83\x01\x10\x13\n/\n\x02\x05\x03\x12\x06\x87\x01\0\x8f\x01\x01\x1a!\x20\ + State\x20transitions\x20of\x20the\x20server\n\n\x0b\n\x03\x05\x03\x01\ + \x12\x04\x87\x01\x05\x13\n\x0c\n\x04\x05\x03\x02\0\x12\x04\x88\x01\x04\ + \x16\n\r\n\x05\x05\x03\x02\0\x01\x12\x04\x88\x01\x04\x11\n\r\n\x05\x05\ + \x03\x02\0\x02\x12\x04\x88\x01\x14\x15\n\"\n\x04\x05\x03\x02\x01\x12\x04\ + \x89\x01\x04\x19\"\x14\x20connected\x20to\x20squid\n\n\r\n\x05\x05\x03\ + \x02\x01\x01\x12\x04\x89\x01\x04\x14\n\r\n\x05\x05\x03\x02\x01\x02\x12\ + \x04\x89\x01\x17\x18\n(\n\x04\x05\x03\x02\x02\x12\x04\x8a\x01\x04!\"\x1a\ + \x20connected\x20to\x20covert\x20host\n\n\r\n\x05\x05\x03\x02\x02\x01\ + \x12\x04\x8a\x01\x04\x1b\n\r\n\x05\x05\x03\x02\x02\x02\x12\x04\x8a\x01\ + \x1e\x20\n\x0c\n\x04\x05\x03\x02\x03\x12\x04\x8b\x01\x04\x1e\n\r\n\x05\ + \x05\x03\x02\x03\x01\x12\x04\x8b\x01\x04\x19\n\r\n\x05\x05\x03\x02\x03\ + \x02\x12\x04\x8b\x01\x1c\x1d\n\x0c\n\x04\x05\x03\x02\x04\x12\x04\x8c\x01\ + \x04\x1a\n\r\n\x05\x05\x03\x02\x04\x01\x12\x04\x8c\x01\x04\x15\n\r\n\x05\ + \x05\x03\x02\x04\x02\x12\x04\x8c\x01\x18\x19\nS\n\x04\x05\x03\x02\x05\ + \x12\x04\x8e\x01\x04\x14\x1aE\x20TODO\x20should\x20probably\x20also\x20a\ + llow\x20EXPECT_RECONNECT\x20here,\x20for\x20DittoTap\n\n\r\n\x05\x05\x03\ + \x02\x05\x01\x12\x04\x8e\x01\x04\r\n\r\n\x05\x05\x03\x02\x05\x02\x12\x04\ + \x8e\x01\x10\x13\n8\n\x02\x05\x04\x12\x06\x92\x01\0\x9c\x01\x01\x1a*\x20\ + Should\x20accompany\x20all\x20S2C_ERROR\x20messages.\n\n\x0b\n\x03\x05\ + \x04\x01\x12\x04\x92\x01\x05\x13\n\x0c\n\x04\x05\x04\x02\0\x12\x04\x93\ + \x01\x04\x11\n\r\n\x05\x05\x04\x02\0\x01\x12\x04\x93\x01\x04\x0c\n\r\n\ + \x05\x05\x04\x02\0\x02\x12\x04\x93\x01\x0f\x10\n*\n\x04\x05\x04\x02\x01\ + \x12\x04\x94\x01\x04\x16\"\x1c\x20Squid\x20TCP\x20connection\x20broke\n\ + \n\r\n\x05\x05\x04\x02\x01\x01\x12\x04\x94\x01\x04\x11\n\r\n\x05\x05\x04\ + \x02\x01\x02\x12\x04\x94\x01\x14\x15\n7\n\x04\x05\x04\x02\x02\x12\x04\ + \x95\x01\x04\x18\")\x20You\x20told\x20me\x20something\x20was\x20wrong,\ + \x20client\n\n\r\n\x05\x05\x04\x02\x02\x01\x12\x04\x95\x01\x04\x13\n\r\n\ + \x05\x05\x04\x02\x02\x02\x12\x04\x95\x01\x16\x17\n@\n\x04\x05\x04\x02\ + \x03\x12\x04\x96\x01\x04\x18\"2\x20You\x20messed\x20up,\x20client\x20(e.\ + g.\x20sent\x20a\x20bad\x20protobuf)\n\n\r\n\x05\x05\x04\x02\x03\x01\x12\ + \x04\x96\x01\x04\x13\n\r\n\x05\x05\x04\x02\x03\x02\x12\x04\x96\x01\x16\ + \x17\n\x17\n\x04\x05\x04\x02\x04\x12\x04\x97\x01\x04\x19\"\t\x20I\x20bro\ + ke\n\n\r\n\x05\x05\x04\x02\x04\x01\x12\x04\x97\x01\x04\x14\n\r\n\x05\x05\ + \x04\x02\x04\x02\x12\x04\x97\x01\x17\x18\nE\n\x04\x05\x04\x02\x05\x12\ + \x04\x98\x01\x04\x17\"7\x20Everything's\x20fine,\x20but\x20don't\x20use\ + \x20this\x20decoy\x20right\x20now\n\n\r\n\x05\x05\x04\x02\x05\x01\x12\ + \x04\x98\x01\x04\x12\n\r\n\x05\x05\x04\x02\x05\x02\x12\x04\x98\x01\x15\ + \x16\nD\n\x04\x05\x04\x02\x06\x12\x04\x9a\x01\x04\x18\"6\x20My\x20stream\ + \x20to\x20you\x20broke.\x20(This\x20is\x20impossible\x20to\x20send)\n\n\ + \r\n\x05\x05\x04\x02\x06\x01\x12\x04\x9a\x01\x04\x11\n\r\n\x05\x05\x04\ + \x02\x06\x02\x12\x04\x9a\x01\x14\x17\nA\n\x04\x05\x04\x02\x07\x12\x04\ + \x9b\x01\x04\x19\"3\x20You\x20never\x20came\x20back.\x20(This\x20is\x20i\ + mpossible\x20to\x20send)\n\n\r\n\x05\x05\x04\x02\x07\x01\x12\x04\x9b\x01\ + \x04\x12\n\r\n\x05\x05\x04\x02\x07\x02\x12\x04\x9b\x01\x15\x18\n\x0c\n\ + \x02\x05\x05\x12\x06\x9e\x01\0\xaa\x01\x01\n\x0b\n\x03\x05\x05\x01\x12\ + \x04\x9e\x01\x05\x12\n\x0c\n\x04\x05\x05\x02\0\x12\x04\x9f\x01\x04\r\n\r\ + \n\x05\x05\x05\x02\0\x01\x12\x04\x9f\x01\x04\x08\n\r\n\x05\x05\x05\x02\0\ + \x02\x12\x04\x9f\x01\x0b\x0c\n`\n\x04\x05\x05\x02\x01\x12\x04\xa0\x01\ + \x04\x0c\"R\x20Send\x20a\x2032-byte\x20HMAC\x20id\x20to\x20let\x20the\ + \x20station\x20distinguish\x20registrations\x20to\x20same\x20host\n\n\r\ + \n\x05\x05\x05\x02\x01\x01\x12\x04\xa0\x01\x04\x07\n\r\n\x05\x05\x05\x02\ + \x01\x02\x12\x04\xa0\x01\n\x0b\n\x0c\n\x04\x05\x05\x02\x02\x12\x04\xa1\ + \x01\x04\x0e\n\r\n\x05\x05\x05\x02\x02\x01\x12\x04\xa1\x01\x04\t\n\r\n\ + \x05\x05\x05\x02\x02\x02\x12\x04\xa1\x01\x0c\r\n#\n\x04\x05\x05\x02\x03\ + \x12\x04\xa2\x01\x04\r\"\x15\x20UDP\x20transport:\x20DTLS\n\n\r\n\x05\ + \x05\x05\x02\x03\x01\x12\x04\xa2\x01\x04\x08\n\r\n\x05\x05\x05\x02\x03\ + \x02\x12\x04\xa2\x01\x0b\x0c\n:\n\x04\x05\x05\x02\x04\x12\x04\xa3\x01\ + \x04\x0f\",\x20dynamic\x20prefix\x20transport\x20(and\x20updated\x20Min)\ + \n\n\r\n\x05\x05\x05\x02\x04\x01\x12\x04\xa3\x01\x04\n\n\r\n\x05\x05\x05\ + \x02\x04\x02\x12\x04\xa3\x01\r\x0e\n$\n\x04\x05\x05\x02\x05\x12\x04\xa4\ + \x01\x04\r\"\x16\x20uTLS\x20based\x20transport\n\n\r\n\x05\x05\x05\x02\ + \x05\x01\x12\x04\xa4\x01\x04\x08\n\r\n\x05\x05\x05\x02\x05\x02\x12\x04\ + \xa4\x01\x0b\x0c\n?\n\x04\x05\x05\x02\x06\x12\x04\xa5\x01\x04\x0f\"1\x20\ + Formatting\x20transport\x20-\x20format\x20first,\x20format\x20all\n\n\r\ + \n\x05\x05\x05\x02\x06\x01\x12\x04\xa5\x01\x04\n\n\r\n\x05\x05\x05\x02\ + \x06\x02\x12\x04\xa5\x01\r\x0e\n\x1b\n\x04\x05\x05\x02\x07\x12\x04\xa6\ + \x01\x04\r\"\r\x20WebAssembly\n\n\r\n\x05\x05\x05\x02\x07\x01\x12\x04\ + \xa6\x01\x04\x08\n\r\n\x05\x05\x05\x02\x07\x02\x12\x04\xa6\x01\x0b\x0c\n\ + .\n\x04\x05\x05\x02\x08\x12\x04\xa7\x01\x04\x0c\"\x20\x20Format\x20trans\ + forming\x20encryption\n\n\r\n\x05\x05\x05\x02\x08\x01\x12\x04\xa7\x01\ + \x04\x07\n\r\n\x05\x05\x05\x02\x08\x02\x12\x04\xa7\x01\n\x0b\n\x1f\n\x04\ + \x05\x05\x02\t\x12\x04\xa8\x01\x04\r\"\x11\x20quic\x20transport?\n\n\r\n\ + \x05\x05\x05\x02\t\x01\x12\x04\xa8\x01\x04\x08\n\r\n\x05\x05\x05\x02\t\ + \x02\x12\x04\xa8\x01\x0b\x0c\n1\n\x04\x05\x05\x02\n\x12\x04\xa9\x01\x04\ + \x10\"#\x20UDP\x20transport:\x20WebRTC\x20DataChannel\n\n\r\n\x05\x05\ + \x05\x02\n\x01\x12\x04\xa9\x01\x04\n\n\r\n\x05\x05\x05\x02\n\x02\x12\x04\ + \xa9\x01\r\x0f\n:\n\x02\x04\x07\x12\x06\xad\x01\0\xb3\x01\x01\x1a,\x20De\ + flated\x20ICE\x20Candidate\x20by\x20seed2sdp\x20package\n\n\x0b\n\x03\ + \x04\x07\x01\x12\x04\xad\x01\x08\x1a\n5\n\x04\x04\x07\x02\0\x12\x04\xaf\ + \x01\x04!\x1a'\x20IP\x20is\x20represented\x20in\x20its\x2016-byte\x20for\ + m\n\n\r\n\x05\x04\x07\x02\0\x04\x12\x04\xaf\x01\x04\x0c\n\r\n\x05\x04\ + \x07\x02\0\x05\x12\x04\xaf\x01\r\x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\ + \xaf\x01\x14\x1c\n\r\n\x05\x04\x07\x02\0\x03\x12\x04\xaf\x01\x1f\x20\n\ + \x0c\n\x04\x04\x07\x02\x01\x12\x04\xb0\x01\x04!\n\r\n\x05\x04\x07\x02\ + \x01\x04\x12\x04\xb0\x01\x04\x0c\n\r\n\x05\x04\x07\x02\x01\x05\x12\x04\ + \xb0\x01\r\x13\n\r\n\x05\x04\x07\x02\x01\x01\x12\x04\xb0\x01\x14\x1c\n\r\ + \n\x05\x04\x07\x02\x01\x03\x12\x04\xb0\x01\x1f\x20\n\x9b\x01\n\x04\x04\ + \x07\x02\x02\x12\x04\xb2\x01\x04&\x1a\x8c\x01\x20Composed\x20info\x20inc\ + ludes\x20port,\x20tcptype\x20(unset\x20if\x20not\x20tcp),\x20candidate\ + \x20type\x20(host,\x20srflx,\x20prflx),\x20protocol\x20(TCP/UDP),\x20and\ + \x20component\x20(RTP/RTCP)\n\n\r\n\x05\x04\x07\x02\x02\x04\x12\x04\xb2\ + \x01\x04\x0c\n\r\n\x05\x04\x07\x02\x02\x05\x12\x04\xb2\x01\r\x13\n\r\n\ + \x05\x04\x07\x02\x02\x01\x12\x04\xb2\x01\x14!\n\r\n\x05\x04\x07\x02\x02\ + \x03\x12\x04\xb2\x01$%\n;\n\x02\x04\x08\x12\x06\xb6\x01\0\xb9\x01\x01\ + \x1a-\x20Deflated\x20SDP\x20for\x20WebRTC\x20by\x20seed2sdp\x20package\n\ + \n\x0b\n\x03\x04\x08\x01\x12\x04\xb6\x01\x08\x11\n\x0c\n\x04\x04\x08\x02\ + \0\x12\x04\xb7\x01\x04\x1d\n\r\n\x05\x04\x08\x02\0\x04\x12\x04\xb7\x01\ + \x04\x0c\n\r\n\x05\x04\x08\x02\0\x05\x12\x04\xb7\x01\r\x13\n\r\n\x05\x04\ + \x08\x02\0\x01\x12\x04\xb7\x01\x14\x18\n\r\n\x05\x04\x08\x02\0\x03\x12\ + \x04\xb7\x01\x1b\x1c\n2\n\x04\x04\x08\x02\x01\x12\x04\xb8\x01\x04/\"$\ + \x20there\x20could\x20be\x20multiple\x20candidates\n\n\r\n\x05\x04\x08\ + \x02\x01\x04\x12\x04\xb8\x01\x04\x0c\n\r\n\x05\x04\x08\x02\x01\x06\x12\ + \x04\xb8\x01\r\x1f\n\r\n\x05\x04\x08\x02\x01\x01\x12\x04\xb8\x01\x20*\n\ + \r\n\x05\x04\x08\x02\x01\x03\x12\x04\xb8\x01-.\n?\n\x02\x04\t\x12\x06\ + \xbc\x01\0\xbf\x01\x01\x1a1\x20WebRTCSignal\x20includes\x20a\x20deflated\ + \x20SDP\x20and\x20a\x20seed\n\n\x0b\n\x03\x04\t\x01\x12\x04\xbc\x01\x08\ + \x14\n\x0c\n\x04\x04\t\x02\0\x12\x04\xbd\x01\x04\x1d\n\r\n\x05\x04\t\x02\ + \0\x04\x12\x04\xbd\x01\x04\x0c\n\r\n\x05\x04\t\x02\0\x05\x12\x04\xbd\x01\ + \r\x13\n\r\n\x05\x04\t\x02\0\x01\x12\x04\xbd\x01\x14\x18\n\r\n\x05\x04\t\ + \x02\0\x03\x12\x04\xbd\x01\x1b\x1c\n\x0c\n\x04\x04\t\x02\x01\x12\x04\xbe\ + \x01\x04\x1f\n\r\n\x05\x04\t\x02\x01\x04\x12\x04\xbe\x01\x04\x0c\n\r\n\ + \x05\x04\t\x02\x01\x06\x12\x04\xbe\x01\r\x16\n\r\n\x05\x04\t\x02\x01\x01\ + \x12\x04\xbe\x01\x17\x1a\n\r\n\x05\x04\t\x02\x01\x03\x12\x04\xbe\x01\x1d\ + \x1e\n\x0c\n\x02\x04\n\x12\x06\xc1\x01\0\xd8\x01\x01\n\x0b\n\x03\x04\n\ + \x01\x12\x04\xc1\x01\x08\x17\nO\n\x04\x04\n\x02\0\x12\x04\xc3\x01\x04)\ + \x1aA\x20Should\x20accompany\x20(at\x20least)\x20SESSION_INIT\x20and\x20\ + CONFIRM_RECONNECT.\n\n\r\n\x05\x04\n\x02\0\x04\x12\x04\xc3\x01\x04\x0c\n\ + \r\n\x05\x04\n\x02\0\x05\x12\x04\xc3\x01\r\x13\n\r\n\x05\x04\n\x02\0\x01\ + \x12\x04\xc3\x01\x14$\n\r\n\x05\x04\n\x02\0\x03\x12\x04\xc3\x01'(\nv\n\ + \x04\x04\n\x02\x01\x12\x04\xc7\x01\x041\x1ah\x20There\x20might\x20be\x20\ + a\x20state\x20transition.\x20May\x20be\x20absent;\x20absence\x20should\ + \x20be\n\x20treated\x20identically\x20to\x20NO_CHANGE.\n\n\r\n\x05\x04\n\ + \x02\x01\x04\x12\x04\xc7\x01\x04\x0c\n\r\n\x05\x04\n\x02\x01\x06\x12\x04\ + \xc7\x01\r\x1b\n\r\n\x05\x04\n\x02\x01\x01\x12\x04\xc7\x01\x1c,\n\r\n\ + \x05\x04\n\x02\x01\x03\x12\x04\xc7\x01/0\nc\n\x04\x04\n\x02\x02\x12\x04\ + \xcb\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\n\x02\x02\x04\x12\x04\xcb\x01\x04\x0c\n\r\n\x05\ + \x04\n\x02\x02\x06\x12\x04\xcb\x01\r\x17\n\r\n\x05\x04\n\x02\x02\x01\x12\ + \x04\xcb\x01\x18#\n\r\n\x05\x04\n\x02\x02\x03\x12\x04\xcb\x01&'\nP\n\x04\ + \x04\n\x02\x03\x12\x04\xce\x01\x04+\x1aB\x20If\x20state_transition\x20==\ + \x20S2C_ERROR,\x20this\x20field\x20is\x20the\x20explanation.\n\n\r\n\x05\ + \x04\n\x02\x03\x04\x12\x04\xce\x01\x04\x0c\n\r\n\x05\x04\n\x02\x03\x06\ + \x12\x04\xce\x01\r\x1b\n\r\n\x05\x04\n\x02\x03\x01\x12\x04\xce\x01\x1c&\ + \n\r\n\x05\x04\n\x02\x03\x03\x12\x04\xce\x01)*\nQ\n\x04\x04\n\x02\x04\ + \x12\x04\xd1\x01\x04$\x1aC\x20Signals\x20client\x20to\x20stop\x20connect\ + ing\x20for\x20following\x20amount\x20of\x20seconds\n\n\r\n\x05\x04\n\x02\ + \x04\x04\x12\x04\xd1\x01\x04\x0c\n\r\n\x05\x04\n\x02\x04\x05\x12\x04\xd1\ + \x01\r\x13\n\r\n\x05\x04\n\x02\x04\x01\x12\x04\xd1\x01\x14\x1f\n\r\n\x05\ + \x04\n\x02\x04\x03\x12\x04\xd1\x01\"#\nK\n\x04\x04\n\x02\x05\x12\x04\xd4\ + \x01\x04#\x1a=\x20Sent\x20in\x20SESSION_INIT,\x20identifies\x20the\x20st\ + ation\x20that\x20picked\x20up\n\n\r\n\x05\x04\n\x02\x05\x04\x12\x04\xd4\ + \x01\x04\x0c\n\r\n\x05\x04\n\x02\x05\x05\x12\x04\xd4\x01\r\x13\n\r\n\x05\ + \x04\n\x02\x05\x01\x12\x04\xd4\x01\x14\x1e\n\r\n\x05\x04\n\x02\x05\x03\ + \x12\x04\xd4\x01!\"\nG\n\x04\x04\n\x02\x06\x12\x04\xd7\x01\x04!\x1a9\x20\ + Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\x20fingerprinting\ + .\n\n\r\n\x05\x04\n\x02\x06\x04\x12\x04\xd7\x01\x04\x0c\n\r\n\x05\x04\n\ + \x02\x06\x05\x12\x04\xd7\x01\r\x12\n\r\n\x05\x04\n\x02\x06\x01\x12\x04\ + \xd7\x01\x13\x1a\n\r\n\x05\x04\n\x02\x06\x03\x12\x04\xd7\x01\x1d\x20\n\ + \x0c\n\x02\x04\x0b\x12\x06\xda\x01\0\xe0\x01\x01\n\x0b\n\x03\x04\x0b\x01\ + \x12\x04\xda\x01\x08\x19\n\x0c\n\x04\x04\x0b\x02\0\x12\x04\xdb\x01\x08&\ + \n\r\n\x05\x04\x0b\x02\0\x04\x12\x04\xdb\x01\x08\x10\n\r\n\x05\x04\x0b\ + \x02\0\x05\x12\x04\xdb\x01\x11\x15\n\r\n\x05\x04\x0b\x02\0\x01\x12\x04\ + \xdb\x01\x16!\n\r\n\x05\x04\x0b\x02\0\x03\x12\x04\xdb\x01$%\n\x0c\n\x04\ + \x04\x0b\x02\x01\x12\x04\xdc\x01\x08%\n\r\n\x05\x04\x0b\x02\x01\x04\x12\ + \x04\xdc\x01\x08\x10\n\r\n\x05\x04\x0b\x02\x01\x05\x12\x04\xdc\x01\x11\ + \x15\n\r\n\x05\x04\x0b\x02\x01\x01\x12\x04\xdc\x01\x16\x20\n\r\n\x05\x04\ + \x0b\x02\x01\x03\x12\x04\xdc\x01#$\n\x0c\n\x04\x04\x0b\x02\x02\x12\x04\ + \xdd\x01\x08'\n\r\n\x05\x04\x0b\x02\x02\x04\x12\x04\xdd\x01\x08\x10\n\r\ + \n\x05\x04\x0b\x02\x02\x05\x12\x04\xdd\x01\x11\x15\n\r\n\x05\x04\x0b\x02\ + \x02\x01\x12\x04\xdd\x01\x16\"\n\r\n\x05\x04\x0b\x02\x02\x03\x12\x04\xdd\ + \x01%&\n\x0c\n\x04\x04\x0b\x02\x03\x12\x04\xde\x01\x04\x1e\n\r\n\x05\x04\ + \x0b\x02\x03\x04\x12\x04\xde\x01\x04\x0c\n\r\n\x05\x04\x0b\x02\x03\x05\ + \x12\x04\xde\x01\r\x11\n\r\n\x05\x04\x0b\x02\x03\x01\x12\x04\xde\x01\x12\ + \x19\n\r\n\x05\x04\x0b\x02\x03\x03\x12\x04\xde\x01\x1c\x1d\n\x0c\n\x04\ + \x04\x0b\x02\x04\x12\x04\xdf\x01\x04!\n\r\n\x05\x04\x0b\x02\x04\x04\x12\ + \x04\xdf\x01\x04\x0c\n\r\n\x05\x04\x0b\x02\x04\x05\x12\x04\xdf\x01\r\x11\ + \n\r\n\x05\x04\x0b\x02\x04\x01\x12\x04\xdf\x01\x12\x1c\n\r\n\x05\x04\x0b\ + \x02\x04\x03\x12\x04\xdf\x01\x1f\x20\n\x0c\n\x02\x04\x0c\x12\x06\xe2\x01\ + \0\x9c\x02\x01\n\x0b\n\x03\x04\x0c\x01\x12\x04\xe2\x01\x08\x17\n\x0c\n\ + \x04\x04\x0c\x02\0\x12\x04\xe3\x01\x04)\n\r\n\x05\x04\x0c\x02\0\x04\x12\ + \x04\xe3\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\0\x05\x12\x04\xe3\x01\r\x13\n\ + \r\n\x05\x04\x0c\x02\0\x01\x12\x04\xe3\x01\x14$\n\r\n\x05\x04\x0c\x02\0\ + \x03\x12\x04\xe3\x01'(\n\xd0\x01\n\x04\x04\x0c\x02\x01\x12\x04\xe8\x01\ + \x04.\x1a\xc1\x01\x20The\x20client\x20reports\x20its\x20decoy\x20list's\ + \x20version\x20number\x20here,\x20which\x20the\n\x20station\x20can\x20us\ + e\x20to\x20decide\x20whether\x20to\x20send\x20an\x20updated\x20one.\x20T\ + he\x20station\n\x20should\x20always\x20send\x20a\x20list\x20if\x20this\ + \x20field\x20is\x20set\x20to\x200.\n\n\r\n\x05\x04\x0c\x02\x01\x04\x12\ + \x04\xe8\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x01\x05\x12\x04\xe8\x01\r\x13\ + \n\r\n\x05\x04\x0c\x02\x01\x01\x12\x04\xe8\x01\x14)\n\r\n\x05\x04\x0c\ + \x02\x01\x03\x12\x04\xe8\x01,-\n\x0c\n\x04\x04\x0c\x02\x02\x12\x04\xea\ + \x01\x041\n\r\n\x05\x04\x0c\x02\x02\x04\x12\x04\xea\x01\x04\x0c\n\r\n\ + \x05\x04\x0c\x02\x02\x06\x12\x04\xea\x01\r\x1b\n\r\n\x05\x04\x0c\x02\x02\ + \x01\x12\x04\xea\x01\x1c,\n\r\n\x05\x04\x0c\x02\x02\x03\x12\x04\xea\x01/\ + 0\n\x80\x01\n\x04\x04\x0c\x02\x03\x12\x04\xee\x01\x04$\x1ar\x20The\x20po\ + sition\x20in\x20the\x20overall\x20session's\x20upload\x20sequence\x20whe\ + re\x20the\x20current\n\x20YIELD=>ACQUIRE\x20switchover\x20is\x20happenin\ + g.\n\n\r\n\x05\x04\x0c\x02\x03\x04\x12\x04\xee\x01\x04\x0c\n\r\n\x05\x04\ + \x0c\x02\x03\x05\x12\x04\xee\x01\r\x13\n\r\n\x05\x04\x0c\x02\x03\x01\x12\ + \x04\xee\x01\x14\x1f\n\r\n\x05\x04\x0c\x02\x03\x03\x12\x04\xee\x01\"#\ng\ + \n\x04\x04\x0c\x02\x04\x12\x04\xf2\x01\x04+\x1aY\x20High\x20level\x20cli\ + ent\x20library\x20version\x20used\x20for\x20indicating\x20feature\x20sup\ + port,\x20or\n\x20lack\x20therof.\n\n\r\n\x05\x04\x0c\x02\x04\x04\x12\x04\ + \xf2\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x04\x05\x12\x04\xf2\x01\r\x13\n\r\ + \n\x05\x04\x0c\x02\x04\x01\x12\x04\xf2\x01\x14&\n\r\n\x05\x04\x0c\x02\ + \x04\x03\x12\x04\xf2\x01)*\n\xa5\x02\n\x04\x04\x0c\x02\x05\x12\x04\xf7\ + \x01\x040\x1a\x96\x02\x20Indicates\x20whether\x20the\x20client\x20will\ + \x20allow\x20the\x20registrar\x20to\x20provide\x20alternative\x20paramet\ + ers\x20that\n\x20may\x20work\x20better\x20in\x20substitute\x20for\x20the\ + \x20deterministically\x20selected\x20parameters.\x20This\x20only\x20work\ + s\n\x20for\x20bidirectional\x20registration\x20methods\x20where\x20the\ + \x20client\x20receives\x20a\x20RegistrationResponse.\n\n\r\n\x05\x04\x0c\ + \x02\x05\x04\x12\x04\xf7\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x05\x05\x12\ + \x04\xf7\x01\r\x11\n\r\n\x05\x04\x0c\x02\x05\x01\x12\x04\xf7\x01\x12+\n\ + \r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf7\x01./\nq\n\x04\x04\x0c\x02\x06\ + \x12\x04\xfb\x01\x04'\x1ac\x20List\x20of\x20decoys\x20that\x20client\x20\ + have\x20unsuccessfully\x20tried\x20in\x20current\x20session.\n\x20Could\ + \x20be\x20sent\x20in\x20chunks\n\n\r\n\x05\x04\x0c\x02\x06\x04\x12\x04\ + \xfb\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x06\x05\x12\x04\xfb\x01\r\x13\n\r\ + \n\x05\x04\x0c\x02\x06\x01\x12\x04\xfb\x01\x14!\n\r\n\x05\x04\x0c\x02\ + \x06\x03\x12\x04\xfb\x01$&\n\x0c\n\x04\x04\x0c\x02\x07\x12\x04\xfd\x01\ + \x04%\n\r\n\x05\x04\x0c\x02\x07\x04\x12\x04\xfd\x01\x04\x0c\n\r\n\x05\ + \x04\x0c\x02\x07\x06\x12\x04\xfd\x01\r\x19\n\r\n\x05\x04\x0c\x02\x07\x01\ + \x12\x04\xfd\x01\x1a\x1f\n\r\n\x05\x04\x0c\x02\x07\x03\x12\x04\xfd\x01\"\ + $\nk\n\x04\x04\x0c\x02\x08\x12\x04\x80\x02\x04*\x1a]\x20NullTransport,\ + \x20MinTransport,\x20Obfs4Transport,\x20etc.\x20Transport\x20type\x20we\ + \x20want\x20from\x20phantom\x20proxy\n\n\r\n\x05\x04\x0c\x02\x08\x04\x12\ + \x04\x80\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x08\x06\x12\x04\x80\x02\r\x1a\ + \n\r\n\x05\x04\x0c\x02\x08\x01\x12\x04\x80\x02\x1b$\n\r\n\x05\x04\x0c\ + \x02\x08\x03\x12\x04\x80\x02')\n\x0c\n\x04\x04\x0c\x02\t\x12\x04\x82\x02\ + \x047\n\r\n\x05\x04\x0c\x02\t\x04\x12\x04\x82\x02\x04\x0c\n\r\n\x05\x04\ + \x0c\x02\t\x06\x12\x04\x82\x02\r\x20\n\r\n\x05\x04\x0c\x02\t\x01\x12\x04\ + \x82\x02!1\n\r\n\x05\x04\x0c\x02\t\x03\x12\x04\x82\x0246\n\xc8\x03\n\x04\ + \x04\x0c\x02\n\x12\x04\x8a\x02\x04(\x1a\xb9\x03\x20Station\x20is\x20only\ + \x20required\x20to\x20check\x20this\x20variable\x20during\x20session\x20\ + initialization.\n\x20If\x20set,\x20station\x20must\x20facilitate\x20conn\ + ection\x20to\x20said\x20target\x20by\x20itself,\x20i.e.\x20write\x20into\ + \x20squid\n\x20socket\x20an\x20HTTP/SOCKS/any\x20other\x20connection\x20\ + request.\n\x20covert_address\x20must\x20have\x20exactly\x20one\x20':'\ + \x20colon,\x20that\x20separates\x20host\x20(literal\x20IP\x20address\x20\ + or\n\x20resolvable\x20hostname)\x20and\x20port\n\x20TODO:\x20make\x20it\ + \x20required\x20for\x20initialization,\x20and\x20stop\x20connecting\x20a\ + ny\x20client\x20straight\x20to\x20squid?\n\n\r\n\x05\x04\x0c\x02\n\x04\ + \x12\x04\x8a\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\n\x05\x12\x04\x8a\x02\r\ + \x13\n\r\n\x05\x04\x0c\x02\n\x01\x12\x04\x8a\x02\x14\"\n\r\n\x05\x04\x0c\ + \x02\n\x03\x12\x04\x8a\x02%'\nR\n\x04\x04\x0c\x02\x0b\x12\x04\x8d\x02\ + \x042\x1aD\x20Used\x20in\x20dark\x20decoys\x20to\x20signal\x20which\x20d\ + ark\x20decoy\x20it\x20will\x20connect\x20to.\n\n\r\n\x05\x04\x0c\x02\x0b\ + \x04\x12\x04\x8d\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x0b\x05\x12\x04\x8d\ + \x02\r\x13\n\r\n\x05\x04\x0c\x02\x0b\x01\x12\x04\x8d\x02\x14,\n\r\n\x05\ + \x04\x0c\x02\x0b\x03\x12\x04\x8d\x02/1\nR\n\x04\x04\x0c\x02\x0c\x12\x04\ + \x90\x02\x04\"\x1aD\x20Used\x20to\x20indicate\x20to\x20server\x20if\x20c\ + lient\x20is\x20registering\x20v4,\x20v6\x20or\x20both\n\n\r\n\x05\x04\ + \x0c\x02\x0c\x04\x12\x04\x90\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x0c\x05\ + \x12\x04\x90\x02\r\x11\n\r\n\x05\x04\x0c\x02\x0c\x01\x12\x04\x90\x02\x12\ + \x1c\n\r\n\x05\x04\x0c\x02\x0c\x03\x12\x04\x90\x02\x1f!\n\x0c\n\x04\x04\ + \x0c\x02\r\x12\x04\x91\x02\x04\"\n\r\n\x05\x04\x0c\x02\r\x04\x12\x04\x91\ + \x02\x04\x0c\n\r\n\x05\x04\x0c\x02\r\x05\x12\x04\x91\x02\r\x11\n\r\n\x05\ + \x04\x0c\x02\r\x01\x12\x04\x91\x02\x12\x1c\n\r\n\x05\x04\x0c\x02\r\x03\ + \x12\x04\x91\x02\x1f!\nD\n\x04\x04\x0c\x02\x0e\x12\x04\x94\x02\x04*\x1a6\ + \x20A\x20collection\x20of\x20optional\x20flags\x20for\x20the\x20registra\ + tion.\n\n\r\n\x05\x04\x0c\x02\x0e\x04\x12\x04\x94\x02\x04\x0c\n\r\n\x05\ + \x04\x0c\x02\x0e\x06\x12\x04\x94\x02\r\x1e\n\r\n\x05\x04\x0c\x02\x0e\x01\ + \x12\x04\x94\x02\x1f$\n\r\n\x05\x04\x0c\x02\x0e\x03\x12\x04\x94\x02')\nq\ + \n\x04\x04\x0c\x02\x0f\x12\x04\x98\x02\x04-\x1ac\x20Transport\x20Extensi\ + ons\n\x20TODO(jmwample)\x20-\x20move\x20to\x20WebRTC\x20specific\x20tran\ + sport\x20params\x20protobuf\x20message.\n\n\r\n\x05\x04\x0c\x02\x0f\x04\ + \x12\x04\x98\x02\x04\x0c\n\r\n\x05\x04\x0c\x02\x0f\x06\x12\x04\x98\x02\r\ + \x19\n\r\n\x05\x04\x0c\x02\x0f\x01\x12\x04\x98\x02\x1a'\n\r\n\x05\x04\ + \x0c\x02\x0f\x03\x12\x04\x98\x02*,\nG\n\x04\x04\x0c\x02\x10\x12\x04\x9b\ + \x02\x04!\x1a9\x20Random-sized\x20junk\x20to\x20defeat\x20packet\x20size\ + \x20fingerprinting.\n\n\r\n\x05\x04\x0c\x02\x10\x04\x12\x04\x9b\x02\x04\ + \x0c\n\r\n\x05\x04\x0c\x02\x10\x05\x12\x04\x9b\x02\r\x12\n\r\n\x05\x04\ + \x0c\x02\x10\x01\x12\x04\x9b\x02\x13\x1a\n\r\n\x05\x04\x0c\x02\x10\x03\ + \x12\x04\x9b\x02\x1d\x20\n\x0c\n\x02\x04\r\x12\x06\x9f\x02\0\xb0\x02\x01\ + \n\x0b\n\x03\x04\r\x01\x12\x04\x9f\x02\x08\x1d\n!\n\x04\x04\r\x02\0\x12\ + \x04\xa1\x02\x04!\x1a\x13\x20Prefix\x20Identifier\n\n\r\n\x05\x04\r\x02\ + \0\x04\x12\x04\xa1\x02\x04\x0c\n\r\n\x05\x04\r\x02\0\x05\x12\x04\xa1\x02\ + \r\x12\n\r\n\x05\x04\r\x02\0\x01\x12\x04\xa1\x02\x13\x1c\n\r\n\x05\x04\r\ + \x02\0\x03\x12\x04\xa1\x02\x1f\x20\n\xc4\x01\n\x04\x04\r\x02\x01\x12\x04\ + \xa5\x02\x04\x1e\x1a\xb5\x01\x20Prefix\x20bytes\x20(optional\x20-\x20usu\ + ally\x20sent\x20from\x20station\x20to\x20client\x20as\x20override\x20if\ + \x20allowed\x20by\x20C2S)\n\x20as\x20the\x20station\x20cannot\x20take\ + \x20this\x20into\x20account\x20when\x20attempting\x20to\x20identify\x20a\ + \x20connection.\n\n\r\n\x05\x04\r\x02\x01\x04\x12\x04\xa5\x02\x04\x0c\n\ + \r\n\x05\x04\r\x02\x01\x05\x12\x04\xa5\x02\r\x12\n\r\n\x05\x04\r\x02\x01\ + \x01\x12\x04\xa5\x02\x13\x19\n\r\n\x05\x04\r\x02\x01\x03\x12\x04\xa5\x02\ + \x1c\x1d\n\xed\x02\n\x04\x04\r\x02\x02\x12\x04\xaf\x02\x04*\x1a\xbc\x01\ + \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ + \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ + \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ + ion\x20port\x20randomization\x20is\n\x20supported.\n2\x9f\x01\x20//\x20p\ + otential\x20future\x20fields\n\x20obfuscator\x20ID\n\x20tagEncoder\x20ID\ + \x20(¶ms?,\x20e.g.\x20format-base64\x20/\x20padding)\n\x20streamEnco\ + der\x20ID\x20(¶ms?,\x20e.g.\x20foramat-base64\x20/\x20padding)\n\n\r\ + \n\x05\x04\r\x02\x02\x04\x12\x04\xaf\x02\x04\x0c\n\r\n\x05\x04\r\x02\x02\ + \x05\x12\x04\xaf\x02\r\x11\n\r\n\x05\x04\r\x02\x02\x01\x12\x04\xaf\x02\ + \x12$\n\r\n\x05\x04\r\x02\x02\x03\x12\x04\xaf\x02')\n\x0c\n\x02\x04\x0e\ + \x12\x06\xb2\x02\0\xb7\x02\x01\n\x0b\n\x03\x04\x0e\x01\x12\x04\xb2\x02\ + \x08\x1e\n\xcb\x01\n\x04\x04\x0e\x02\0\x12\x04\xb6\x02\x04*\x1a\xbc\x01\ + \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ + \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ + \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ + ion\x20port\x20randomization\x20is\n\x20supported.\n\n\r\n\x05\x04\x0e\ + \x02\0\x04\x12\x04\xb6\x02\x04\x0c\n\r\n\x05\x04\x0e\x02\0\x05\x12\x04\ + \xb6\x02\r\x11\n\r\n\x05\x04\x0e\x02\0\x01\x12\x04\xb6\x02\x12$\n\r\n\ + \x05\x04\x0e\x02\0\x03\x12\x04\xb6\x02')\n\x0c\n\x02\x05\x06\x12\x06\xb9\ + \x02\0\xc1\x02\x01\n\x0b\n\x03\x05\x06\x01\x12\x04\xb9\x02\x05\x17\n\x0c\ + \n\x04\x05\x06\x02\0\x12\x04\xba\x02\x02\x12\n\r\n\x05\x05\x06\x02\0\x01\ + \x12\x04\xba\x02\x02\r\n\r\n\x05\x05\x06\x02\0\x02\x12\x04\xba\x02\x10\ + \x11\n\x0c\n\x04\x05\x06\x02\x01\x12\x04\xbb\x02\x08\x15\n\r\n\x05\x05\ + \x06\x02\x01\x01\x12\x04\xbb\x02\x08\x10\n\r\n\x05\x05\x06\x02\x01\x02\ + \x12\x04\xbb\x02\x13\x14\n\x0c\n\x04\x05\x06\x02\x02\x12\x04\xbc\x02\x08\ + \x10\n\r\n\x05\x05\x06\x02\x02\x01\x12\x04\xbc\x02\x08\x0b\n\r\n\x05\x05\ + \x06\x02\x02\x02\x12\x04\xbc\x02\x0e\x0f\n\x0c\n\x04\x05\x06\x02\x03\x12\ + \x04\xbd\x02\x02\x16\n\r\n\x05\x05\x06\x02\x03\x01\x12\x04\xbd\x02\x02\ + \x11\n\r\n\x05\x05\x06\x02\x03\x02\x12\x04\xbd\x02\x14\x15\n\x0c\n\x04\ + \x05\x06\x02\x04\x12\x04\xbe\x02\x02\x17\n\r\n\x05\x05\x06\x02\x04\x01\ + \x12\x04\xbe\x02\x02\x12\n\r\n\x05\x05\x06\x02\x04\x02\x12\x04\xbe\x02\ + \x15\x16\n\x0c\n\x04\x05\x06\x02\x05\x12\x04\xbf\x02\x02\n\n\r\n\x05\x05\ + \x06\x02\x05\x01\x12\x04\xbf\x02\x02\x05\n\r\n\x05\x05\x06\x02\x05\x02\ + \x12\x04\xbf\x02\x08\t\n\x0c\n\x04\x05\x06\x02\x06\x12\x04\xc0\x02\x02\ + \x17\n\r\n\x05\x05\x06\x02\x06\x01\x12\x04\xc0\x02\x02\x12\n\r\n\x05\x05\ + \x06\x02\x06\x02\x12\x04\xc0\x02\x15\x16\n\x0c\n\x02\x04\x0f\x12\x06\xc3\ + \x02\0\xdb\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\x04\xc3\x02\x08\x12\n\x0c\ + \n\x04\x04\x0f\x02\0\x12\x04\xc4\x02\x02#\n\r\n\x05\x04\x0f\x02\0\x04\ + \x12\x04\xc4\x02\x02\n\n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\xc4\x02\x0b\ + \x10\n\r\n\x05\x04\x0f\x02\0\x01\x12\x04\xc4\x02\x11\x1e\n\r\n\x05\x04\ + \x0f\x02\0\x03\x12\x04\xc4\x02!\"\n\x0c\n\x04\x04\x0f\x02\x01\x12\x04\ + \xc5\x02\x024\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\xc5\x02\x02\n\n\r\n\ + \x05\x04\x0f\x02\x01\x06\x12\x04\xc5\x02\x0b\x1a\n\r\n\x05\x04\x0f\x02\ + \x01\x01\x12\x04\xc5\x02\x1b/\n\r\n\x05\x04\x0f\x02\x01\x03\x12\x04\xc5\ + \x0223\n\x0c\n\x04\x04\x0f\x02\x02\x12\x04\xc6\x02\x026\n\r\n\x05\x04\ + \x0f\x02\x02\x04\x12\x04\xc6\x02\x02\n\n\r\n\x05\x04\x0f\x02\x02\x06\x12\ + \x04\xc6\x02\x0b\x1d\n\r\n\x05\x04\x0f\x02\x02\x01\x12\x04\xc6\x02\x1e1\ + \n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xc6\x0245\nC\n\x04\x04\x0f\x02\ + \x03\x12\x04\xc9\x02\x02*\x1a5\x20client\x20source\x20address\x20when\ + \x20receiving\x20a\x20registration\n\n\r\n\x05\x04\x0f\x02\x03\x04\x12\ + \x04\xc9\x02\x02\n\n\r\n\x05\x04\x0f\x02\x03\x05\x12\x04\xc9\x02\x0b\x10\ + \n\r\n\x05\x04\x0f\x02\x03\x01\x12\x04\xc9\x02\x11%\n\r\n\x05\x04\x0f\ + \x02\x03\x03\x12\x04\xc9\x02()\nH\n\x04\x04\x0f\x02\x04\x12\x04\xcc\x02\ + \x02#\x1a:\x20Decoy\x20address\x20used\x20when\x20registering\x20over\ + \x20Decoy\x20registrar\n\n\r\n\x05\x04\x0f\x02\x04\x04\x12\x04\xcc\x02\ + \x02\n\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\xcc\x02\x0b\x10\n\r\n\x05\ + \x04\x0f\x02\x04\x01\x12\x04\xcc\x02\x11\x1e\n\r\n\x05\x04\x0f\x02\x04\ + \x03\x12\x04\xcc\x02!\"\n\xeb\x05\n\x04\x04\x0f\x02\x05\x12\x04\xd8\x02\ + \x02:\x1a\xdc\x05\x20The\x20next\x20three\x20fields\x20allow\x20an\x20in\ + dependent\x20registrar\x20(trusted\x20by\x20a\x20station\x20w/\x20a\x20z\ + mq\x20keypair)\x20to\n\x20share\x20the\x20registration\x20overrides\x20t\ + hat\x20it\x20assigned\x20to\x20the\x20client\x20with\x20the\x20station(s\ + ).\n\x20Registration\x20Respose\x20is\x20here\x20to\x20allow\x20a\x20par\ + sed\x20object\x20with\x20direct\x20access\x20to\x20the\x20fields\x20with\ + in.\n\x20RegRespBytes\x20provides\x20a\x20serialized\x20verion\x20of\x20\ + the\x20Registration\x20response\x20so\x20that\x20the\x20signature\x20of\ + \n\x20the\x20Bidirectional\x20registrar\x20can\x20be\x20validated\x20bef\ + ore\x20a\x20station\x20applies\x20any\x20overrides\x20present\x20in\n\ + \x20the\x20Registration\x20Response.\n\n\x20If\x20you\x20are\x20reading\ + \x20this\x20in\x20the\x20future\x20and\x20you\x20want\x20to\x20extend\ + \x20the\x20functionality\x20here\x20it\x20might\n\x20make\x20sense\x20to\ + \x20make\x20the\x20RegistrationResponse\x20that\x20is\x20sent\x20to\x20t\ + he\x20client\x20a\x20distinct\x20message\x20from\n\x20the\x20one\x20that\ + \x20gets\x20sent\x20to\x20the\x20stations.\n\n\r\n\x05\x04\x0f\x02\x05\ + \x04\x12\x04\xd8\x02\x02\n\n\r\n\x05\x04\x0f\x02\x05\x06\x12\x04\xd8\x02\ + \x0b\x1f\n\r\n\x05\x04\x0f\x02\x05\x01\x12\x04\xd8\x02\x205\n\r\n\x05\ + \x04\x0f\x02\x05\x03\x12\x04\xd8\x0289\n\x0c\n\x04\x04\x0f\x02\x06\x12\ + \x04\xd9\x02\x02\"\n\r\n\x05\x04\x0f\x02\x06\x04\x12\x04\xd9\x02\x02\n\n\ + \r\n\x05\x04\x0f\x02\x06\x05\x12\x04\xd9\x02\x0b\x10\n\r\n\x05\x04\x0f\ + \x02\x06\x01\x12\x04\xd9\x02\x11\x1d\n\r\n\x05\x04\x0f\x02\x06\x03\x12\ + \x04\xd9\x02\x20!\n\x0c\n\x04\x04\x0f\x02\x07\x12\x04\xda\x02\x02'\n\r\n\ + \x05\x04\x0f\x02\x07\x04\x12\x04\xda\x02\x02\n\n\r\n\x05\x04\x0f\x02\x07\ + \x05\x12\x04\xda\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x07\x01\x12\x04\xda\ + \x02\x11!\n\r\n\x05\x04\x0f\x02\x07\x03\x12\x04\xda\x02$&\n\x0c\n\x02\ + \x04\x10\x12\x06\xdd\x02\0\xe9\x02\x01\n\x0b\n\x03\x04\x10\x01\x12\x04\ + \xdd\x02\x08\x14\n9\n\x04\x04\x10\x02\0\x12\x04\xde\x02\x04.\"+\x20how\ + \x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\x05\x04\ + \x10\x02\0\x04\x12\x04\xde\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\x05\x12\ + \x04\xde\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xde\x02\x14(\n\r\ + \n\x05\x04\x10\x02\0\x03\x12\x04\xde\x02+-\nm\n\x04\x04\x10\x02\x01\x12\ + \x04\xe3\x02\x04/\x1a\x1e\x20Applicable\x20to\x20whole\x20session:\n\"\ + \x1a\x20includes\x20failed\x20attempts\n2#\x20Timings\x20below\x20are\ + \x20in\x20milliseconds\n\n\r\n\x05\x04\x10\x02\x01\x04\x12\x04\xe3\x02\ + \x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xe3\x02\r\x13\n\r\n\x05\ + \x04\x10\x02\x01\x01\x12\x04\xe3\x02\x14)\n\r\n\x05\x04\x10\x02\x01\x03\ + \x12\x04\xe3\x02,.\nR\n\x04\x04\x10\x02\x02\x12\x04\xe6\x02\x04(\x1a\x1f\ + \x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20during\ + \x20initial\x20handshake\n\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xe6\x02\ + \x04\x0c\n\r\n\x05\x04\x10\x02\x02\x05\x12\x04\xe6\x02\r\x13\n\r\n\x05\ + \x04\x10\x02\x02\x01\x12\x04\xe6\x02\x14\"\n\r\n\x05\x04\x10\x02\x02\x03\ + \x12\x04\xe6\x02%'\n%\n\x04\x04\x10\x02\x03\x12\x04\xe7\x02\x04&\"\x17\ + \x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x10\x02\x03\x04\x12\ + \x04\xe7\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x05\x12\x04\xe7\x02\r\x13\ + \n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xe7\x02\x14\x20\n\r\n\x05\x04\x10\ + \x02\x03\x03\x12\x04\xe7\x02#%\nB\n\x04\x04\x10\x02\x04\x12\x04\xe8\x02\ + \x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\x20to\ + \x20decot\n\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xe8\x02\x04\x0c\n\r\n\ + \x05\x04\x10\x02\x04\x05\x12\x04\xe8\x02\r\x13\n\r\n\x05\x04\x10\x02\x04\ + \x01\x12\x04\xe8\x02\x14\x20\n\r\n\x05\x04\x10\x02\x04\x03\x12\x04\xe8\ + \x02#%\n\x0c\n\x02\x05\x07\x12\x06\xeb\x02\0\xf0\x02\x01\n\x0b\n\x03\x05\ + \x07\x01\x12\x04\xeb\x02\x05\x16\n\x0c\n\x04\x05\x07\x02\0\x12\x04\xec\ + \x02\x04\x10\n\r\n\x05\x05\x07\x02\0\x01\x12\x04\xec\x02\x04\x0b\n\r\n\ + \x05\x05\x07\x02\0\x02\x12\x04\xec\x02\x0e\x0f\n\x0c\n\x04\x05\x07\x02\ + \x01\x12\x04\xed\x02\x04\x0c\n\r\n\x05\x05\x07\x02\x01\x01\x12\x04\xed\ + \x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\x02\x12\x04\xed\x02\n\x0b\n\x0c\n\ + \x04\x05\x07\x02\x02\x12\x04\xee\x02\x04\x0f\n\r\n\x05\x05\x07\x02\x02\ + \x01\x12\x04\xee\x02\x04\n\n\r\n\x05\x05\x07\x02\x02\x02\x12\x04\xee\x02\ + \r\x0e\n\x0c\n\x04\x05\x07\x02\x03\x12\x04\xef\x02\x04\x0e\n\r\n\x05\x05\ + \x07\x02\x03\x01\x12\x04\xef\x02\x04\t\n\r\n\x05\x05\x07\x02\x03\x02\x12\ + \x04\xef\x02\x0c\r\n\x0c\n\x02\x05\x08\x12\x06\xf2\x02\0\xf6\x02\x01\n\ + \x0b\n\x03\x05\x08\x01\x12\x04\xf2\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\0\ + \x12\x04\xf3\x02\x04\x0c\n\r\n\x05\x05\x08\x02\0\x01\x12\x04\xf3\x02\x04\ + \x07\n\r\n\x05\x05\x08\x02\0\x02\x12\x04\xf3\x02\n\x0b\n\x0c\n\x04\x05\ + \x08\x02\x01\x12\x04\xf4\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\x12\ + \x04\xf4\x02\x04\x07\n\r\n\x05\x05\x08\x02\x01\x02\x12\x04\xf4\x02\n\x0b\ + \n\x0c\n\x04\x05\x08\x02\x02\x12\x04\xf5\x02\x04\x0c\n\r\n\x05\x05\x08\ + \x02\x02\x01\x12\x04\xf5\x02\x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\x12\ + \x04\xf5\x02\n\x0b\n\x0c\n\x02\x04\x11\x12\x06\xf8\x02\0\x83\x03\x01\n\ + \x0b\n\x03\x04\x11\x01\x12\x04\xf8\x02\x08\x19\n\x0c\n\x04\x04\x11\x02\0\ + \x12\x04\xf9\x02\x04#\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xf9\x02\x04\ + \x0c\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xf9\x02\r\x13\n\r\n\x05\x04\x11\ + \x02\0\x01\x12\x04\xf9\x02\x14\x1e\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\ + \xf9\x02!\"\n\x0c\n\x04\x04\x11\x02\x01\x12\x04\xfa\x02\x04\"\n\r\n\x05\ + \x04\x11\x02\x01\x04\x12\x04\xfa\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x01\ + \x05\x12\x04\xfa\x02\r\x13\n\r\n\x05\x04\x11\x02\x01\x01\x12\x04\xfa\x02\ + \x14\x1d\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xfa\x02\x20!\n\x0c\n\x04\ + \x04\x11\x02\x02\x12\x04\xfc\x02\x04#\n\r\n\x05\x04\x11\x02\x02\x04\x12\ + \x04\xfc\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xfc\x02\r\x13\ + \n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xfc\x02\x14\x1e\n\r\n\x05\x04\x11\ + \x02\x02\x03\x12\x04\xfc\x02!\"\n\x0c\n\x04\x04\x11\x02\x03\x12\x04\xfe\ + \x02\x04-\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xfe\x02\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x03\x06\x12\x04\xfe\x02\r\x1e\n\r\n\x05\x04\x11\x02\x03\ + \x01\x12\x04\xfe\x02\x1f(\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\xfe\x02+\ + ,\n\x0c\n\x04\x04\x11\x02\x04\x12\x04\x80\x03\x04\"\n\r\n\x05\x04\x11\ + \x02\x04\x04\x12\x04\x80\x03\x04\x0c\n\r\n\x05\x04\x11\x02\x04\x05\x12\ + \x04\x80\x03\r\x13\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\x80\x03\x14\x1c\ + \n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\x80\x03\x1f!\n\x0c\n\x04\x04\x11\ + \x02\x05\x12\x04\x81\x03\x04\"\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\x81\ + \x03\x04\x0c\n\r\n\x05\x04\x11\x02\x05\x05\x12\x04\x81\x03\r\x13\n\r\n\ + \x05\x04\x11\x02\x05\x01\x12\x04\x81\x03\x14\x1c\n\r\n\x05\x04\x11\x02\ + \x05\x03\x12\x04\x81\x03\x1f!\n\x0c\n\x04\x04\x11\x02\x06\x12\x04\x82\ + \x03\x04\x20\n\r\n\x05\x04\x11\x02\x06\x04\x12\x04\x82\x03\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x06\x06\x12\x04\x82\x03\r\x14\n\r\n\x05\x04\x11\x02\x06\ + \x01\x12\x04\x82\x03\x15\x1a\n\r\n\x05\x04\x11\x02\x06\x03\x12\x04\x82\ + \x03\x1d\x1f\nT\n\x02\x04\x12\x12\x06\x86\x03\0\x9a\x03\x01\x1aF\x20Addi\ + ng\x20message\x20response\x20from\x20Station\x20to\x20Client\x20for\x20b\ + idirectional\x20API\n\n\x0b\n\x03\x04\x12\x01\x12\x04\x86\x03\x08\x1c\n\ + \x0c\n\x04\x04\x12\x02\0\x12\x04\x87\x03\x02\x20\n\r\n\x05\x04\x12\x02\0\ + \x04\x12\x04\x87\x03\x02\n\n\r\n\x05\x04\x12\x02\0\x05\x12\x04\x87\x03\ + \x0b\x12\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\x87\x03\x13\x1b\n\r\n\x05\ + \x04\x12\x02\0\x03\x12\x04\x87\x03\x1e\x1f\n?\n\x04\x04\x12\x02\x01\x12\ + \x04\x89\x03\x02\x1e\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\ + \x20network\x20byte\x20order\n\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\x89\ + \x03\x02\n\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\x89\x03\x0b\x10\n\r\n\ + \x05\x04\x12\x02\x01\x01\x12\x04\x89\x03\x11\x19\n\r\n\x05\x04\x12\x02\ + \x01\x03\x12\x04\x89\x03\x1c\x1d\n,\n\x04\x04\x12\x02\x02\x12\x04\x8c\ + \x03\x02\x1f\x1a\x1e\x20Respond\x20with\x20randomized\x20port\n\n\r\n\ + \x05\x04\x12\x02\x02\x04\x12\x04\x8c\x03\x02\n\n\r\n\x05\x04\x12\x02\x02\ + \x05\x12\x04\x8c\x03\x0b\x11\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\x8c\ + \x03\x12\x1a\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\x8c\x03\x1d\x1e\nd\n\ + \x04\x04\x12\x02\x03\x12\x04\x90\x03\x02\"\x1aV\x20Future:\x20station\ + \x20provides\x20client\x20with\x20secret,\x20want\x20chanel\x20present\n\ + \x20Leave\x20null\x20for\x20now\n\n\r\n\x05\x04\x12\x02\x03\x04\x12\x04\ + \x90\x03\x02\n\n\r\n\x05\x04\x12\x02\x03\x05\x12\x04\x90\x03\x0b\x10\n\r\ + \n\x05\x04\x12\x02\x03\x01\x12\x04\x90\x03\x11\x1d\n\r\n\x05\x04\x12\x02\ + \x03\x03\x12\x04\x90\x03\x20!\nA\n\x04\x04\x12\x02\x04\x12\x04\x93\x03\ + \x02\x1c\x1a3\x20If\x20registration\x20wrong,\x20populate\x20this\x20err\ + or\x20string\n\n\r\n\x05\x04\x12\x02\x04\x04\x12\x04\x93\x03\x02\n\n\r\n\ + \x05\x04\x12\x02\x04\x05\x12\x04\x93\x03\x0b\x11\n\r\n\x05\x04\x12\x02\ + \x04\x01\x12\x04\x93\x03\x12\x17\n\r\n\x05\x04\x12\x02\x04\x03\x12\x04\ + \x93\x03\x1a\x1b\n+\n\x04\x04\x12\x02\x05\x12\x04\x96\x03\x02%\x1a\x1d\ + \x20ClientConf\x20field\x20(optional)\n\n\r\n\x05\x04\x12\x02\x05\x04\ + \x12\x04\x96\x03\x02\n\n\r\n\x05\x04\x12\x02\x05\x06\x12\x04\x96\x03\x0b\ + \x15\n\r\n\x05\x04\x12\x02\x05\x01\x12\x04\x96\x03\x16\x20\n\r\n\x05\x04\ + \x12\x02\x05\x03\x12\x04\x96\x03#$\nJ\n\x04\x04\x12\x02\x06\x12\x04\x99\ + \x03\x025\x1a<\x20Transport\x20Params\x20to\x20if\x20`allow_registrar_ov\ + errides`\x20is\x20set.\n\n\r\n\x05\x04\x12\x02\x06\x04\x12\x04\x99\x03\ + \x02\n\n\r\n\x05\x04\x12\x02\x06\x06\x12\x04\x99\x03\x0b\x1e\n\r\n\x05\ + \x04\x12\x02\x06\x01\x12\x04\x99\x03\x1f/\n\r\n\x05\x04\x12\x02\x06\x03\ + \x12\x04\x99\x0324\n!\n\x02\x04\x13\x12\x06\x9d\x03\0\xa1\x03\x01\x1a\ + \x13\x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x13\x01\x12\x04\x9d\ + \x03\x08\x13\n\x0c\n\x04\x04\x13\x02\0\x12\x04\x9e\x03\x04\x1e\n\r\n\x05\ + \x04\x13\x02\0\x04\x12\x04\x9e\x03\x04\x0c\n\r\n\x05\x04\x13\x02\0\x05\ + \x12\x04\x9e\x03\r\x11\n\r\n\x05\x04\x13\x02\0\x01\x12\x04\x9e\x03\x12\ + \x19\n\r\n\x05\x04\x13\x02\0\x03\x12\x04\x9e\x03\x1c\x1d\n\x0c\n\x04\x04\ + \x13\x02\x01\x12\x04\x9f\x03\x04*\n\r\n\x05\x04\x13\x02\x01\x04\x12\x04\ + \x9f\x03\x04\x0c\n\r\n\x05\x04\x13\x02\x01\x05\x12\x04\x9f\x03\r\x11\n\r\ + \n\x05\x04\x13\x02\x01\x01\x12\x04\x9f\x03\x12%\n\r\n\x05\x04\x13\x02\ + \x01\x03\x12\x04\x9f\x03()\n\x0c\n\x04\x04\x13\x02\x02\x12\x04\xa0\x03\ + \x04=\n\r\n\x05\x04\x13\x02\x02\x04\x12\x04\xa0\x03\x04\x0c\n\r\n\x05\ + \x04\x13\x02\x02\x06\x12\x04\xa0\x03\r!\n\r\n\x05\x04\x13\x02\x02\x01\ + \x12\x04\xa0\x03\"8\n\r\n\x05\x04\x13\x02\x02\x03\x12\x04\xa0\x03;<\ "; /// `FileDescriptorProto` object which was a source for this generated file @@ -6821,7 +7319,7 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(1); deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(19); + let mut messages = ::std::vec::Vec::with_capacity(20); messages.push(PubKey::generated_message_descriptor_data()); messages.push(TLSDecoySpec::generated_message_descriptor_data()); messages.push(ClientConf::generated_message_descriptor_data()); @@ -6835,6 +7333,7 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { messages.push(StationToClient::generated_message_descriptor_data()); messages.push(RegistrationFlags::generated_message_descriptor_data()); messages.push(ClientToStation::generated_message_descriptor_data()); + messages.push(PrefixTransportParams::generated_message_descriptor_data()); messages.push(GenericTransportParams::generated_message_descriptor_data()); messages.push(C2SWrapper::generated_message_descriptor_data()); messages.push(SessionStats::generated_message_descriptor_data()); From 37e85b552bb52a8202bfe0bd72016e4312d275ee Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 28 Jun 2023 16:30:37 -0400 Subject: [PATCH 17/26] lib: fix path issue --- pkg/station/lib/config_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/station/lib/config_test.go b/pkg/station/lib/config_test.go index 525fee60..7dc9c64f 100644 --- a/pkg/station/lib/config_test.go +++ b/pkg/station/lib/config_test.go @@ -12,7 +12,7 @@ import ( // TestConfigParse double checks to ensure that the identity struct reflection // trick works and that the fields are accessible. func TestConfigParse(t *testing.T) { - os.Setenv("CJ_STATION_CONFIG", conjurepath.Root+"/application/config.toml") + os.Setenv("CJ_STATION_CONFIG", conjurepath.Root+"/cmd/application/config.toml") var c Config _, err := toml.DecodeFile(os.Getenv("CJ_STATION_CONFIG"), &c) From 11f446cb64a60a35cc029a685decabb83333a800 Mon Sep 17 00:00:00 2001 From: marshall Date: Thu, 29 Jun 2023 11:31:28 -0400 Subject: [PATCH 18/26] copy file contents from gotapdance current --- pkg/core/interfaces/interfaces.go | 4 ++-- pkg/transports/client/transports_test.go | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/core/interfaces/interfaces.go b/pkg/core/interfaces/interfaces.go index 7c472ce2..bb5f76ec 100644 --- a/pkg/core/interfaces/interfaces.go +++ b/pkg/core/interfaces/interfaces.go @@ -22,14 +22,14 @@ type Transport interface { // GetParams returns a generic protobuf with any parameters from both the registration and the // transport. - GetParams() proto.Message + GetParams() (proto.Message, error) // SetParams allows the caller to set parameters associated with the transport, returning an // error if the provided generic message is not compatible. SetParams(any) error // GetDstPort returns the destination port that the client should open the phantom connection with. - GetDstPort(seed []byte, params any) (uint16, error) + GetDstPort(seed []byte) (uint16, error) // PrepareKeys provides an opportunity for the transport to integrate the station public key // as well as bytes from the deterministic random generator associated with the registration diff --git a/pkg/transports/client/transports_test.go b/pkg/transports/client/transports_test.go index 11513f2d..8959deed 100644 --- a/pkg/transports/client/transports_test.go +++ b/pkg/transports/client/transports_test.go @@ -23,25 +23,27 @@ func TestTransportParameterFunctionality(t *testing.T) { transport := &min.ClientTransport{} // If params is unset it returns nil - params := transport.GetParams() + params, err := transport.GetParams() + require.Nil(t, err) require.Nil(t, params) transport.Parameters = paramsRandomize // Once params are set it returns a protobuf message that can be cast and parsed or otherwise // operated upon - params = transport.GetParams() + params, err = transport.GetParams() + require.Nil(t, err) require.Equal(t, true, params.(*pb.GenericTransportParams).GetRandomizeDstPort()) // We can then set the parameters if the proper parameters structure is provided even using // the generic transport interface. var gt cj.Transport = transport - err := gt.SetParams(paramsStatic) + err = gt.SetParams(paramsStatic) require.Nil(t, err) // The updated parameters are reflected when we get the parameters, again returning a protobuf // message that can be cast and parsed or otherwise operated upon. - params = transport.GetParams() + params, err = transport.GetParams() require.Nil(t, err) require.Equal(t, false, params.(*pb.GenericTransportParams).GetRandomizeDstPort()) From 47215350ff5ee4ca200067aa9718d24de640b065 Mon Sep 17 00:00:00 2001 From: marshall Date: Thu, 29 Jun 2023 11:35:55 -0400 Subject: [PATCH 19/26] copy recent changes from gotapdance --- pkg/registrars/dns-registrar/encryption/encryption.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/registrars/dns-registrar/encryption/encryption.go b/pkg/registrars/dns-registrar/encryption/encryption.go index 66cec8ae..04c3dd7d 100644 --- a/pkg/registrars/dns-registrar/encryption/encryption.go +++ b/pkg/registrars/dns-registrar/encryption/encryption.go @@ -2,6 +2,7 @@ package encryption import ( "bufio" + "crypto/ed25519" "crypto/rand" "encoding/hex" "fmt" @@ -71,6 +72,10 @@ func GeneratePrivkey() ([]byte, error) { // PubkeyFromPrivkey returns the public key that corresponds to privkey. func PubkeyFromPrivkey(privkey []byte) []byte { + if len(privkey) == ed25519.PrivateKeySize { + return privkey[ed25519.PublicKeySize:] + } + pubkey, err := curve25519.X25519(privkey, curve25519.Basepoint) if err != nil { panic(err) From fe6135160d95b5176879f935f3a359d8e0bcacbb Mon Sep 17 00:00:00 2001 From: marshall Date: Thu, 29 Jun 2023 15:11:56 -0400 Subject: [PATCH 20/26] update Makefile directory --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 381751e5..30d410cd 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ test: app: [ -d $(EXE_DIR) ] || mkdir -p $(EXE_DIR) - go build -o ${EXE_DIR}/application ./application + go build -o ${EXE_DIR}/application ./cmd/application libtd: cd ./libtapdance/ && make libtapdance.a From 5c8690690f9fa195f24fa33665249b595c4e2878 Mon Sep 17 00:00:00 2001 From: marshall Date: Thu, 29 Jun 2023 15:17:24 -0400 Subject: [PATCH 21/26] go.sum fix merge conflict --- go.sum | 5 ----- 1 file changed, 5 deletions(-) diff --git a/go.sum b/go.sum index a0ac3f82..7ebd2d0a 100644 --- a/go.sum +++ b/go.sum @@ -89,15 +89,10 @@ google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -<<<<<<< HEAD google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -======= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= ->>>>>>> master gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= From be19e6895af7919d29f64d0019b346c61aa9c869 Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 5 Jul 2023 11:49:20 -0400 Subject: [PATCH 22/26] changes from gotapdance --- pkg/core/interfaces/interfaces.go | 12 +- proto/signalling.pb.go | 772 ++++++++-------- proto/signalling.proto | 5 +- proto/signalling.rs | 1357 +++++++++++++++-------------- src/signalling.rs | 1357 +++++++++++++++-------------- 5 files changed, 1803 insertions(+), 1700 deletions(-) diff --git a/pkg/core/interfaces/interfaces.go b/pkg/core/interfaces/interfaces.go index bb5f76ec..4faed378 100644 --- a/pkg/core/interfaces/interfaces.go +++ b/pkg/core/interfaces/interfaces.go @@ -6,6 +6,7 @@ import ( pb "github.com/refraction-networking/conjure/proto" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" ) // Transport provides a generic interface for utilities that allow the client to dial and connect to @@ -24,9 +25,16 @@ type Transport interface { // transport. GetParams() (proto.Message, error) + // ParseParams gives the specific transport an option to parse a generic object into parameters + // provided by the station in the registration response during registration. + ParseParams(data *anypb.Any) (any, error) + // SetParams allows the caller to set parameters associated with the transport, returning an - // error if the provided generic message is not compatible. - SetParams(any) error + // error if the provided generic message is not compatible. the variadic bool parameter is used + // to indicate whether the client should sanity check the params or just apply them. This is + // useful in cases where the registrar may provide options to the client that it is able to + // handle, but are outside of the clients sanity checks. (see prefix transport for an example) + SetParams(any, ...bool) error // GetDstPort returns the destination port that the client should open the phantom connection with. GetDstPort(seed []byte) (uint16, error) diff --git a/proto/signalling.pb.go b/proto/signalling.pb.go index c57b3e79..72d40594 100644 --- a/proto/signalling.pb.go +++ b/proto/signalling.pb.go @@ -645,7 +645,7 @@ type PubKey struct { // A public key, as used by the station. Key []byte `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - Type *KeyType `protobuf:"varint,2,opt,name=type,enum=conjure.KeyType" json:"type,omitempty"` + Type *KeyType `protobuf:"varint,2,opt,name=type,enum=tapdance.KeyType" json:"type,omitempty"` } func (x *PubKey) Reset() { @@ -900,7 +900,7 @@ type DnsRegConf struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DnsRegMethod *DnsRegMethod `protobuf:"varint,1,req,name=dns_reg_method,json=dnsRegMethod,enum=conjure.DnsRegMethod" json:"dns_reg_method,omitempty"` + DnsRegMethod *DnsRegMethod `protobuf:"varint,1,req,name=dns_reg_method,json=dnsRegMethod,enum=tapdance.DnsRegMethod" json:"dns_reg_method,omitempty"` Target *string `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` Domain *string `protobuf:"bytes,3,req,name=domain" json:"domain,omitempty"` Pubkey []byte `protobuf:"bytes,4,opt,name=pubkey" json:"pubkey,omitempty"` @@ -1318,12 +1318,12 @@ type StationToClient struct { ProtocolVersion *uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion" json:"protocol_version,omitempty"` // There might be a state transition. May be absent; absence should be // treated identically to NO_CHANGE. - StateTransition *S2C_Transition `protobuf:"varint,2,opt,name=state_transition,json=stateTransition,enum=conjure.S2C_Transition" json:"state_transition,omitempty"` + StateTransition *S2C_Transition `protobuf:"varint,2,opt,name=state_transition,json=stateTransition,enum=tapdance.S2C_Transition" json:"state_transition,omitempty"` // The station can send client config info piggybacked // on any message, as it sees fit ConfigInfo *ClientConf `protobuf:"bytes,3,opt,name=config_info,json=configInfo" json:"config_info,omitempty"` // If state_transition == S2C_ERROR, this field is the explanation. - ErrReason *ErrorReasonS2C `protobuf:"varint,4,opt,name=err_reason,json=errReason,enum=conjure.ErrorReasonS2C" json:"err_reason,omitempty"` + ErrReason *ErrorReasonS2C `protobuf:"varint,4,opt,name=err_reason,json=errReason,enum=tapdance.ErrorReasonS2C" json:"err_reason,omitempty"` // Signals client to stop connecting for following amount of seconds TmpBackoff *uint32 `protobuf:"varint,5,opt,name=tmp_backoff,json=tmpBackoff" json:"tmp_backoff,omitempty"` // Sent in SESSION_INIT, identifies the station that picked up @@ -1502,7 +1502,7 @@ type ClientToStation struct { // station can use to decide whether to send an updated one. The station // should always send a list if this field is set to 0. DecoyListGeneration *uint32 `protobuf:"varint,2,opt,name=decoy_list_generation,json=decoyListGeneration" json:"decoy_list_generation,omitempty"` - StateTransition *C2S_Transition `protobuf:"varint,3,opt,name=state_transition,json=stateTransition,enum=conjure.C2S_Transition" json:"state_transition,omitempty"` + StateTransition *C2S_Transition `protobuf:"varint,3,opt,name=state_transition,json=stateTransition,enum=tapdance.C2S_Transition" json:"state_transition,omitempty"` // The position in the overall session's upload sequence where the current // YIELD=>ACQUIRE switchover is happening. UploadSync *uint64 `protobuf:"varint,4,opt,name=upload_sync,json=uploadSync" json:"upload_sync,omitempty"` @@ -1512,13 +1512,13 @@ type ClientToStation struct { // Indicates whether the client will allow the registrar to provide alternative parameters that // may work better in substitute for the deterministically selected parameters. This only works // for bidirectional registration methods where the client receives a RegistrationResponse. - AllowRegistrarOverrides *bool `protobuf:"varint,6,opt,name=allow_registrar_overrides,json=allowRegistrarOverrides" json:"allow_registrar_overrides,omitempty"` + DisableRegistrarOverrides *bool `protobuf:"varint,6,opt,name=disable_registrar_overrides,json=disableRegistrarOverrides" json:"disable_registrar_overrides,omitempty"` // List of decoys that client have unsuccessfully tried in current session. // Could be sent in chunks FailedDecoys []string `protobuf:"bytes,10,rep,name=failed_decoys,json=failedDecoys" json:"failed_decoys,omitempty"` Stats *SessionStats `protobuf:"bytes,11,opt,name=stats" json:"stats,omitempty"` // NullTransport, MinTransport, Obfs4Transport, etc. Transport type we want from phantom proxy - Transport *TransportType `protobuf:"varint,12,opt,name=transport,enum=conjure.TransportType" json:"transport,omitempty"` + Transport *TransportType `protobuf:"varint,12,opt,name=transport,enum=tapdance.TransportType" json:"transport,omitempty"` TransportParams *anypb.Any `protobuf:"bytes,13,opt,name=transport_params,json=transportParams" json:"transport_params,omitempty"` // Station is only required to check this variable during session initialization. // If set, station must facilitate connection to said target by itself, i.e. write into squid @@ -1608,9 +1608,9 @@ func (x *ClientToStation) GetClientLibVersion() uint32 { return 0 } -func (x *ClientToStation) GetAllowRegistrarOverrides() bool { - if x != nil && x.AllowRegistrarOverrides != nil { - return *x.AllowRegistrarOverrides +func (x *ClientToStation) GetDisableRegistrarOverrides() bool { + if x != nil && x.DisableRegistrarOverrides != nil { + return *x.DisableRegistrarOverrides } return false } @@ -1701,7 +1701,8 @@ type PrefixTransportParams struct { PrefixId *int32 `protobuf:"varint,1,opt,name=prefix_id,json=prefixId" json:"prefix_id,omitempty"` // Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) // as the station cannot take this into account when attempting to identify a connection. - Prefix []byte `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"` + Prefix []byte `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"` + FlushAfterPrefix *bool `protobuf:"varint,3,opt,name=flush_after_prefix,json=flushAfterPrefix" json:"flush_after_prefix,omitempty"` // Indicates whether the client has elected to use destination port randomization. Should be // checked against selected transport to ensure that destination port randomization is // supported. @@ -1754,6 +1755,13 @@ func (x *PrefixTransportParams) GetPrefix() []byte { return nil } +func (x *PrefixTransportParams) GetFlushAfterPrefix() bool { + if x != nil && x.FlushAfterPrefix != nil { + return *x.FlushAfterPrefix + } + return false +} + func (x *PrefixTransportParams) GetRandomizeDstPort() bool { if x != nil && x.RandomizeDstPort != nil { return *x.RandomizeDstPort @@ -1818,7 +1826,7 @@ type C2SWrapper struct { SharedSecret []byte `protobuf:"bytes,1,opt,name=shared_secret,json=sharedSecret" json:"shared_secret,omitempty"` RegistrationPayload *ClientToStation `protobuf:"bytes,3,opt,name=registration_payload,json=registrationPayload" json:"registration_payload,omitempty"` - RegistrationSource *RegistrationSource `protobuf:"varint,4,opt,name=registration_source,json=registrationSource,enum=conjure.RegistrationSource" json:"registration_source,omitempty"` + RegistrationSource *RegistrationSource `protobuf:"varint,4,opt,name=registration_source,json=registrationSource,enum=tapdance.RegistrationSource" json:"registration_source,omitempty"` // client source address when receiving a registration RegistrationAddress []byte `protobuf:"bytes,6,opt,name=registration_address,json=registrationAddress" json:"registration_address,omitempty"` // Decoy address used when registering over Decoy registrar @@ -2015,10 +2023,10 @@ type StationToDetector struct { PhantomIp *string `protobuf:"bytes,1,opt,name=phantom_ip,json=phantomIp" json:"phantom_ip,omitempty"` ClientIp *string `protobuf:"bytes,2,opt,name=client_ip,json=clientIp" json:"client_ip,omitempty"` TimeoutNs *uint64 `protobuf:"varint,3,opt,name=timeout_ns,json=timeoutNs" json:"timeout_ns,omitempty"` - Operation *StationOperations `protobuf:"varint,4,opt,name=operation,enum=conjure.StationOperations" json:"operation,omitempty"` + Operation *StationOperations `protobuf:"varint,4,opt,name=operation,enum=tapdance.StationOperations" json:"operation,omitempty"` DstPort *uint32 `protobuf:"varint,10,opt,name=dst_port,json=dstPort" json:"dst_port,omitempty"` SrcPort *uint32 `protobuf:"varint,11,opt,name=src_port,json=srcPort" json:"src_port,omitempty"` - Proto *IPProto `protobuf:"varint,12,opt,name=proto,enum=conjure.IPProto" json:"proto,omitempty"` + Proto *IPProto `protobuf:"varint,12,opt,name=proto,enum=tapdance.IPProto" json:"proto,omitempty"` } func (x *StationToDetector) Reset() { @@ -2273,106 +2281,107 @@ var File_signalling_proto protoreflect.FileDescriptor var file_signalling_proto_rawDesc = []byte{ 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0c, 0x54, 0x4c, 0x53, - 0x44, 0x65, 0x63, 0x6f, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, - 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, - 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, 0x12, 0x27, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x74, 0x63, 0x70, 0x77, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x06, 0x74, 0x63, 0x70, 0x77, 0x69, 0x6e, 0x22, 0xd5, 0x02, 0x0a, 0x0a, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6f, 0x79, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, - 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0e, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x14, 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x75, - 0x62, 0x6e, 0x65, 0x74, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x68, 0x61, 0x6e, 0x74, - 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x12, 0x70, - 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x36, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, - 0x75, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6a, - 0x75, 0x72, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x0c, 0x64, 0x6e, 0x73, - 0x5f, 0x72, 0x65, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, - 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x0a, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x43, 0x6f, 0x6e, 0x66, - 0x22, 0xdf, 0x01, 0x0a, 0x0a, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x12, - 0x3b, 0x0a, 0x0e, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, - 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0c, - 0x64, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, - 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x74, 0x6c, 0x73, 0x5f, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x75, 0x74, 0x6c, 0x73, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x75, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x75, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x22, 0x41, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x34, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x54, 0x4c, - 0x53, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x74, 0x6c, 0x73, 0x44, - 0x65, 0x63, 0x6f, 0x79, 0x73, 0x22, 0x58, 0x0a, 0x12, 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, - 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x10, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, - 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x0f, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x22, - 0x42, 0x0a, 0x0e, 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, - 0x6e, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6e, - 0x65, 0x74, 0x73, 0x22, 0x6f, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x49, 0x43, 0x45, - 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x70, 0x5f, - 0x75, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x69, 0x70, 0x55, - 0x70, 0x70, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x70, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x69, 0x70, 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, - 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5c, 0x0a, 0x09, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x44, - 0x50, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, - 0x75, 0x72, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x49, 0x43, 0x45, 0x43, 0x61, 0x6e, - 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x22, 0x48, 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x03, 0x73, 0x64, 0x70, 0x18, 0x02, 0x20, - 0x02, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x57, 0x65, - 0x62, 0x52, 0x54, 0x43, 0x53, 0x44, 0x50, 0x52, 0x03, 0x73, 0x64, 0x70, 0x22, 0xc8, 0x02, 0x0a, - 0x0f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x10, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, - 0x53, 0x32, 0x43, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x34, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, - 0x75, 0x72, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x53, + 0x74, 0x6f, 0x12, 0x08, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x11, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x4b, 0x65, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x0c, 0x54, + 0x4c, 0x53, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x68, + 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, + 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x34, 0x61, + 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, 0x61, + 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, 0x12, + 0x28, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x63, 0x70, 0x77, 0x69, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x74, 0x63, 0x70, 0x77, 0x69, 0x6e, 0x22, 0xda, 0x02, 0x0a, 0x0a, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x32, 0x0a, 0x0a, 0x64, 0x65, + 0x63, 0x6f, 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, + 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x14, 0x70, 0x68, 0x61, 0x6e, 0x74, + 0x6f, 0x6d, 0x5f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x12, 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, + 0x72, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x12, 0x36, 0x0a, 0x0c, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x0a, 0x64, 0x6e, + 0x73, 0x52, 0x65, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x22, 0xe0, 0x01, 0x0a, 0x0a, 0x44, 0x6e, 0x73, + 0x52, 0x65, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x3c, 0x0a, 0x0e, 0x64, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, + 0x16, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, + 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0c, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, + 0x11, 0x75, 0x74, 0x6c, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x74, 0x6c, 0x73, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, + 0x75, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x73, 0x74, 0x75, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x42, 0x0a, 0x09, 0x44, + 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, + 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, + 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x54, 0x4c, 0x53, 0x44, 0x65, 0x63, 0x6f, 0x79, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x74, 0x6c, 0x73, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x22, + 0x59, 0x0a, 0x12, 0x50, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x50, 0x68, 0x61, 0x6e, 0x74, + 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x0f, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x42, 0x0a, 0x0e, 0x50, 0x68, + 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x6f, + 0x0a, 0x12, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x49, 0x43, 0x45, 0x43, 0x61, 0x6e, 0x64, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x70, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x69, 0x70, 0x55, 0x70, 0x70, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x08, 0x69, 0x70, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x04, 0x52, 0x07, 0x69, 0x70, 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x02, 0x28, + 0x0d, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0x5d, 0x0a, 0x09, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x44, 0x50, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x3c, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, + 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x49, 0x43, 0x45, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x49, + 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x73, 0x65, + 0x65, 0x64, 0x12, 0x25, 0x0a, 0x03, 0x73, 0x64, 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x52, 0x54, + 0x43, 0x53, 0x44, 0x50, 0x52, 0x03, 0x73, 0x64, 0x70, 0x22, 0xcb, 0x02, 0x0a, 0x0f, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x53, 0x32, + 0x43, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, + 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x53, 0x32, 0x43, 0x52, 0x09, 0x65, 0x72, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6d, 0x70, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6d, 0x70, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x1d, @@ -2390,223 +2399,226 @@ var file_signalling_proto_rawDesc = []byte{ 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x5f, 0x54, 0x49, 0x4c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x73, 0x65, 0x54, 0x49, 0x4c, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, - 0x72, 0x65, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x22, 0xae, 0x06, 0x0a, 0x0f, 0x43, 0x6c, + 0x72, 0x65, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x22, 0xb7, 0x06, 0x0a, 0x0f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x4c, 0x69, - 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x10, + 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, - 0x2e, 0x43, 0x32, 0x53, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x62, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x3a, 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x72, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x73, - 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x34, 0x0a, - 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6d, - 0x61, 0x73, 0x6b, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, - 0x61, 0x73, 0x6b, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x36, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x76, 0x36, 0x53, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x34, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x76, 0x34, 0x53, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, - 0x6c, 0x61, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0d, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, - 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x7a, 0x0a, 0x15, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x44, - 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x46, 0x0a, 0x16, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x2e, 0x43, 0x32, 0x53, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x79, 0x6e, 0x63, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x79, + 0x6e, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x62, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x3e, 0x0a, 0x1b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x72, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, + 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, + 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, + 0x65, 0x63, 0x6f, 0x79, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x10, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x61, 0x73, 0x6b, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, + 0x6f, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6d, 0x61, 0x73, 0x6b, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6f, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, + 0x36, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x76, 0x36, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x34, + 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x76, 0x34, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x66, 0x6c, 0x61, + 0x67, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x3b, 0x0a, 0x0d, + 0x77, 0x65, 0x62, 0x72, 0x74, 0x63, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x57, + 0x65, 0x62, 0x52, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x0c, 0x77, 0x65, 0x62, + 0x72, 0x74, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x64, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, + 0x69, 0x6e, 0x67, 0x22, 0xa8, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x66, 0x6c, 0x75, 0x73, 0x68, 0x41, 0x66, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x61, - 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xc8, - 0x03, 0x0a, 0x0a, 0x43, 0x32, 0x53, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x23, 0x0a, - 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x4c, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, - 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x31, 0x0a, - 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x15, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0c, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, - 0x10, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, - 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x5f, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x44, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x15, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, - 0x24, 0x0a, 0x0e, 0x72, 0x74, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x74, 0x74, 0x54, 0x6f, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x64, 0x65, 0x63, 0x6f, 0x79, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6c, 0x73, - 0x54, 0x6f, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x63, 0x70, 0x5f, 0x74, - 0x6f, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, - 0x63, 0x70, 0x54, 0x6f, 0x44, 0x65, 0x63, 0x6f, 0x79, 0x22, 0x86, 0x02, 0x0a, 0x11, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x1d, 0x0a, 0x0a, 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x49, 0x70, 0x12, 0x1b, - 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4e, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, - 0x63, 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x73, 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x05, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, - 0x75, 0x72, 0x65, 0x2e, 0x49, 0x50, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x99, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x08, 0x69, - 0x70, 0x76, 0x34, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, - 0x64, 0x64, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x22, - 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, - 0x6f, 0x6e, 0x6a, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x3f, 0x0a, - 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xae, - 0x01, 0x0a, 0x0b, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6e, - 0x66, 0x4f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x16, 0x62, 0x69, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x6a, - 0x75, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x62, 0x69, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, - 0x2b, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, - 0x53, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x31, 0x32, 0x38, 0x10, 0x5a, 0x12, 0x0f, 0x0a, 0x0b, 0x41, - 0x45, 0x53, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x5b, 0x2a, 0x29, 0x0a, 0x0c, - 0x44, 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, - 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x07, - 0x0a, 0x03, 0x44, 0x4f, 0x48, 0x10, 0x03, 0x2a, 0xe7, 0x01, 0x0a, 0x0e, 0x43, 0x32, 0x53, 0x5f, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x32, - 0x53, 0x5f, 0x4e, 0x4f, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, - 0x10, 0x43, 0x32, 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x49, - 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x32, 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x0b, - 0x12, 0x18, 0x0a, 0x14, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x5f, 0x52, - 0x45, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x32, - 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, - 0x03, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x32, 0x53, 0x5f, 0x59, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, - 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x32, 0x53, 0x5f, 0x41, - 0x43, 0x51, 0x55, 0x49, 0x52, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x12, - 0x20, 0x0a, 0x1c, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x5f, 0x55, 0x50, - 0x4c, 0x4f, 0x41, 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x4e, 0x10, - 0x06, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xff, - 0x01, 0x2a, 0x98, 0x01, 0x0a, 0x0e, 0x53, 0x32, 0x43, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x32, 0x43, 0x5f, 0x4e, 0x4f, 0x5f, 0x43, - 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x32, 0x43, 0x5f, 0x53, - 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, - 0x17, 0x53, 0x32, 0x43, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x56, - 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x32, - 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x4e, - 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x32, 0x43, 0x5f, 0x53, 0x45, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x09, - 0x53, 0x32, 0x43, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xff, 0x01, 0x2a, 0xac, 0x01, 0x0a, - 0x0e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x53, 0x32, 0x43, 0x12, - 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x11, 0x0a, - 0x0d, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x01, - 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, - 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, - 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x04, - 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x43, 0x4f, 0x59, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x4c, 0x4f, - 0x41, 0x44, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, - 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x65, 0x2a, 0x82, 0x01, 0x0a, 0x0d, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, - 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x69, 0x6e, 0x10, 0x01, - 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x62, 0x66, 0x73, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, - 0x54, 0x4c, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, - 0x04, 0x12, 0x08, 0x0a, 0x04, 0x75, 0x54, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x53, 0x4d, 0x10, - 0x07, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x54, 0x45, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x51, 0x75, - 0x69, 0x63, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x65, 0x62, 0x72, 0x74, 0x63, 0x10, 0x63, - 0x2a, 0x86, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x74, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x10, 0x02, 0x12, - 0x13, 0x0a, 0x0f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x73, 0x63, - 0x61, 0x6e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x50, 0x49, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4e, - 0x53, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x4e, 0x53, 0x10, 0x06, 0x2a, 0x40, 0x0a, 0x11, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, - 0x65, 0x77, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x02, - 0x12, 0x09, 0x0a, 0x05, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x10, 0x03, 0x2a, 0x24, 0x0a, 0x07, 0x49, - 0x50, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x6e, 0x6b, 0x10, 0x00, 0x12, - 0x07, 0x0a, 0x03, 0x54, 0x63, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x64, 0x70, 0x10, - 0x02, + 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x44, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x46, + 0x0a, 0x16, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x61, 0x6e, 0x64, + 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x44, + 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xcb, 0x03, 0x0a, 0x0a, 0x43, 0x32, 0x53, 0x57, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x14, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4d, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, + 0x63, 0x6f, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6f, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x53, 0x0a, 0x15, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x52, 0x65, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x10, 0x52, 0x65, 0x67, 0x52, 0x65, 0x73, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, + 0x64, 0x65, 0x63, 0x6f, 0x79, 0x73, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x63, 0x6f, 0x79, + 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, + 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x74, + 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x21, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x74, 0x74, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x79, + 0x18, 0x26, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x54, 0x6f, 0x44, 0x65, 0x63, + 0x6f, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x63, 0x70, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x63, + 0x6f, 0x79, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x63, 0x70, 0x54, 0x6f, 0x44, + 0x65, 0x63, 0x6f, 0x79, 0x22, 0x88, 0x02, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x6f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x68, + 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x68, 0x61, 0x6e, 0x74, 0x6f, 0x6d, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x4e, 0x73, 0x12, 0x39, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, + 0x72, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x73, + 0x72, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x49, 0x50, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x9a, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x34, + 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x08, 0x69, 0x70, 0x76, 0x34, + 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x69, 0x70, 0x76, 0x36, 0x61, 0x64, 0x64, 0x72, + 0x12, 0x19, 0x0a, 0x08, 0x64, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x07, 0x64, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x61, 0x70, 0x64, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x52, + 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x3f, 0x0a, 0x10, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xaf, 0x01, 0x0a, + 0x0b, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x4f, + 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x16, 0x62, 0x69, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x61, 0x70, 0x64, 0x61, 0x6e, + 0x63, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x15, 0x62, 0x69, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x2b, + 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, + 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x31, 0x32, 0x38, 0x10, 0x5a, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, + 0x53, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x5b, 0x2a, 0x29, 0x0a, 0x0c, 0x44, + 0x6e, 0x73, 0x52, 0x65, 0x67, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x07, 0x0a, 0x03, 0x55, + 0x44, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, + 0x03, 0x44, 0x4f, 0x48, 0x10, 0x03, 0x2a, 0xe7, 0x01, 0x0a, 0x0e, 0x43, 0x32, 0x53, 0x5f, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x32, 0x53, + 0x5f, 0x4e, 0x4f, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, + 0x43, 0x32, 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x49, 0x54, + 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x32, 0x53, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x0b, 0x12, + 0x18, 0x0a, 0x14, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, + 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x32, 0x53, + 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x03, + 0x12, 0x14, 0x0a, 0x10, 0x43, 0x32, 0x53, 0x5f, 0x59, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x50, + 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x32, 0x53, 0x5f, 0x41, 0x43, + 0x51, 0x55, 0x49, 0x52, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x12, 0x20, + 0x0a, 0x1c, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x5f, 0x55, 0x50, 0x4c, + 0x4f, 0x41, 0x44, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x4e, 0x10, 0x06, + 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xff, 0x01, + 0x2a, 0x98, 0x01, 0x0a, 0x0e, 0x53, 0x32, 0x43, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x32, 0x43, 0x5f, 0x4e, 0x4f, 0x5f, 0x43, 0x48, + 0x41, 0x4e, 0x47, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x32, 0x43, 0x5f, 0x53, 0x45, + 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x53, 0x32, 0x43, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x56, 0x45, + 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x32, 0x43, + 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x32, 0x43, 0x5f, 0x53, 0x45, 0x53, 0x53, + 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x53, + 0x32, 0x43, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xff, 0x01, 0x2a, 0xac, 0x01, 0x0a, 0x0e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x53, 0x32, 0x43, 0x12, 0x0c, + 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, + 0x43, 0x4f, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x01, 0x12, + 0x13, 0x0a, 0x0f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x50, + 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x04, 0x12, + 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x43, 0x4f, 0x59, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x4c, 0x4f, 0x41, + 0x44, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, + 0x52, 0x45, 0x41, 0x4d, 0x10, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x65, 0x2a, 0x82, 0x01, 0x0a, 0x0d, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x69, 0x6e, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x4f, 0x62, 0x66, 0x73, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x54, + 0x4c, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x04, + 0x12, 0x08, 0x0a, 0x04, 0x75, 0x54, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x53, 0x4d, 0x10, 0x07, + 0x12, 0x07, 0x0a, 0x03, 0x46, 0x54, 0x45, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x51, 0x75, 0x69, + 0x63, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x65, 0x62, 0x72, 0x74, 0x63, 0x10, 0x63, 0x2a, + 0x86, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x10, 0x02, 0x12, 0x13, + 0x0a, 0x0f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x73, 0x63, 0x61, + 0x6e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x50, 0x49, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4e, 0x53, + 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x69, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x44, 0x4e, 0x53, 0x10, 0x06, 0x2a, 0x40, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x65, + 0x77, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, + 0x09, 0x0a, 0x05, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x10, 0x03, 0x2a, 0x24, 0x0a, 0x07, 0x49, 0x50, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x6e, 0x6b, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x54, 0x63, 0x70, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x64, 0x70, 0x10, 0x02, } var ( @@ -2624,67 +2636,67 @@ func file_signalling_proto_rawDescGZIP() []byte { var file_signalling_proto_enumTypes = make([]protoimpl.EnumInfo, 9) var file_signalling_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_signalling_proto_goTypes = []interface{}{ - (KeyType)(0), // 0: conjure.KeyType - (DnsRegMethod)(0), // 1: conjure.DnsRegMethod - (C2S_Transition)(0), // 2: conjure.C2S_Transition - (S2C_Transition)(0), // 3: conjure.S2C_Transition - (ErrorReasonS2C)(0), // 4: conjure.ErrorReasonS2C - (TransportType)(0), // 5: conjure.TransportType - (RegistrationSource)(0), // 6: conjure.RegistrationSource - (StationOperations)(0), // 7: conjure.StationOperations - (IPProto)(0), // 8: conjure.IPProto - (*PubKey)(nil), // 9: conjure.PubKey - (*TLSDecoySpec)(nil), // 10: conjure.TLSDecoySpec - (*ClientConf)(nil), // 11: conjure.ClientConf - (*DnsRegConf)(nil), // 12: conjure.DnsRegConf - (*DecoyList)(nil), // 13: conjure.DecoyList - (*PhantomSubnetsList)(nil), // 14: conjure.PhantomSubnetsList - (*PhantomSubnets)(nil), // 15: conjure.PhantomSubnets - (*WebRTCICECandidate)(nil), // 16: conjure.WebRTCICECandidate - (*WebRTCSDP)(nil), // 17: conjure.WebRTCSDP - (*WebRTCSignal)(nil), // 18: conjure.WebRTCSignal - (*StationToClient)(nil), // 19: conjure.StationToClient - (*RegistrationFlags)(nil), // 20: conjure.RegistrationFlags - (*ClientToStation)(nil), // 21: conjure.ClientToStation - (*PrefixTransportParams)(nil), // 22: conjure.PrefixTransportParams - (*GenericTransportParams)(nil), // 23: conjure.GenericTransportParams - (*C2SWrapper)(nil), // 24: conjure.C2SWrapper - (*SessionStats)(nil), // 25: conjure.SessionStats - (*StationToDetector)(nil), // 26: conjure.StationToDetector - (*RegistrationResponse)(nil), // 27: conjure.RegistrationResponse - (*DnsResponse)(nil), // 28: conjure.DnsResponse + (KeyType)(0), // 0: tapdance.KeyType + (DnsRegMethod)(0), // 1: tapdance.DnsRegMethod + (C2S_Transition)(0), // 2: tapdance.C2S_Transition + (S2C_Transition)(0), // 3: tapdance.S2C_Transition + (ErrorReasonS2C)(0), // 4: tapdance.ErrorReasonS2C + (TransportType)(0), // 5: tapdance.TransportType + (RegistrationSource)(0), // 6: tapdance.RegistrationSource + (StationOperations)(0), // 7: tapdance.StationOperations + (IPProto)(0), // 8: tapdance.IPProto + (*PubKey)(nil), // 9: tapdance.PubKey + (*TLSDecoySpec)(nil), // 10: tapdance.TLSDecoySpec + (*ClientConf)(nil), // 11: tapdance.ClientConf + (*DnsRegConf)(nil), // 12: tapdance.DnsRegConf + (*DecoyList)(nil), // 13: tapdance.DecoyList + (*PhantomSubnetsList)(nil), // 14: tapdance.PhantomSubnetsList + (*PhantomSubnets)(nil), // 15: tapdance.PhantomSubnets + (*WebRTCICECandidate)(nil), // 16: tapdance.WebRTCICECandidate + (*WebRTCSDP)(nil), // 17: tapdance.WebRTCSDP + (*WebRTCSignal)(nil), // 18: tapdance.WebRTCSignal + (*StationToClient)(nil), // 19: tapdance.StationToClient + (*RegistrationFlags)(nil), // 20: tapdance.RegistrationFlags + (*ClientToStation)(nil), // 21: tapdance.ClientToStation + (*PrefixTransportParams)(nil), // 22: tapdance.PrefixTransportParams + (*GenericTransportParams)(nil), // 23: tapdance.GenericTransportParams + (*C2SWrapper)(nil), // 24: tapdance.C2SWrapper + (*SessionStats)(nil), // 25: tapdance.SessionStats + (*StationToDetector)(nil), // 26: tapdance.StationToDetector + (*RegistrationResponse)(nil), // 27: tapdance.RegistrationResponse + (*DnsResponse)(nil), // 28: tapdance.DnsResponse (*anypb.Any)(nil), // 29: google.protobuf.Any } var file_signalling_proto_depIdxs = []int32{ - 0, // 0: conjure.PubKey.type:type_name -> conjure.KeyType - 9, // 1: conjure.TLSDecoySpec.pubkey:type_name -> conjure.PubKey - 13, // 2: conjure.ClientConf.decoy_list:type_name -> conjure.DecoyList - 9, // 3: conjure.ClientConf.default_pubkey:type_name -> conjure.PubKey - 14, // 4: conjure.ClientConf.phantom_subnets_list:type_name -> conjure.PhantomSubnetsList - 9, // 5: conjure.ClientConf.conjure_pubkey:type_name -> conjure.PubKey - 12, // 6: conjure.ClientConf.dns_reg_conf:type_name -> conjure.DnsRegConf - 1, // 7: conjure.DnsRegConf.dns_reg_method:type_name -> conjure.DnsRegMethod - 10, // 8: conjure.DecoyList.tls_decoys:type_name -> conjure.TLSDecoySpec - 15, // 9: conjure.PhantomSubnetsList.weighted_subnets:type_name -> conjure.PhantomSubnets - 16, // 10: conjure.WebRTCSDP.candidates:type_name -> conjure.WebRTCICECandidate - 17, // 11: conjure.WebRTCSignal.sdp:type_name -> conjure.WebRTCSDP - 3, // 12: conjure.StationToClient.state_transition:type_name -> conjure.S2C_Transition - 11, // 13: conjure.StationToClient.config_info:type_name -> conjure.ClientConf - 4, // 14: conjure.StationToClient.err_reason:type_name -> conjure.ErrorReasonS2C - 2, // 15: conjure.ClientToStation.state_transition:type_name -> conjure.C2S_Transition - 25, // 16: conjure.ClientToStation.stats:type_name -> conjure.SessionStats - 5, // 17: conjure.ClientToStation.transport:type_name -> conjure.TransportType - 29, // 18: conjure.ClientToStation.transport_params:type_name -> google.protobuf.Any - 20, // 19: conjure.ClientToStation.flags:type_name -> conjure.RegistrationFlags - 18, // 20: conjure.ClientToStation.webrtc_signal:type_name -> conjure.WebRTCSignal - 21, // 21: conjure.C2SWrapper.registration_payload:type_name -> conjure.ClientToStation - 6, // 22: conjure.C2SWrapper.registration_source:type_name -> conjure.RegistrationSource - 27, // 23: conjure.C2SWrapper.registration_response:type_name -> conjure.RegistrationResponse - 7, // 24: conjure.StationToDetector.operation:type_name -> conjure.StationOperations - 8, // 25: conjure.StationToDetector.proto:type_name -> conjure.IPProto - 11, // 26: conjure.RegistrationResponse.clientConf:type_name -> conjure.ClientConf - 29, // 27: conjure.RegistrationResponse.transport_params:type_name -> google.protobuf.Any - 27, // 28: conjure.DnsResponse.bidirectional_response:type_name -> conjure.RegistrationResponse + 0, // 0: tapdance.PubKey.type:type_name -> tapdance.KeyType + 9, // 1: tapdance.TLSDecoySpec.pubkey:type_name -> tapdance.PubKey + 13, // 2: tapdance.ClientConf.decoy_list:type_name -> tapdance.DecoyList + 9, // 3: tapdance.ClientConf.default_pubkey:type_name -> tapdance.PubKey + 14, // 4: tapdance.ClientConf.phantom_subnets_list:type_name -> tapdance.PhantomSubnetsList + 9, // 5: tapdance.ClientConf.conjure_pubkey:type_name -> tapdance.PubKey + 12, // 6: tapdance.ClientConf.dns_reg_conf:type_name -> tapdance.DnsRegConf + 1, // 7: tapdance.DnsRegConf.dns_reg_method:type_name -> tapdance.DnsRegMethod + 10, // 8: tapdance.DecoyList.tls_decoys:type_name -> tapdance.TLSDecoySpec + 15, // 9: tapdance.PhantomSubnetsList.weighted_subnets:type_name -> tapdance.PhantomSubnets + 16, // 10: tapdance.WebRTCSDP.candidates:type_name -> tapdance.WebRTCICECandidate + 17, // 11: tapdance.WebRTCSignal.sdp:type_name -> tapdance.WebRTCSDP + 3, // 12: tapdance.StationToClient.state_transition:type_name -> tapdance.S2C_Transition + 11, // 13: tapdance.StationToClient.config_info:type_name -> tapdance.ClientConf + 4, // 14: tapdance.StationToClient.err_reason:type_name -> tapdance.ErrorReasonS2C + 2, // 15: tapdance.ClientToStation.state_transition:type_name -> tapdance.C2S_Transition + 25, // 16: tapdance.ClientToStation.stats:type_name -> tapdance.SessionStats + 5, // 17: tapdance.ClientToStation.transport:type_name -> tapdance.TransportType + 29, // 18: tapdance.ClientToStation.transport_params:type_name -> google.protobuf.Any + 20, // 19: tapdance.ClientToStation.flags:type_name -> tapdance.RegistrationFlags + 18, // 20: tapdance.ClientToStation.webrtc_signal:type_name -> tapdance.WebRTCSignal + 21, // 21: tapdance.C2SWrapper.registration_payload:type_name -> tapdance.ClientToStation + 6, // 22: tapdance.C2SWrapper.registration_source:type_name -> tapdance.RegistrationSource + 27, // 23: tapdance.C2SWrapper.registration_response:type_name -> tapdance.RegistrationResponse + 7, // 24: tapdance.StationToDetector.operation:type_name -> tapdance.StationOperations + 8, // 25: tapdance.StationToDetector.proto:type_name -> tapdance.IPProto + 11, // 26: tapdance.RegistrationResponse.clientConf:type_name -> tapdance.ClientConf + 29, // 27: tapdance.RegistrationResponse.transport_params:type_name -> google.protobuf.Any + 27, // 28: tapdance.DnsResponse.bidirectional_response:type_name -> tapdance.RegistrationResponse 29, // [29:29] is the sub-list for method output_type 29, // [29:29] is the sub-list for method input_type 29, // [29:29] is the sub-list for extension type_name diff --git a/proto/signalling.proto b/proto/signalling.proto index cf3eb415..fb2713ae 100644 --- a/proto/signalling.proto +++ b/proto/signalling.proto @@ -4,7 +4,7 @@ syntax = "proto2"; // At some point we will want to migrate to proto3, but we are not // using any proto3 features yet. -package conjure; +package tapdance; import "google/protobuf/any.proto"; @@ -245,7 +245,7 @@ message ClientToStation { // Indicates whether the client will allow the registrar to provide alternative parameters that // may work better in substitute for the deterministically selected parameters. This only works // for bidirectional registration methods where the client receives a RegistrationResponse. - optional bool allow_registrar_overrides = 6; + optional bool disable_registrar_overrides = 6; // List of decoys that client have unsuccessfully tried in current session. // Could be sent in chunks @@ -292,6 +292,7 @@ message PrefixTransportParams { // Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) // as the station cannot take this into account when attempting to identify a connection. optional bytes prefix = 2; + optional bool flush_after_prefix = 3; // // potential future fields // obfuscator ID diff --git a/proto/signalling.rs b/proto/signalling.rs index 6a5c31b1..c8bc94cd 100644 --- a/proto/signalling.rs +++ b/proto/signalling.rs @@ -26,16 +26,16 @@ const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PubKey) +// @@protoc_insertion_point(message:tapdance.PubKey) pub struct PubKey { // message fields /// A public key, as used by the station. - // @@protoc_insertion_point(field:conjure.PubKey.key) + // @@protoc_insertion_point(field:tapdance.PubKey.key) pub key: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.PubKey.type) + // @@protoc_insertion_point(field:tapdance.PubKey.type) pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:conjure.PubKey.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PubKey.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -86,7 +86,7 @@ impl PubKey { self.key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .conjure.KeyType type = 2; + // optional .tapdance.KeyType type = 2; pub fn type_(&self) -> KeyType { match self.type_ { @@ -225,37 +225,37 @@ impl ::protobuf::reflect::ProtobufValue for PubKey { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.TLSDecoySpec) +// @@protoc_insertion_point(message:tapdance.TLSDecoySpec) pub struct TLSDecoySpec { // message fields /// The hostname/SNI to use for this host /// /// The hostname is the only required field, although other /// fields are expected to be present in most cases. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.hostname) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.hostname) pub hostname: ::std::option::Option<::std::string::String>, /// The 32-bit ipv4 address, in network byte order /// /// If the IPv4 address is absent, then it may be resolved via /// DNS by the client, or the client may discard this decoy spec /// if local DNS is untrusted, or the service may be multihomed. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv4addr) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv6addr) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// The Tapdance station public key to use when contacting this /// decoy /// /// If omitted, the default station public key (if any) is used. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.pubkey) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.pubkey) pub pubkey: ::protobuf::MessageField, /// The maximum duration, in milliseconds, to maintain an open /// connection to this decoy (because the decoy may close the /// connection itself after this length of time) /// /// If omitted, a default of 30,000 milliseconds is assumed. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.timeout) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.timeout) pub timeout: ::std::option::Option, /// The maximum TCP window size to attempt to use for this decoy. /// @@ -264,10 +264,10 @@ pub struct TLSDecoySpec { /// TODO: the default is based on the current heuristic of only /// using decoys that permit windows of 15KB or larger. If this /// heuristic changes, then this default doesn't make sense. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.tcpwin) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.tcpwin) pub tcpwin: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.TLSDecoySpec.special_fields) + // @@protoc_insertion_point(special_field:tapdance.TLSDecoySpec.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -593,23 +593,23 @@ impl ::protobuf::reflect::ProtobufValue for TLSDecoySpec { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.ClientConf) +// @@protoc_insertion_point(message:tapdance.ClientConf) pub struct ClientConf { // message fields - // @@protoc_insertion_point(field:conjure.ClientConf.decoy_list) + // @@protoc_insertion_point(field:tapdance.ClientConf.decoy_list) pub decoy_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.generation) + // @@protoc_insertion_point(field:tapdance.ClientConf.generation) pub generation: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.ClientConf.default_pubkey) + // @@protoc_insertion_point(field:tapdance.ClientConf.default_pubkey) pub default_pubkey: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.phantom_subnets_list) + // @@protoc_insertion_point(field:tapdance.ClientConf.phantom_subnets_list) pub phantom_subnets_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.conjure_pubkey) + // @@protoc_insertion_point(field:tapdance.ClientConf.conjure_pubkey) pub conjure_pubkey: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.dns_reg_conf) + // @@protoc_insertion_point(field:tapdance.ClientConf.dns_reg_conf) pub dns_reg_conf: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:conjure.ClientConf.special_fields) + // @@protoc_insertion_point(special_field:tapdance.ClientConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -855,23 +855,23 @@ impl ::protobuf::reflect::ProtobufValue for ClientConf { /// Configuration for DNS registrar #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.DnsRegConf) +// @@protoc_insertion_point(message:tapdance.DnsRegConf) pub struct DnsRegConf { // message fields - // @@protoc_insertion_point(field:conjure.DnsRegConf.dns_reg_method) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.dns_reg_method) pub dns_reg_method: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.target) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.target) pub target: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.domain) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.domain) pub domain: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.pubkey) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.pubkey) pub pubkey: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.utls_distribution) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.utls_distribution) pub utls_distribution: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.stun_server) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.stun_server) pub stun_server: ::std::option::Option<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:conjure.DnsRegConf.special_fields) + // @@protoc_insertion_point(special_field:tapdance.DnsRegConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -886,7 +886,7 @@ impl DnsRegConf { ::std::default::Default::default() } - // required .conjure.DnsRegMethod dns_reg_method = 1; + // required .tapdance.DnsRegMethod dns_reg_method = 1; pub fn dns_reg_method(&self) -> DnsRegMethod { match self.dns_reg_method { @@ -1275,13 +1275,13 @@ impl ::protobuf::reflect::ProtobufValue for DnsRegConf { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.DecoyList) +// @@protoc_insertion_point(message:tapdance.DecoyList) pub struct DecoyList { // message fields - // @@protoc_insertion_point(field:conjure.DecoyList.tls_decoys) + // @@protoc_insertion_point(field:tapdance.DecoyList.tls_decoys) pub tls_decoys: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:conjure.DecoyList.special_fields) + // @@protoc_insertion_point(special_field:tapdance.DecoyList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1398,13 +1398,13 @@ impl ::protobuf::reflect::ProtobufValue for DecoyList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PhantomSubnetsList) +// @@protoc_insertion_point(message:tapdance.PhantomSubnetsList) pub struct PhantomSubnetsList { // message fields - // @@protoc_insertion_point(field:conjure.PhantomSubnetsList.weighted_subnets) + // @@protoc_insertion_point(field:tapdance.PhantomSubnetsList.weighted_subnets) pub weighted_subnets: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:conjure.PhantomSubnetsList.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PhantomSubnetsList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1521,15 +1521,15 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnetsList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PhantomSubnets) +// @@protoc_insertion_point(message:tapdance.PhantomSubnets) pub struct PhantomSubnets { // message fields - // @@protoc_insertion_point(field:conjure.PhantomSubnets.weight) + // @@protoc_insertion_point(field:tapdance.PhantomSubnets.weight) pub weight: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.PhantomSubnets.subnets) + // @@protoc_insertion_point(field:tapdance.PhantomSubnets.subnets) pub subnets: ::std::vec::Vec<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:conjure.PhantomSubnets.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PhantomSubnets.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1681,19 +1681,19 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnets { /// Deflated ICE Candidate by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.WebRTCICECandidate) +// @@protoc_insertion_point(message:tapdance.WebRTCICECandidate) pub struct WebRTCICECandidate { // message fields /// IP is represented in its 16-byte form - // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_upper) + // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_upper) pub ip_upper: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_lower) + // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_lower) pub ip_lower: ::std::option::Option, /// Composed info includes port, tcptype (unset if not tcp), candidate type (host, srflx, prflx), protocol (TCP/UDP), and component (RTP/RTCP) - // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.composed_info) + // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.composed_info) pub composed_info: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.WebRTCICECandidate.special_fields) + // @@protoc_insertion_point(special_field:tapdance.WebRTCICECandidate.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1908,15 +1908,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCICECandidate { /// Deflated SDP for WebRTC by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.WebRTCSDP) +// @@protoc_insertion_point(message:tapdance.WebRTCSDP) pub struct WebRTCSDP { // message fields - // @@protoc_insertion_point(field:conjure.WebRTCSDP.type) + // @@protoc_insertion_point(field:tapdance.WebRTCSDP.type) pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.WebRTCSDP.candidates) + // @@protoc_insertion_point(field:tapdance.WebRTCSDP.candidates) pub candidates: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:conjure.WebRTCSDP.special_fields) + // @@protoc_insertion_point(special_field:tapdance.WebRTCSDP.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2077,15 +2077,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSDP { /// WebRTCSignal includes a deflated SDP and a seed #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.WebRTCSignal) +// @@protoc_insertion_point(message:tapdance.WebRTCSignal) pub struct WebRTCSignal { // message fields - // @@protoc_insertion_point(field:conjure.WebRTCSignal.seed) + // @@protoc_insertion_point(field:tapdance.WebRTCSignal.seed) pub seed: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.WebRTCSignal.sdp) + // @@protoc_insertion_point(field:tapdance.WebRTCSignal.sdp) pub sdp: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:conjure.WebRTCSignal.special_fields) + // @@protoc_insertion_point(special_field:tapdance.WebRTCSignal.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2265,34 +2265,34 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSignal { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.StationToClient) +// @@protoc_insertion_point(message:tapdance.StationToClient) pub struct StationToClient { // message fields /// Should accompany (at least) SESSION_INIT and CONFIRM_RECONNECT. - // @@protoc_insertion_point(field:conjure.StationToClient.protocol_version) + // @@protoc_insertion_point(field:tapdance.StationToClient.protocol_version) pub protocol_version: ::std::option::Option, /// There might be a state transition. May be absent; absence should be /// treated identically to NO_CHANGE. - // @@protoc_insertion_point(field:conjure.StationToClient.state_transition) + // @@protoc_insertion_point(field:tapdance.StationToClient.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The station can send client config info piggybacked /// on any message, as it sees fit - // @@protoc_insertion_point(field:conjure.StationToClient.config_info) + // @@protoc_insertion_point(field:tapdance.StationToClient.config_info) pub config_info: ::protobuf::MessageField, /// If state_transition == S2C_ERROR, this field is the explanation. - // @@protoc_insertion_point(field:conjure.StationToClient.err_reason) + // @@protoc_insertion_point(field:tapdance.StationToClient.err_reason) pub err_reason: ::std::option::Option<::protobuf::EnumOrUnknown>, /// Signals client to stop connecting for following amount of seconds - // @@protoc_insertion_point(field:conjure.StationToClient.tmp_backoff) + // @@protoc_insertion_point(field:tapdance.StationToClient.tmp_backoff) pub tmp_backoff: ::std::option::Option, /// Sent in SESSION_INIT, identifies the station that picked up - // @@protoc_insertion_point(field:conjure.StationToClient.station_id) + // @@protoc_insertion_point(field:tapdance.StationToClient.station_id) pub station_id: ::std::option::Option<::std::string::String>, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:conjure.StationToClient.padding) + // @@protoc_insertion_point(field:tapdance.StationToClient.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:conjure.StationToClient.special_fields) + // @@protoc_insertion_point(special_field:tapdance.StationToClient.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2326,7 +2326,7 @@ impl StationToClient { self.protocol_version = ::std::option::Option::Some(v); } - // optional .conjure.S2C_Transition state_transition = 2; + // optional .tapdance.S2C_Transition state_transition = 2; pub fn state_transition(&self) -> S2C_Transition { match self.state_transition { @@ -2348,7 +2348,7 @@ impl StationToClient { self.state_transition = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } - // optional .conjure.ErrorReasonS2C err_reason = 4; + // optional .tapdance.ErrorReasonS2C err_reason = 4; pub fn err_reason(&self) -> ErrorReasonS2C { match self.err_reason { @@ -2664,21 +2664,21 @@ impl ::protobuf::reflect::ProtobufValue for StationToClient { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.RegistrationFlags) +// @@protoc_insertion_point(message:tapdance.RegistrationFlags) pub struct RegistrationFlags { // message fields - // @@protoc_insertion_point(field:conjure.RegistrationFlags.upload_only) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.upload_only) pub upload_only: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.dark_decoy) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.dark_decoy) pub dark_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.proxy_header) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.proxy_header) pub proxy_header: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.use_TIL) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.use_TIL) pub use_TIL: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.prescanned) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.prescanned) pub prescanned: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.RegistrationFlags.special_fields) + // @@protoc_insertion_point(special_field:tapdance.RegistrationFlags.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2953,41 +2953,41 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationFlags { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.ClientToStation) +// @@protoc_insertion_point(message:tapdance.ClientToStation) pub struct ClientToStation { // message fields - // @@protoc_insertion_point(field:conjure.ClientToStation.protocol_version) + // @@protoc_insertion_point(field:tapdance.ClientToStation.protocol_version) pub protocol_version: ::std::option::Option, /// The client reports its decoy list's version number here, which the /// station can use to decide whether to send an updated one. The station /// should always send a list if this field is set to 0. - // @@protoc_insertion_point(field:conjure.ClientToStation.decoy_list_generation) + // @@protoc_insertion_point(field:tapdance.ClientToStation.decoy_list_generation) pub decoy_list_generation: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.ClientToStation.state_transition) + // @@protoc_insertion_point(field:tapdance.ClientToStation.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The position in the overall session's upload sequence where the current /// YIELD=>ACQUIRE switchover is happening. - // @@protoc_insertion_point(field:conjure.ClientToStation.upload_sync) + // @@protoc_insertion_point(field:tapdance.ClientToStation.upload_sync) pub upload_sync: ::std::option::Option, /// High level client library version used for indicating feature support, or /// lack therof. - // @@protoc_insertion_point(field:conjure.ClientToStation.client_lib_version) + // @@protoc_insertion_point(field:tapdance.ClientToStation.client_lib_version) pub client_lib_version: ::std::option::Option, /// Indicates whether the client will allow the registrar to provide alternative parameters that /// may work better in substitute for the deterministically selected parameters. This only works /// for bidirectional registration methods where the client receives a RegistrationResponse. - // @@protoc_insertion_point(field:conjure.ClientToStation.allow_registrar_overrides) - pub allow_registrar_overrides: ::std::option::Option, + // @@protoc_insertion_point(field:tapdance.ClientToStation.disable_registrar_overrides) + pub disable_registrar_overrides: ::std::option::Option, /// List of decoys that client have unsuccessfully tried in current session. /// Could be sent in chunks - // @@protoc_insertion_point(field:conjure.ClientToStation.failed_decoys) + // @@protoc_insertion_point(field:tapdance.ClientToStation.failed_decoys) pub failed_decoys: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:conjure.ClientToStation.stats) + // @@protoc_insertion_point(field:tapdance.ClientToStation.stats) pub stats: ::protobuf::MessageField, /// NullTransport, MinTransport, Obfs4Transport, etc. Transport type we want from phantom proxy - // @@protoc_insertion_point(field:conjure.ClientToStation.transport) + // @@protoc_insertion_point(field:tapdance.ClientToStation.transport) pub transport: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:conjure.ClientToStation.transport_params) + // @@protoc_insertion_point(field:tapdance.ClientToStation.transport_params) pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, /// Station is only required to check this variable during session initialization. /// If set, station must facilitate connection to said target by itself, i.e. write into squid @@ -2995,28 +2995,28 @@ pub struct ClientToStation { /// covert_address must have exactly one ':' colon, that separates host (literal IP address or /// resolvable hostname) and port /// TODO: make it required for initialization, and stop connecting any client straight to squid? - // @@protoc_insertion_point(field:conjure.ClientToStation.covert_address) + // @@protoc_insertion_point(field:tapdance.ClientToStation.covert_address) pub covert_address: ::std::option::Option<::std::string::String>, /// Used in dark decoys to signal which dark decoy it will connect to. - // @@protoc_insertion_point(field:conjure.ClientToStation.masked_decoy_server_name) + // @@protoc_insertion_point(field:tapdance.ClientToStation.masked_decoy_server_name) pub masked_decoy_server_name: ::std::option::Option<::std::string::String>, /// Used to indicate to server if client is registering v4, v6 or both - // @@protoc_insertion_point(field:conjure.ClientToStation.v6_support) + // @@protoc_insertion_point(field:tapdance.ClientToStation.v6_support) pub v6_support: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.ClientToStation.v4_support) + // @@protoc_insertion_point(field:tapdance.ClientToStation.v4_support) pub v4_support: ::std::option::Option, /// A collection of optional flags for the registration. - // @@protoc_insertion_point(field:conjure.ClientToStation.flags) + // @@protoc_insertion_point(field:tapdance.ClientToStation.flags) pub flags: ::protobuf::MessageField, /// Transport Extensions /// TODO(jmwample) - move to WebRTC specific transport params protobuf message. - // @@protoc_insertion_point(field:conjure.ClientToStation.webrtc_signal) + // @@protoc_insertion_point(field:tapdance.ClientToStation.webrtc_signal) pub webrtc_signal: ::protobuf::MessageField, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:conjure.ClientToStation.padding) + // @@protoc_insertion_point(field:tapdance.ClientToStation.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:conjure.ClientToStation.special_fields) + // @@protoc_insertion_point(special_field:tapdance.ClientToStation.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3069,7 +3069,7 @@ impl ClientToStation { self.decoy_list_generation = ::std::option::Option::Some(v); } - // optional .conjure.C2S_Transition state_transition = 3; + // optional .tapdance.C2S_Transition state_transition = 3; pub fn state_transition(&self) -> C2S_Transition { match self.state_transition { @@ -3129,26 +3129,26 @@ impl ClientToStation { self.client_lib_version = ::std::option::Option::Some(v); } - // optional bool allow_registrar_overrides = 6; + // optional bool disable_registrar_overrides = 6; - pub fn allow_registrar_overrides(&self) -> bool { - self.allow_registrar_overrides.unwrap_or(false) + pub fn disable_registrar_overrides(&self) -> bool { + self.disable_registrar_overrides.unwrap_or(false) } - pub fn clear_allow_registrar_overrides(&mut self) { - self.allow_registrar_overrides = ::std::option::Option::None; + pub fn clear_disable_registrar_overrides(&mut self) { + self.disable_registrar_overrides = ::std::option::Option::None; } - pub fn has_allow_registrar_overrides(&self) -> bool { - self.allow_registrar_overrides.is_some() + pub fn has_disable_registrar_overrides(&self) -> bool { + self.disable_registrar_overrides.is_some() } // Param is passed by value, moved - pub fn set_allow_registrar_overrides(&mut self, v: bool) { - self.allow_registrar_overrides = ::std::option::Option::Some(v); + pub fn set_disable_registrar_overrides(&mut self, v: bool) { + self.disable_registrar_overrides = ::std::option::Option::Some(v); } - // optional .conjure.TransportType transport = 12; + // optional .tapdance.TransportType transport = 12; pub fn transport(&self) -> TransportType { match self.transport { @@ -3345,9 +3345,9 @@ impl ClientToStation { |m: &mut ClientToStation| { &mut m.client_lib_version }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "allow_registrar_overrides", - |m: &ClientToStation| { &m.allow_registrar_overrides }, - |m: &mut ClientToStation| { &mut m.allow_registrar_overrides }, + "disable_registrar_overrides", + |m: &ClientToStation| { &m.disable_registrar_overrides }, + |m: &mut ClientToStation| { &mut m.disable_registrar_overrides }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "failed_decoys", @@ -3458,7 +3458,7 @@ impl ::protobuf::Message for ClientToStation { self.client_lib_version = ::std::option::Option::Some(is.read_uint32()?); }, 48 => { - self.allow_registrar_overrides = ::std::option::Option::Some(is.read_bool()?); + self.disable_registrar_overrides = ::std::option::Option::Some(is.read_bool()?); }, 82 => { self.failed_decoys.push(is.read_string()?); @@ -3520,7 +3520,7 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { my_size += ::protobuf::rt::uint32_size(5, v); } - if let Some(v) = self.allow_registrar_overrides { + if let Some(v) = self.disable_registrar_overrides { my_size += 1 + 1; } for value in &self.failed_decoys { @@ -3581,7 +3581,7 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { os.write_uint32(5, v)?; } - if let Some(v) = self.allow_registrar_overrides { + if let Some(v) = self.disable_registrar_overrides { os.write_bool(6, v)?; } for v in &self.failed_decoys { @@ -3639,7 +3639,7 @@ impl ::protobuf::Message for ClientToStation { self.state_transition = ::std::option::Option::None; self.upload_sync = ::std::option::Option::None; self.client_lib_version = ::std::option::Option::None; - self.allow_registrar_overrides = ::std::option::Option::None; + self.disable_registrar_overrides = ::std::option::Option::None; self.failed_decoys.clear(); self.stats.clear(); self.transport = ::std::option::Option::None; @@ -3661,7 +3661,7 @@ impl ::protobuf::Message for ClientToStation { state_transition: ::std::option::Option::None, upload_sync: ::std::option::Option::None, client_lib_version: ::std::option::Option::None, - allow_registrar_overrides: ::std::option::Option::None, + disable_registrar_overrides: ::std::option::Option::None, failed_decoys: ::std::vec::Vec::new(), stats: ::protobuf::MessageField::none(), transport: ::std::option::Option::None, @@ -3697,23 +3697,25 @@ impl ::protobuf::reflect::ProtobufValue for ClientToStation { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PrefixTransportParams) +// @@protoc_insertion_point(message:tapdance.PrefixTransportParams) pub struct PrefixTransportParams { // message fields /// Prefix Identifier - // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix_id) + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.prefix_id) pub prefix_id: ::std::option::Option, /// Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) /// as the station cannot take this into account when attempting to identify a connection. - // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix) + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.prefix) pub prefix: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.flush_after_prefix) + pub flush_after_prefix: ::std::option::Option, /// Indicates whether the client has elected to use destination port randomization. Should be /// checked against selected transport to ensure that destination port randomization is /// supported. - // @@protoc_insertion_point(field:conjure.PrefixTransportParams.randomize_dst_port) + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.randomize_dst_port) pub randomize_dst_port: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.PrefixTransportParams.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PrefixTransportParams.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3783,6 +3785,25 @@ impl PrefixTransportParams { self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new()) } + // optional bool flush_after_prefix = 3; + + pub fn flush_after_prefix(&self) -> bool { + self.flush_after_prefix.unwrap_or(false) + } + + pub fn clear_flush_after_prefix(&mut self) { + self.flush_after_prefix = ::std::option::Option::None; + } + + pub fn has_flush_after_prefix(&self) -> bool { + self.flush_after_prefix.is_some() + } + + // Param is passed by value, moved + pub fn set_flush_after_prefix(&mut self, v: bool) { + self.flush_after_prefix = ::std::option::Option::Some(v); + } + // optional bool randomize_dst_port = 13; pub fn randomize_dst_port(&self) -> bool { @@ -3803,7 +3824,7 @@ impl PrefixTransportParams { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); + let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "prefix_id", @@ -3815,6 +3836,11 @@ impl PrefixTransportParams { |m: &PrefixTransportParams| { &m.prefix }, |m: &mut PrefixTransportParams| { &mut m.prefix }, )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "flush_after_prefix", + |m: &PrefixTransportParams| { &m.flush_after_prefix }, + |m: &mut PrefixTransportParams| { &mut m.flush_after_prefix }, + )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "randomize_dst_port", |m: &PrefixTransportParams| { &m.randomize_dst_port }, @@ -3844,6 +3870,9 @@ impl ::protobuf::Message for PrefixTransportParams { 18 => { self.prefix = ::std::option::Option::Some(is.read_bytes()?); }, + 24 => { + self.flush_after_prefix = ::std::option::Option::Some(is.read_bool()?); + }, 104 => { self.randomize_dst_port = ::std::option::Option::Some(is.read_bool()?); }, @@ -3865,6 +3894,9 @@ impl ::protobuf::Message for PrefixTransportParams { if let Some(v) = self.prefix.as_ref() { my_size += ::protobuf::rt::bytes_size(2, &v); } + if let Some(v) = self.flush_after_prefix { + my_size += 1 + 1; + } if let Some(v) = self.randomize_dst_port { my_size += 1 + 1; } @@ -3880,6 +3912,9 @@ impl ::protobuf::Message for PrefixTransportParams { if let Some(v) = self.prefix.as_ref() { os.write_bytes(2, v)?; } + if let Some(v) = self.flush_after_prefix { + os.write_bool(3, v)?; + } if let Some(v) = self.randomize_dst_port { os.write_bool(13, v)?; } @@ -3902,6 +3937,7 @@ impl ::protobuf::Message for PrefixTransportParams { fn clear(&mut self) { self.prefix_id = ::std::option::Option::None; self.prefix = ::std::option::Option::None; + self.flush_after_prefix = ::std::option::Option::None; self.randomize_dst_port = ::std::option::Option::None; self.special_fields.clear(); } @@ -3910,6 +3946,7 @@ impl ::protobuf::Message for PrefixTransportParams { static instance: PrefixTransportParams = PrefixTransportParams { prefix_id: ::std::option::Option::None, prefix: ::std::option::Option::None, + flush_after_prefix: ::std::option::Option::None, randomize_dst_port: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; @@ -3935,16 +3972,16 @@ impl ::protobuf::reflect::ProtobufValue for PrefixTransportParams { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.GenericTransportParams) +// @@protoc_insertion_point(message:tapdance.GenericTransportParams) pub struct GenericTransportParams { // message fields /// Indicates whether the client has elected to use destination port randomization. Should be /// checked against selected transport to ensure that destination port randomization is /// supported. - // @@protoc_insertion_point(field:conjure.GenericTransportParams.randomize_dst_port) + // @@protoc_insertion_point(field:tapdance.GenericTransportParams.randomize_dst_port) pub randomize_dst_port: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.GenericTransportParams.special_fields) + // @@protoc_insertion_point(special_field:tapdance.GenericTransportParams.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4079,20 +4116,20 @@ impl ::protobuf::reflect::ProtobufValue for GenericTransportParams { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.C2SWrapper) +// @@protoc_insertion_point(message:tapdance.C2SWrapper) pub struct C2SWrapper { // message fields - // @@protoc_insertion_point(field:conjure.C2SWrapper.shared_secret) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.shared_secret) pub shared_secret: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_payload) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_payload) pub registration_payload: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_source) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_source) pub registration_source: ::std::option::Option<::protobuf::EnumOrUnknown>, /// client source address when receiving a registration - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_address) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_address) pub registration_address: ::std::option::Option<::std::vec::Vec>, /// Decoy address used when registering over Decoy registrar - // @@protoc_insertion_point(field:conjure.C2SWrapper.decoy_address) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.decoy_address) pub decoy_address: ::std::option::Option<::std::vec::Vec>, /// The next three fields allow an independent registrar (trusted by a station w/ a zmq keypair) to /// share the registration overrides that it assigned to the client with the station(s). @@ -4104,14 +4141,14 @@ pub struct C2SWrapper { /// If you are reading this in the future and you want to extend the functionality here it might /// make sense to make the RegistrationResponse that is sent to the client a distinct message from /// the one that gets sent to the stations. - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_response) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_response) pub registration_response: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespBytes) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.RegRespBytes) pub RegRespBytes: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespSignature) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.RegRespSignature) pub RegRespSignature: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:conjure.C2SWrapper.special_fields) + // @@protoc_insertion_point(special_field:tapdance.C2SWrapper.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4162,7 +4199,7 @@ impl C2SWrapper { self.shared_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .conjure.RegistrationSource registration_source = 4; + // optional .tapdance.RegistrationSource registration_source = 4; pub fn registration_source(&self) -> RegistrationSource { match self.registration_source { @@ -4553,23 +4590,23 @@ impl ::protobuf::reflect::ProtobufValue for C2SWrapper { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.SessionStats) +// @@protoc_insertion_point(message:tapdance.SessionStats) pub struct SessionStats { // message fields - // @@protoc_insertion_point(field:conjure.SessionStats.failed_decoys_amount) + // @@protoc_insertion_point(field:tapdance.SessionStats.failed_decoys_amount) pub failed_decoys_amount: ::std::option::Option, /// Applicable to whole session: - // @@protoc_insertion_point(field:conjure.SessionStats.total_time_to_connect) + // @@protoc_insertion_point(field:tapdance.SessionStats.total_time_to_connect) pub total_time_to_connect: ::std::option::Option, /// Last (i.e. successful) decoy: - // @@protoc_insertion_point(field:conjure.SessionStats.rtt_to_station) + // @@protoc_insertion_point(field:tapdance.SessionStats.rtt_to_station) pub rtt_to_station: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.SessionStats.tls_to_decoy) + // @@protoc_insertion_point(field:tapdance.SessionStats.tls_to_decoy) pub tls_to_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.SessionStats.tcp_to_decoy) + // @@protoc_insertion_point(field:tapdance.SessionStats.tcp_to_decoy) pub tcp_to_decoy: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.SessionStats.special_fields) + // @@protoc_insertion_point(special_field:tapdance.SessionStats.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4844,25 +4881,25 @@ impl ::protobuf::reflect::ProtobufValue for SessionStats { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.StationToDetector) +// @@protoc_insertion_point(message:tapdance.StationToDetector) pub struct StationToDetector { // message fields - // @@protoc_insertion_point(field:conjure.StationToDetector.phantom_ip) + // @@protoc_insertion_point(field:tapdance.StationToDetector.phantom_ip) pub phantom_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.StationToDetector.client_ip) + // @@protoc_insertion_point(field:tapdance.StationToDetector.client_ip) pub client_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.StationToDetector.timeout_ns) + // @@protoc_insertion_point(field:tapdance.StationToDetector.timeout_ns) pub timeout_ns: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.StationToDetector.operation) + // @@protoc_insertion_point(field:tapdance.StationToDetector.operation) pub operation: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:conjure.StationToDetector.dst_port) + // @@protoc_insertion_point(field:tapdance.StationToDetector.dst_port) pub dst_port: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.StationToDetector.src_port) + // @@protoc_insertion_point(field:tapdance.StationToDetector.src_port) pub src_port: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.StationToDetector.proto) + // @@protoc_insertion_point(field:tapdance.StationToDetector.proto) pub proto: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:conjure.StationToDetector.special_fields) + // @@protoc_insertion_point(special_field:tapdance.StationToDetector.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4968,7 +5005,7 @@ impl StationToDetector { self.timeout_ns = ::std::option::Option::Some(v); } - // optional .conjure.StationOperations operation = 4; + // optional .tapdance.StationOperations operation = 4; pub fn operation(&self) -> StationOperations { match self.operation { @@ -5028,7 +5065,7 @@ impl StationToDetector { self.src_port = ::std::option::Option::Some(v); } - // optional .conjure.IPProto proto = 12; + // optional .tapdance.IPProto proto = 12; pub fn proto(&self) -> IPProto { match self.proto { @@ -5248,32 +5285,32 @@ impl ::protobuf::reflect::ProtobufValue for StationToDetector { /// Adding message response from Station to Client for bidirectional API #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.RegistrationResponse) +// @@protoc_insertion_point(message:tapdance.RegistrationResponse) pub struct RegistrationResponse { // message fields - // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv4addr) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv6addr) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// Respond with randomized port - // @@protoc_insertion_point(field:conjure.RegistrationResponse.dst_port) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.dst_port) pub dst_port: ::std::option::Option, /// Future: station provides client with secret, want chanel present /// Leave null for now - // @@protoc_insertion_point(field:conjure.RegistrationResponse.serverRandom) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.serverRandom) pub serverRandom: ::std::option::Option<::std::vec::Vec>, /// If registration wrong, populate this error string - // @@protoc_insertion_point(field:conjure.RegistrationResponse.error) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.error) pub error: ::std::option::Option<::std::string::String>, /// ClientConf field (optional) - // @@protoc_insertion_point(field:conjure.RegistrationResponse.clientConf) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.clientConf) pub clientConf: ::protobuf::MessageField, /// Transport Params to if `allow_registrar_overrides` is set. - // @@protoc_insertion_point(field:conjure.RegistrationResponse.transport_params) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.transport_params) pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, // special fields - // @@protoc_insertion_point(special_field:conjure.RegistrationResponse.special_fields) + // @@protoc_insertion_point(special_field:tapdance.RegistrationResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5644,17 +5681,17 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationResponse { /// response from dns #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.DnsResponse) +// @@protoc_insertion_point(message:tapdance.DnsResponse) pub struct DnsResponse { // message fields - // @@protoc_insertion_point(field:conjure.DnsResponse.success) + // @@protoc_insertion_point(field:tapdance.DnsResponse.success) pub success: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.DnsResponse.clientconf_outdated) + // @@protoc_insertion_point(field:tapdance.DnsResponse.clientconf_outdated) pub clientconf_outdated: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.DnsResponse.bidirectional_response) + // @@protoc_insertion_point(field:tapdance.DnsResponse.bidirectional_response) pub bidirectional_response: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:conjure.DnsResponse.special_fields) + // @@protoc_insertion_point(special_field:tapdance.DnsResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5846,11 +5883,11 @@ impl ::protobuf::reflect::ProtobufValue for DnsResponse { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.KeyType) +// @@protoc_insertion_point(enum:tapdance.KeyType) pub enum KeyType { - // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_128) + // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_128) AES_GCM_128 = 90, - // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_256) + // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_256) AES_GCM_256 = 91, } @@ -5904,13 +5941,13 @@ impl KeyType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.DnsRegMethod) +// @@protoc_insertion_point(enum:tapdance.DnsRegMethod) pub enum DnsRegMethod { - // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.UDP) + // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.UDP) UDP = 1, - // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOT) + // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOT) DOT = 2, - // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOH) + // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOH) DOH = 3, } @@ -5968,25 +6005,25 @@ impl DnsRegMethod { /// State transitions of the client #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.C2S_Transition) +// @@protoc_insertion_point(enum:tapdance.C2S_Transition) pub enum C2S_Transition { - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_NO_CHANGE) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_NO_CHANGE) C2S_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_INIT) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_INIT) C2S_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_COVERT_INIT) C2S_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_RECONNECT) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_RECONNECT) C2S_EXPECT_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_CLOSE) C2S_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_YIELD_UPLOAD) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_YIELD_UPLOAD) C2S_YIELD_UPLOAD = 4, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ACQUIRE_UPLOAD) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ACQUIRE_UPLOAD) C2S_ACQUIRE_UPLOAD = 5, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) C2S_EXPECT_UPLOADONLY_RECONN = 6, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ERROR) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ERROR) C2S_ERROR = 255, } @@ -6061,19 +6098,19 @@ impl C2S_Transition { /// State transitions of the server #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.S2C_Transition) +// @@protoc_insertion_point(enum:tapdance.S2C_Transition) pub enum S2C_Transition { - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_NO_CHANGE) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_NO_CHANGE) S2C_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_INIT) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_INIT) S2C_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_COVERT_INIT) S2C_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_CONFIRM_RECONNECT) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_CONFIRM_RECONNECT) S2C_CONFIRM_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_CLOSE) S2C_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_ERROR) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_ERROR) S2C_ERROR = 255, } @@ -6139,23 +6176,23 @@ impl S2C_Transition { /// Should accompany all S2C_ERROR messages. #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.ErrorReasonS2C) +// @@protoc_insertion_point(enum:tapdance.ErrorReasonS2C) pub enum ErrorReasonS2C { - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.NO_ERROR) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.NO_ERROR) NO_ERROR = 0, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.COVERT_STREAM) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.COVERT_STREAM) COVERT_STREAM = 1, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_REPORTED) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_REPORTED) CLIENT_REPORTED = 2, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_PROTOCOL) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_PROTOCOL) CLIENT_PROTOCOL = 3, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.STATION_INTERNAL) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.STATION_INTERNAL) STATION_INTERNAL = 4, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.DECOY_OVERLOAD) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.DECOY_OVERLOAD) DECOY_OVERLOAD = 5, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_STREAM) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_STREAM) CLIENT_STREAM = 100, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_TIMEOUT) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_TIMEOUT) CLIENT_TIMEOUT = 101, } @@ -6226,29 +6263,29 @@ impl ErrorReasonS2C { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.TransportType) +// @@protoc_insertion_point(enum:tapdance.TransportType) pub enum TransportType { - // @@protoc_insertion_point(enum_value:conjure.TransportType.Null) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Null) Null = 0, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Min) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Min) Min = 1, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Obfs4) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Obfs4) Obfs4 = 2, - // @@protoc_insertion_point(enum_value:conjure.TransportType.DTLS) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.DTLS) DTLS = 3, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Prefix) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Prefix) Prefix = 4, - // @@protoc_insertion_point(enum_value:conjure.TransportType.uTLS) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.uTLS) uTLS = 5, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Format) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Format) Format = 6, - // @@protoc_insertion_point(enum_value:conjure.TransportType.WASM) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.WASM) WASM = 7, - // @@protoc_insertion_point(enum_value:conjure.TransportType.FTE) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.FTE) FTE = 8, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Quic) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Quic) Quic = 9, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Webrtc) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Webrtc) Webrtc = 99, } @@ -6328,21 +6365,21 @@ impl TransportType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.RegistrationSource) +// @@protoc_insertion_point(enum:tapdance.RegistrationSource) pub enum RegistrationSource { - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Unspecified) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Unspecified) Unspecified = 0, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Detector) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Detector) Detector = 1, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.API) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.API) API = 2, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DetectorPrescan) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DetectorPrescan) DetectorPrescan = 3, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalAPI) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalAPI) BidirectionalAPI = 4, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DNS) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DNS) DNS = 5, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalDNS) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalDNS) BidirectionalDNS = 6, } @@ -6402,15 +6439,15 @@ impl RegistrationSource { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.StationOperations) +// @@protoc_insertion_point(enum:tapdance.StationOperations) pub enum StationOperations { - // @@protoc_insertion_point(enum_value:conjure.StationOperations.Unknown) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Unknown) Unknown = 0, - // @@protoc_insertion_point(enum_value:conjure.StationOperations.New) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.New) New = 1, - // @@protoc_insertion_point(enum_value:conjure.StationOperations.Update) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Update) Update = 2, - // @@protoc_insertion_point(enum_value:conjure.StationOperations.Clear) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Clear) Clear = 3, } @@ -6464,13 +6501,13 @@ impl StationOperations { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.IPProto) +// @@protoc_insertion_point(enum:tapdance.IPProto) pub enum IPProto { - // @@protoc_insertion_point(enum_value:conjure.IPProto.Unk) + // @@protoc_insertion_point(enum_value:tapdance.IPProto.Unk) Unk = 0, - // @@protoc_insertion_point(enum_value:conjure.IPProto.Tcp) + // @@protoc_insertion_point(enum_value:tapdance.IPProto.Tcp) Tcp = 1, - // @@protoc_insertion_point(enum_value:conjure.IPProto.Udp) + // @@protoc_insertion_point(enum_value:tapdance.IPProto.Udp) Udp = 2, } @@ -6522,240 +6559,241 @@ impl IPProto { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10signalling.proto\x12\x07conjure\x1a\x19google/protobuf/any.proto\"\ - @\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12$\n\x04ty\ - pe\x18\x02\x20\x01(\x0e2\x10.conjure.KeyTypeR\x04type\"\xbd\x01\n\x0cTLS\ - DecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\x1a\ - \n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\ - \x18\x06\x20\x01(\x0cR\x08ipv6addr\x12'\n\x06pubkey\x18\x03\x20\x01(\x0b\ - 2\x0f.conjure.PubKeyR\x06pubkey\x12\x18\n\x07timeout\x18\x04\x20\x01(\rR\ - \x07timeout\x12\x16\n\x06tcpwin\x18\x05\x20\x01(\rR\x06tcpwin\"\xd5\x02\ - \n\nClientConf\x121\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x12.conjure.Deco\ - yListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\ngeneration\ - \x126\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x0f.conjure.PubKeyR\rdef\ - aultPubkey\x12M\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\x1b.conj\ - ure.PhantomSubnetsListR\x12phantomSubnetsList\x126\n\x0econjure_pubkey\ - \x18\x05\x20\x01(\x0b2\x0f.conjure.PubKeyR\rconjurePubkey\x125\n\x0cdns_\ - reg_conf\x18\x06\x20\x01(\x0b2\x13.conjure.DnsRegConfR\ndnsRegConf\"\xdf\ - \x01\n\nDnsRegConf\x12;\n\x0edns_reg_method\x18\x01\x20\x02(\x0e2\x15.co\ - njure.DnsRegMethodR\x0cdnsRegMethod\x12\x16\n\x06target\x18\x02\x20\x01(\ - \tR\x06target\x12\x16\n\x06domain\x18\x03\x20\x02(\tR\x06domain\x12\x16\ - \n\x06pubkey\x18\x04\x20\x01(\x0cR\x06pubkey\x12+\n\x11utls_distribution\ - \x18\x05\x20\x01(\tR\x10utlsDistribution\x12\x1f\n\x0bstun_server\x18\ - \x06\x20\x01(\tR\nstunServer\"A\n\tDecoyList\x124\n\ntls_decoys\x18\x01\ - \x20\x03(\x0b2\x15.conjure.TLSDecoySpecR\ttlsDecoys\"X\n\x12PhantomSubne\ - tsList\x12B\n\x10weighted_subnets\x18\x01\x20\x03(\x0b2\x17.conjure.Phan\ - tomSubnetsR\x0fweightedSubnets\"B\n\x0ePhantomSubnets\x12\x16\n\x06weigh\ - t\x18\x01\x20\x01(\rR\x06weight\x12\x18\n\x07subnets\x18\x02\x20\x03(\tR\ - \x07subnets\"o\n\x12WebRTCICECandidate\x12\x19\n\x08ip_upper\x18\x01\x20\ - \x02(\x04R\x07ipUpper\x12\x19\n\x08ip_lower\x18\x02\x20\x02(\x04R\x07ipL\ - ower\x12#\n\rcomposed_info\x18\x03\x20\x02(\rR\x0ccomposedInfo\"\\\n\tWe\ - bRTCSDP\x12\x12\n\x04type\x18\x01\x20\x02(\rR\x04type\x12;\n\ncandidates\ - \x18\x02\x20\x03(\x0b2\x1b.conjure.WebRTCICECandidateR\ncandidates\"H\n\ - \x0cWebRTCSignal\x12\x12\n\x04seed\x18\x01\x20\x02(\tR\x04seed\x12$\n\ - \x03sdp\x18\x02\x20\x02(\x0b2\x12.conjure.WebRTCSDPR\x03sdp\"\xc8\x02\n\ - \x0fStationToClient\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fpr\ - otocolVersion\x12B\n\x10state_transition\x18\x02\x20\x01(\x0e2\x17.conju\ - re.S2C_TransitionR\x0fstateTransition\x124\n\x0bconfig_info\x18\x03\x20\ - \x01(\x0b2\x13.conjure.ClientConfR\nconfigInfo\x126\n\nerr_reason\x18\ - \x04\x20\x01(\x0e2\x17.conjure.ErrorReasonS2CR\terrReason\x12\x1f\n\x0bt\ - mp_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\x07paddi\ - ng\"\xaf\x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_only\x18\x01\x20\ - \x01(\x08R\nuploadOnly\x12\x1d\n\ndark_decoy\x18\x02\x20\x01(\x08R\tdark\ - Decoy\x12!\n\x0cproxy_header\x18\x03\x20\x01(\x08R\x0bproxyHeader\x12\ - \x17\n\x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\x12\x1e\n\nprescanned\ - \x18\x05\x20\x01(\x08R\nprescanned\"\xae\x06\n\x0fClientToStation\x12)\n\ - \x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x122\n\x15de\ - coy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGeneration\x12B\n\ - \x10state_transition\x18\x03\x20\x01(\x0e2\x17.conjure.C2S_TransitionR\ - \x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\x04R\nuplo\ - adSync\x12,\n\x12client_lib_version\x18\x05\x20\x01(\rR\x10clientLibVers\ - ion\x12:\n\x19allow_registrar_overrides\x18\x06\x20\x01(\x08R\x17allowRe\ - gistrarOverrides\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoys\ - \x12+\n\x05stats\x18\x0b\x20\x01(\x0b2\x15.conjure.SessionStatsR\x05stat\ - s\x124\n\ttransport\x18\x0c\x20\x01(\x0e2\x16.conjure.TransportTypeR\ttr\ - ansport\x12?\n\x10transport_params\x18\r\x20\x01(\x0b2\x14.google.protob\ - uf.AnyR\x0ftransportParams\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\ - \rcovertAddress\x127\n\x18masked_decoy_server_name\x18\x15\x20\x01(\tR\ - \x15maskedDecoyServerName\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv\ - 6Support\x12\x1d\n\nv4_support\x18\x17\x20\x01(\x08R\tv4Support\x120\n\ - \x05flags\x18\x18\x20\x01(\x0b2\x1a.conjure.RegistrationFlagsR\x05flags\ - \x12:\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\x15.conjure.WebRTCSignalR\ - \x0cwebrtcSignal\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"z\n\ - \x15PrefixTransportParams\x12\x1b\n\tprefix_id\x18\x01\x20\x01(\x05R\x08\ - prefixId\x12\x16\n\x06prefix\x18\x02\x20\x01(\x0cR\x06prefix\x12,\n\x12r\ - andomize_dst_port\x18\r\x20\x01(\x08R\x10randomizeDstPort\"F\n\x16Generi\ - cTransportParams\x12,\n\x12randomize_dst_port\x18\r\x20\x01(\x08R\x10ran\ - domizeDstPort\"\xc8\x03\n\nC2SWrapper\x12#\n\rshared_secret\x18\x01\x20\ - \x01(\x0cR\x0csharedSecret\x12K\n\x14registration_payload\x18\x03\x20\ - \x01(\x0b2\x18.conjure.ClientToStationR\x13registrationPayload\x12L\n\ - \x13registration_source\x18\x04\x20\x01(\x0e2\x1b.conjure.RegistrationSo\ - urceR\x12registrationSource\x121\n\x14registration_address\x18\x06\x20\ - \x01(\x0cR\x13registrationAddress\x12#\n\rdecoy_address\x18\x07\x20\x01(\ - \x0cR\x0cdecoyAddress\x12R\n\x15registration_response\x18\x08\x20\x01(\ - \x0b2\x1d.conjure.RegistrationResponseR\x14registrationResponse\x12\"\n\ - \x0cRegRespBytes\x18\t\x20\x01(\x0cR\x0cRegRespBytes\x12*\n\x10RegRespSi\ - gnature\x18\n\x20\x01(\x0cR\x10RegRespSignature\"\xdd\x01\n\x0cSessionSt\ - ats\x120\n\x14failed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAm\ - ount\x121\n\x15total_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToC\ - onnect\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_deco\ - y\x18'\x20\x01(\rR\ntcpToDecoy\"\x86\x02\n\x11StationToDetector\x12\x1d\ - \n\nphantom_ip\x18\x01\x20\x01(\tR\tphantomIp\x12\x1b\n\tclient_ip\x18\ - \x02\x20\x01(\tR\x08clientIp\x12\x1d\n\ntimeout_ns\x18\x03\x20\x01(\x04R\ - \ttimeoutNs\x128\n\toperation\x18\x04\x20\x01(\x0e2\x1a.conjure.StationO\ - perationsR\toperation\x12\x19\n\x08dst_port\x18\n\x20\x01(\rR\x07dstPort\ - \x12\x19\n\x08src_port\x18\x0b\x20\x01(\rR\x07srcPort\x12&\n\x05proto\ - \x18\x0c\x20\x01(\x0e2\x10.conjure.IPProtoR\x05proto\"\x99\x02\n\x14Regi\ - strationResponse\x12\x1a\n\x08ipv4addr\x18\x01\x20\x01(\x07R\x08ipv4addr\ - \x12\x1a\n\x08ipv6addr\x18\x02\x20\x01(\x0cR\x08ipv6addr\x12\x19\n\x08ds\ - t_port\x18\x03\x20\x01(\rR\x07dstPort\x12\"\n\x0cserverRandom\x18\x04\ - \x20\x01(\x0cR\x0cserverRandom\x12\x14\n\x05error\x18\x05\x20\x01(\tR\ - \x05error\x123\n\nclientConf\x18\x06\x20\x01(\x0b2\x13.conjure.ClientCon\ - fR\nclientConf\x12?\n\x10transport_params\x18\n\x20\x01(\x0b2\x14.google\ - .protobuf.AnyR\x0ftransportParams\"\xae\x01\n\x0bDnsResponse\x12\x18\n\ - \x07success\x18\x01\x20\x01(\x08R\x07success\x12/\n\x13clientconf_outdat\ - ed\x18\x02\x20\x01(\x08R\x12clientconfOutdated\x12T\n\x16bidirectional_r\ - esponse\x18\x03\x20\x01(\x0b2\x1d.conjure.RegistrationResponseR\x15bidir\ - ectionalResponse*+\n\x07KeyType\x12\x0f\n\x0bAES_GCM_128\x10Z\x12\x0f\n\ - \x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\x12\x07\n\x03UDP\x10\x01\x12\ - \x07\n\x03DOT\x10\x02\x12\x07\n\x03DOH\x10\x03*\xe7\x01\n\x0eC2S_Transit\ - ion\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_RE\ - CONNECT\x10\x02\x12\x15\n\x11C2S_SESSION_CLOSE\x10\x03\x12\x14\n\x10C2S_\ - YIELD_UPLOAD\x10\x04\x12\x16\n\x12C2S_ACQUIRE_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\x0eErrorReaso\ - nS2C\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*\x82\ - \x01\n\rTransportType\x12\x08\n\x04Null\x10\0\x12\x07\n\x03Min\x10\x01\ - \x12\t\n\x05Obfs4\x10\x02\x12\x08\n\x04DTLS\x10\x03\x12\n\n\x06Prefix\ - \x10\x04\x12\x08\n\x04uTLS\x10\x05\x12\n\n\x06Format\x10\x06\x12\x08\n\ - \x04WASM\x10\x07\x12\x07\n\x03FTE\x10\x08\x12\x08\n\x04Quic\x10\t\x12\n\ - \n\x06Webrtc\x10c*\x86\x01\n\x12RegistrationSource\x12\x0f\n\x0bUnspecif\ - ied\x10\0\x12\x0c\n\x08Detector\x10\x01\x12\x07\n\x03API\x10\x02\x12\x13\ - \n\x0fDetectorPrescan\x10\x03\x12\x14\n\x10BidirectionalAPI\x10\x04\x12\ - \x07\n\x03DNS\x10\x05\x12\x14\n\x10BidirectionalDNS\x10\x06*@\n\x11Stati\ - onOperations\x12\x0b\n\x07Unknown\x10\0\x12\x07\n\x03New\x10\x01\x12\n\n\ - \x06Update\x10\x02\x12\t\n\x05Clear\x10\x03*$\n\x07IPProto\x12\x07\n\x03\ - Unk\x10\0\x12\x07\n\x03Tcp\x10\x01\x12\x07\n\x03Udp\x10\x02J\xc0\x8d\x01\ - \n\x07\x12\x05\0\0\xa1\x03\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\ - \n\x01\x02\x12\x03\x06\0\x102\xa5\x01\x20TODO:\x20We're\x20using\x20prot\ - o2\x20because\x20it's\x20the\x20default\x20on\x20Ubuntu\x2016.04.\n\x20A\ - t\x20some\x20point\x20we\x20will\x20want\x20to\x20migrate\x20to\x20proto\ - 3,\x20but\x20we\x20are\x20not\n\x20using\x20any\x20proto3\x20features\ - \x20yet.\n\n\t\n\x02\x03\0\x12\x03\x08\0#\n\n\n\x02\x05\0\x12\x04\n\0\r\ - \x01\n\n\n\x03\x05\0\x01\x12\x03\n\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\ - \x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x0b\x04\x0f\n\x0c\n\ - \x05\x05\0\x02\0\x02\x12\x03\x0b\x12\x14\n\x20\n\x04\x05\0\x02\x01\x12\ - \x03\x0c\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\ - \x02\x01\x01\x12\x03\x0c\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\ - \x0c\x12\x14\n\n\n\x02\x04\0\x12\x04\x0f\0\x14\x01\n\n\n\x03\x04\0\x01\ - \x12\x03\x0f\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x11\x04\x1b\x1a'\x20A\ - \x20public\x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\ - \x04\0\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ - \x11\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x11\x13\x16\n\x0c\n\x05\ - \x04\0\x02\0\x03\x12\x03\x11\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\ - \x13\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x13\x04\x0c\n\x0c\n\ - \x05\x04\0\x02\x01\x06\x12\x03\x13\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\ - \x12\x03\x13\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x13\x1c\x1d\n\ - \n\n\x02\x04\x01\x12\x04\x16\0<\x01\n\n\n\x03\x04\x01\x01\x12\x03\x16\ - \x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x1b\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\x1b\x04\x0c\n\x0c\n\x05\x04\ - \x01\x02\0\x05\x12\x03\x1b\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\ - \x1b\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1b\x1f\x20\n\xf7\x01\ - \n\x04\x04\x01\x02\x01\x12\x03\"\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20i\ - pv4\x20address,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\x20IP\ - v4\x20address\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resolved\ - \x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20the\x20client\x20may\ - \x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20un\ - trusted,\x20or\x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\ - \x05\x04\x01\x02\x01\x04\x12\x03\"\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\ - \x05\x12\x03\"\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\"\x15\x1d\n\ - \x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\"\x20!\n>\n\x04\x04\x01\x02\x02\ - \x12\x03%\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20ne\ - twork\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\x20\ - contacting\x20this\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20default\ - \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\x032\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20duration,\x20in\ - \x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connection\x20to\ - \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\x032\x04\x0c\n\x0c\n\ - \x05\x04\x01\x02\x04\x05\x12\x032\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\ - \x12\x032\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x032\x1e\x1f\n\xb0\ - \x02\n\x04\x04\x01\x02\x05\x12\x03;\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\x03;\x04\x0c\n\x0c\n\x05\x04\ - \x01\x02\x05\x05\x12\x03;\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03;\ - \x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\x08\n\ - \x02\x04\x02\x12\x04S\0Z\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\x03S\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\ - \x03T\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03T\x04\x0c\n\x0c\n\x05\ - \x04\x02\x02\0\x06\x12\x03T\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03T\ - \x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03T$%\n\x0b\n\x04\x04\x02\x02\ - \x01\x12\x03U\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03U\x04\x0c\n\ - \x0c\n\x05\x04\x02\x02\x01\x05\x12\x03U\r\x13\n\x0c\n\x05\x04\x02\x02\ - \x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03U!\"\n\ - \x0b\n\x04\x04\x02\x02\x02\x12\x03V\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\ - \x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03V\r\x13\n\x0c\n\ - \x05\x04\x02\x02\x02\x01\x12\x03V\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\ - \x12\x03V%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03W\x049\n\x0c\n\x05\x04\ - \x02\x02\x03\x04\x12\x03W\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\ - \x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03W\x204\n\x0c\n\x05\ - \x04\x02\x02\x03\x03\x12\x03W78\n\x0b\n\x04\x04\x02\x02\x04\x12\x03X\x04\ - '\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03X\x04\x0c\n\x0c\n\x05\x04\x02\ - \x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03X\x14\ - \"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03X%&\n\x0b\n\x04\x04\x02\x02\ - \x05\x12\x03Y\x04)\n\x0c\n\x05\x04\x02\x02\x05\x04\x12\x03Y\x04\x0c\n\ - \x0c\n\x05\x04\x02\x02\x05\x06\x12\x03Y\r\x17\n\x0c\n\x05\x04\x02\x02\ - \x05\x01\x12\x03Y\x18$\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03Y'(\n-\n\ - \x02\x04\x03\x12\x04]\0d\x01\x1a!\x20Configuration\x20for\x20DNS\x20regi\ - strar\n\n\n\n\x03\x04\x03\x01\x12\x03]\x08\x12\n\x0b\n\x04\x04\x03\x02\0\ - \x12\x03^\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03^\x04\x0c\n\x0c\n\ + \n\x10signalling.proto\x12\x08tapdance\x1a\x19google/protobuf/any.proto\ + \"A\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12%\n\x04\ + type\x18\x02\x20\x01(\x0e2\x11.tapdance.KeyTypeR\x04type\"\xbe\x01\n\x0c\ + TLSDecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\ + \x1a\n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6ad\ + dr\x18\x06\x20\x01(\x0cR\x08ipv6addr\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\"\ + \xda\x02\n\nClientConf\x122\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x13.tapd\ + ance.DecoyListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\nge\ + neration\x127\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x10.tapdance.Pub\ + KeyR\rdefaultPubkey\x12N\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\ + \x1c.tapdance.PhantomSubnetsListR\x12phantomSubnetsList\x127\n\x0econjur\ + e_pubkey\x18\x05\x20\x01(\x0b2\x10.tapdance.PubKeyR\rconjurePubkey\x126\ + \n\x0cdns_reg_conf\x18\x06\x20\x01(\x0b2\x14.tapdance.DnsRegConfR\ndnsRe\ + gConf\"\xe0\x01\n\nDnsRegConf\x12<\n\x0edns_reg_method\x18\x01\x20\x02(\ + \x0e2\x16.tapdance.DnsRegMethodR\x0cdnsRegMethod\x12\x16\n\x06target\x18\ + \x02\x20\x01(\tR\x06target\x12\x16\n\x06domain\x18\x03\x20\x02(\tR\x06do\ + main\x12\x16\n\x06pubkey\x18\x04\x20\x01(\x0cR\x06pubkey\x12+\n\x11utls_\ + distribution\x18\x05\x20\x01(\tR\x10utlsDistribution\x12\x1f\n\x0bstun_s\ + erver\x18\x06\x20\x01(\tR\nstunServer\"B\n\tDecoyList\x125\n\ntls_decoys\ + \x18\x01\x20\x03(\x0b2\x16.tapdance.TLSDecoySpecR\ttlsDecoys\"Y\n\x12Pha\ + ntomSubnetsList\x12C\n\x10weighted_subnets\x18\x01\x20\x03(\x0b2\x18.tap\ + dance.PhantomSubnetsR\x0fweightedSubnets\"B\n\x0ePhantomSubnets\x12\x16\ + \n\x06weight\x18\x01\x20\x01(\rR\x06weight\x12\x18\n\x07subnets\x18\x02\ + \x20\x03(\tR\x07subnets\"o\n\x12WebRTCICECandidate\x12\x19\n\x08ip_upper\ + \x18\x01\x20\x02(\x04R\x07ipUpper\x12\x19\n\x08ip_lower\x18\x02\x20\x02(\ + \x04R\x07ipLower\x12#\n\rcomposed_info\x18\x03\x20\x02(\rR\x0ccomposedIn\ + fo\"]\n\tWebRTCSDP\x12\x12\n\x04type\x18\x01\x20\x02(\rR\x04type\x12<\n\ + \ncandidates\x18\x02\x20\x03(\x0b2\x1c.tapdance.WebRTCICECandidateR\ncan\ + didates\"I\n\x0cWebRTCSignal\x12\x12\n\x04seed\x18\x01\x20\x02(\tR\x04se\ + ed\x12%\n\x03sdp\x18\x02\x20\x02(\x0b2\x13.tapdance.WebRTCSDPR\x03sdp\"\ + \xcb\x02\n\x0fStationToClient\x12)\n\x10protocol_version\x18\x01\x20\x01\ + (\rR\x0fprotocolVersion\x12C\n\x10state_transition\x18\x02\x20\x01(\x0e2\ + \x18.tapdance.S2C_TransitionR\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\"\xaf\x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_on\ + ly\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\x0bpr\ + oxyHeader\x12\x17\n\x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\x12\x1e\n\ + \nprescanned\x18\x05\x20\x01(\x08R\nprescanned\"\xb7\x06\n\x0fClientToSt\ + ation\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\x12client_lib_version\x18\x05\x20\x01(\rR\x10cl\ + ientLibVersion\x12>\n\x1bdisable_registrar_overrides\x18\x06\x20\x01(\ + \x08R\x19disableRegistrarOverrides\x12#\n\rfailed_decoys\x18\n\x20\x03(\ + \tR\x0cfailedDecoys\x12,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.tapdance.S\ + essionStatsR\x05stats\x125\n\ttransport\x18\x0c\x20\x01(\x0e2\x17.tapdan\ + ce.TransportTypeR\ttransport\x12?\n\x10transport_params\x18\r\x20\x01(\ + \x0b2\x14.google.protobuf.AnyR\x0ftransportParams\x12%\n\x0ecovert_addre\ + ss\x18\x14\x20\x01(\tR\rcovertAddress\x127\n\x18masked_decoy_server_name\ + \x18\x15\x20\x01(\tR\x15maskedDecoyServerName\x12\x1d\n\nv6_support\x18\ + \x16\x20\x01(\x08R\tv6Support\x12\x1d\n\nv4_support\x18\x17\x20\x01(\x08\ + R\tv4Support\x121\n\x05flags\x18\x18\x20\x01(\x0b2\x1b.tapdance.Registra\ + tionFlagsR\x05flags\x12;\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\x16.tapd\ + ance.WebRTCSignalR\x0cwebrtcSignal\x12\x18\n\x07padding\x18d\x20\x01(\ + \x0cR\x07padding\"\xa8\x01\n\x15PrefixTransportParams\x12\x1b\n\tprefix_\ + id\x18\x01\x20\x01(\x05R\x08prefixId\x12\x16\n\x06prefix\x18\x02\x20\x01\ + (\x0cR\x06prefix\x12,\n\x12flush_after_prefix\x18\x03\x20\x01(\x08R\x10f\ + lushAfterPrefix\x12,\n\x12randomize_dst_port\x18\r\x20\x01(\x08R\x10rand\ + omizeDstPort\"F\n\x16GenericTransportParams\x12,\n\x12randomize_dst_port\ + \x18\r\x20\x01(\x08R\x10randomizeDstPort\"\xcb\x03\n\nC2SWrapper\x12#\n\ + \rshared_secret\x18\x01\x20\x01(\x0cR\x0csharedSecret\x12L\n\x14registra\ + tion_payload\x18\x03\x20\x01(\x0b2\x19.tapdance.ClientToStationR\x13regi\ + strationPayload\x12M\n\x13registration_source\x18\x04\x20\x01(\x0e2\x1c.\ + tapdance.RegistrationSourceR\x12registrationSource\x121\n\x14registratio\ + n_address\x18\x06\x20\x01(\x0cR\x13registrationAddress\x12#\n\rdecoy_add\ + ress\x18\x07\x20\x01(\x0cR\x0cdecoyAddress\x12S\n\x15registration_respon\ + se\x18\x08\x20\x01(\x0b2\x1e.tapdance.RegistrationResponseR\x14registrat\ + ionResponse\x12\"\n\x0cRegRespBytes\x18\t\x20\x01(\x0cR\x0cRegRespBytes\ + \x12*\n\x10RegRespSignature\x18\n\x20\x01(\x0cR\x10RegRespSignature\"\ + \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\ntlsToDe\ + coy\x12\x20\n\x0ctcp_to_decoy\x18'\x20\x01(\rR\ntcpToDecoy\"\x88\x02\n\ + \x11StationToDetector\x12\x1d\n\nphantom_ip\x18\x01\x20\x01(\tR\tphantom\ + Ip\x12\x1b\n\tclient_ip\x18\x02\x20\x01(\tR\x08clientIp\x12\x1d\n\ntimeo\ + ut_ns\x18\x03\x20\x01(\x04R\ttimeoutNs\x129\n\toperation\x18\x04\x20\x01\ + (\x0e2\x1b.tapdance.StationOperationsR\toperation\x12\x19\n\x08dst_port\ + \x18\n\x20\x01(\rR\x07dstPort\x12\x19\n\x08src_port\x18\x0b\x20\x01(\rR\ + \x07srcPort\x12'\n\x05proto\x18\x0c\x20\x01(\x0e2\x11.tapdance.IPProtoR\ + \x05proto\"\x9a\x02\n\x14RegistrationResponse\x12\x1a\n\x08ipv4addr\x18\ + \x01\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\x18\x02\x20\x01(\ + \x0cR\x08ipv6addr\x12\x19\n\x08dst_port\x18\x03\x20\x01(\rR\x07dstPort\ + \x12\"\n\x0cserverRandom\x18\x04\x20\x01(\x0cR\x0cserverRandom\x12\x14\n\ + \x05error\x18\x05\x20\x01(\tR\x05error\x124\n\nclientConf\x18\x06\x20\ + \x01(\x0b2\x14.tapdance.ClientConfR\nclientConf\x12?\n\x10transport_para\ + ms\x18\n\x20\x01(\x0b2\x14.google.protobuf.AnyR\x0ftransportParams\"\xaf\ + \x01\n\x0bDnsResponse\x12\x18\n\x07success\x18\x01\x20\x01(\x08R\x07succ\ + ess\x12/\n\x13clientconf_outdated\x18\x02\x20\x01(\x08R\x12clientconfOut\ + dated\x12U\n\x16bidirectional_response\x18\x03\x20\x01(\x0b2\x1e.tapdanc\ + e.RegistrationResponseR\x15bidirectionalResponse*+\n\x07KeyType\x12\x0f\ + \n\x0bAES_GCM_128\x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\ + \x12\x07\n\x03UDP\x10\x01\x12\x07\n\x03DOT\x10\x02\x12\x07\n\x03DOH\x10\ + \x03*\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\x10e*\x82\x01\n\rTransportType\x12\x08\n\x04Nul\ + l\x10\0\x12\x07\n\x03Min\x10\x01\x12\t\n\x05Obfs4\x10\x02\x12\x08\n\x04D\ + TLS\x10\x03\x12\n\n\x06Prefix\x10\x04\x12\x08\n\x04uTLS\x10\x05\x12\n\n\ + \x06Format\x10\x06\x12\x08\n\x04WASM\x10\x07\x12\x07\n\x03FTE\x10\x08\ + \x12\x08\n\x04Quic\x10\t\x12\n\n\x06Webrtc\x10c*\x86\x01\n\x12Registrati\ + onSource\x12\x0f\n\x0bUnspecified\x10\0\x12\x0c\n\x08Detector\x10\x01\ + \x12\x07\n\x03API\x10\x02\x12\x13\n\x0fDetectorPrescan\x10\x03\x12\x14\n\ + \x10BidirectionalAPI\x10\x04\x12\x07\n\x03DNS\x10\x05\x12\x14\n\x10Bidir\ + ectionalDNS\x10\x06*@\n\x11StationOperations\x12\x0b\n\x07Unknown\x10\0\ + \x12\x07\n\x03New\x10\x01\x12\n\n\x06Update\x10\x02\x12\t\n\x05Clear\x10\ + \x03*$\n\x07IPProto\x12\x07\n\x03Unk\x10\0\x12\x07\n\x03Tcp\x10\x01\x12\ + \x07\n\x03Udp\x10\x02J\x8a\x8e\x01\n\x07\x12\x05\0\0\xa2\x03\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\x20defau\ + lt\x20on\x20Ubuntu\x2016.04.\n\x20At\x20some\x20point\x20we\x20will\x20w\ + ant\x20to\x20migrate\x20to\x20proto3,\x20but\x20we\x20are\x20not\n\x20us\ + ing\x20any\x20proto3\x20features\x20yet.\n\n\t\n\x02\x03\0\x12\x03\x08\0\ + #\n\n\n\x02\x05\0\x12\x04\n\0\r\x01\n\n\n\x03\x05\0\x01\x12\x03\n\x05\ + \x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\0\ + \x01\x12\x03\x0b\x04\x0f\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x0b\x12\x14\ + \n\x20\n\x04\x05\0\x02\x01\x12\x03\x0c\x04\x15\"\x13\x20not\x20supported\ + \x20atm\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x0c\x04\x0f\n\x0c\n\x05\ + \x05\0\x02\x01\x02\x12\x03\x0c\x12\x14\n\n\n\x02\x04\0\x12\x04\x0f\0\x14\ + \x01\n\n\n\x03\x04\0\x01\x12\x03\x0f\x08\x0e\n4\n\x04\x04\0\x02\0\x12\ + \x03\x11\x04\x1b\x1a'\x20A\x20public\x20key,\x20as\x20used\x20by\x20the\ + \x20station.\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\ + \x05\x04\0\x02\0\x05\x12\x03\x11\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\ + \x03\x11\x13\x16\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x11\x19\x1a\n\x0b\n\ + \x04\x04\0\x02\x01\x12\x03\x13\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\ + \x03\x13\x04\x0c\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\x13\r\x14\n\x0c\n\ + \x05\x04\0\x02\x01\x01\x12\x03\x13\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\ + \x12\x03\x13\x1c\x1d\n\n\n\x02\x04\x01\x12\x04\x16\0<\x01\n\n\n\x03\x04\ + \x01\x01\x12\x03\x16\x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x1b\ + \x04!\x1a\x93\x01\x20The\x20hostname/SNI\x20to\x20use\x20for\x20this\x20\ + host\n\n\x20The\x20hostname\x20is\x20the\x20only\x20required\x20field,\ + \x20although\x20other\n\x20fields\x20are\x20expected\x20to\x20be\x20pres\ + ent\x20in\x20most\x20cases.\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x1b\ + \x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x1b\r\x13\n\x0c\n\x05\x04\ + \x01\x02\0\x01\x12\x03\x1b\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\ + \x1b\x1f\x20\n\xf7\x01\n\x04\x04\x01\x02\x01\x12\x03\"\x04\"\x1a\xe9\x01\ + \x20The\x2032-bit\x20ipv4\x20address,\x20in\x20network\x20byte\x20order\ + \n\n\x20If\x20the\x20IPv4\x20address\x20is\x20absent,\x20then\x20it\x20m\ + ay\x20be\x20resolved\x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20th\ + e\x20client\x20may\x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\ + \x20DNS\x20is\x20untrusted,\x20or\x20the\x20service\x20may\x20be\x20mult\ + ihomed.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03\"\x04\x0c\n\x0c\n\x05\ + \x04\x01\x02\x01\x05\x12\x03\"\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\ + \x03\"\x15\x1d\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\"\x20!\n>\n\x04\ + \x04\x01\x02\x02\x12\x03%\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20addr\ + ess,\x20in\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\ + \x20default\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\x032\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20durat\ + ion,\x20in\x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connect\ + ion\x20to\x20this\x20decoy\x20(because\x20the\x20decoy\x20may\x20close\ + \x20the\n\x20connection\x20itself\x20after\x20this\x20length\x20of\x20ti\ + me)\n\n\x20If\x20omitted,\x20a\x20default\x20of\x2030,000\x20millisecond\ + s\x20is\x20assumed.\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x032\x04\x0c\n\ + \x0c\n\x05\x04\x01\x02\x04\x05\x12\x032\r\x13\n\x0c\n\x05\x04\x01\x02\ + \x04\x01\x12\x032\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x032\x1e\ + \x1f\n\xb0\x02\n\x04\x04\x01\x02\x05\x12\x03;\x04\x1f\x1a\xa2\x02\x20The\ + \x20maximum\x20TCP\x20window\x20size\x20to\x20attempt\x20to\x20use\x20fo\ + r\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\x20th\ + at\x20permit\x20windows\x20of\x2015KB\x20or\x20larger.\x20\x20If\x20this\ + \n\x20heuristic\x20changes,\x20then\x20this\x20default\x20doesn't\x20mak\ + e\x20sense.\n\n\x0c\n\x05\x04\x01\x02\x05\x04\x12\x03;\x04\x0c\n\x0c\n\ + \x05\x04\x01\x02\x05\x05\x12\x03;\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\ + \x12\x03;\x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\ + \x08\n\x02\x04\x02\x12\x04S\0Z\x012\xf6\x07\x20In\x20version\x201,\x20th\ + e\x20request\x20is\x20very\x20simple:\x20when\n\x20the\x20client\x20send\ + s\x20a\x20MSG_PROTO\x20to\x20the\x20station,\x20if\x20the\n\x20generatio\ + n\x20number\x20is\x20present,\x20then\x20this\x20request\x20includes\n\ + \x20(in\x20addition\x20to\x20whatever\x20other\x20operations\x20are\x20p\ + art\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\x20number\x20in\x20its\x20request.\n\n\x20If\x20the\x20re\ + sponse\x20contains\x20a\x20DecoyListUpdate\x20with\x20a\x20generation\ + \x20number\x20equal\n\x20to\x20that\x20which\x20the\x20client\x20sent,\ + \x20then\x20the\x20client\x20is\x20\"caught\x20up\"\x20with\n\x20the\x20\ + station\x20and\x20the\x20response\x20contains\x20no\x20new\x20informatio\ + n\n\x20(and\x20all\x20other\x20fields\x20may\x20be\x20omitted\x20or\x20e\ + mpty).\x20\x20Otherwise,\n\x20the\x20station\x20will\x20send\x20the\x20l\ + atest\x20configuration\x20information,\n\x20along\x20with\x20its\x20gene\ + ration\x20number.\n\n\x20The\x20station\x20can\x20also\x20send\x20Client\ + Conf\x20messages\n\x20(as\x20part\x20of\x20Station2Client\x20messages)\ + \x20whenever\x20it\x20wants.\n\x20The\x20client\x20is\x20expected\x20to\ + \x20react\x20as\x20if\x20it\x20had\x20requested\n\x20such\x20messages\ + \x20--\x20possibly\x20by\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\x03S\x08\x12\n\x0b\n\x04\x04\x02\ + \x02\0\x12\x03T\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03T\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\0\x06\x12\x03T\r\x16\n\x0c\n\x05\x04\x02\x02\0\ + \x01\x12\x03T\x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03T$%\n\x0b\n\x04\ + \x04\x02\x02\x01\x12\x03U\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03U\ + \x04\x0c\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03U\r\x13\n\x0c\n\x05\x04\ + \x02\x02\x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\ + \x03U!\"\n\x0b\n\x04\x04\x02\x02\x02\x12\x03V\x04'\n\x0c\n\x05\x04\x02\ + \x02\x02\x04\x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03V\r\ + \x13\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03V\x14\"\n\x0c\n\x05\x04\x02\ + \x02\x02\x03\x12\x03V%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03W\x049\n\x0c\ + \n\x05\x04\x02\x02\x03\x04\x12\x03W\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\ + \x06\x12\x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03W\x204\n\x0c\ + \n\x05\x04\x02\x02\x03\x03\x12\x03W78\n\x0b\n\x04\x04\x02\x02\x04\x12\ + \x03X\x04'\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03X\x04\x0c\n\x0c\n\x05\ + \x04\x02\x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\ + \x03X\x14\"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03X%&\n\x0b\n\x04\x04\ + \x02\x02\x05\x12\x03Y\x04)\n\x0c\n\x05\x04\x02\x02\x05\x04\x12\x03Y\x04\ + \x0c\n\x0c\n\x05\x04\x02\x02\x05\x06\x12\x03Y\r\x17\n\x0c\n\x05\x04\x02\ + \x02\x05\x01\x12\x03Y\x18$\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03Y'(\n-\ + \n\x02\x04\x03\x12\x04]\0d\x01\x1a!\x20Configuration\x20for\x20DNS\x20re\ + gistrar\n\n\n\n\x03\x04\x03\x01\x12\x03]\x08\x12\n\x0b\n\x04\x04\x03\x02\ + \0\x12\x03^\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03^\x04\x0c\n\x0c\n\ \x05\x04\x03\x02\0\x06\x12\x03^\r\x19\n\x0c\n\x05\x04\x03\x02\0\x01\x12\ \x03^\x1a(\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03^+,\n\x0b\n\x04\x04\x03\ \x02\x01\x12\x03_\x04\x1f\n\x0c\n\x05\x04\x03\x02\x01\x04\x12\x03_\x04\ @@ -7017,15 +7055,15 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \xf2\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x04\x05\x12\x04\xf2\x01\r\x13\n\r\ \n\x05\x04\x0c\x02\x04\x01\x12\x04\xf2\x01\x14&\n\r\n\x05\x04\x0c\x02\ \x04\x03\x12\x04\xf2\x01)*\n\xa5\x02\n\x04\x04\x0c\x02\x05\x12\x04\xf7\ - \x01\x040\x1a\x96\x02\x20Indicates\x20whether\x20the\x20client\x20will\ + \x01\x042\x1a\x96\x02\x20Indicates\x20whether\x20the\x20client\x20will\ \x20allow\x20the\x20registrar\x20to\x20provide\x20alternative\x20paramet\ ers\x20that\n\x20may\x20work\x20better\x20in\x20substitute\x20for\x20the\ \x20deterministically\x20selected\x20parameters.\x20This\x20only\x20work\ s\n\x20for\x20bidirectional\x20registration\x20methods\x20where\x20the\ \x20client\x20receives\x20a\x20RegistrationResponse.\n\n\r\n\x05\x04\x0c\ \x02\x05\x04\x12\x04\xf7\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x05\x05\x12\ - \x04\xf7\x01\r\x11\n\r\n\x05\x04\x0c\x02\x05\x01\x12\x04\xf7\x01\x12+\n\ - \r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf7\x01./\nq\n\x04\x04\x0c\x02\x06\ + \x04\xf7\x01\r\x11\n\r\n\x05\x04\x0c\x02\x05\x01\x12\x04\xf7\x01\x12-\n\ + \r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf7\x0101\nq\n\x04\x04\x0c\x02\x06\ \x12\x04\xfb\x01\x04'\x1ac\x20List\x20of\x20decoys\x20that\x20client\x20\ have\x20unsuccessfully\x20tried\x20in\x20current\x20session.\n\x20Could\ \x20be\x20sent\x20in\x20chunks\n\n\r\n\x05\x04\x0c\x02\x06\x04\x12\x04\ @@ -7085,7 +7123,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20fingerprinting.\n\n\r\n\x05\x04\x0c\x02\x10\x04\x12\x04\x9b\x02\x04\ \x0c\n\r\n\x05\x04\x0c\x02\x10\x05\x12\x04\x9b\x02\r\x12\n\r\n\x05\x04\ \x0c\x02\x10\x01\x12\x04\x9b\x02\x13\x1a\n\r\n\x05\x04\x0c\x02\x10\x03\ - \x12\x04\x9b\x02\x1d\x20\n\x0c\n\x02\x04\r\x12\x06\x9f\x02\0\xb0\x02\x01\ + \x12\x04\x9b\x02\x1d\x20\n\x0c\n\x02\x04\r\x12\x06\x9f\x02\0\xb1\x02\x01\ \n\x0b\n\x03\x04\r\x01\x12\x04\x9f\x02\x08\x1d\n!\n\x04\x04\r\x02\0\x12\ \x04\xa1\x02\x04!\x1a\x13\x20Prefix\x20Identifier\n\n\r\n\x05\x04\r\x02\ \0\x04\x12\x04\xa1\x02\x04\x0c\n\r\n\x05\x04\r\x02\0\x05\x12\x04\xa1\x02\ @@ -7098,209 +7136,212 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20connection.\n\n\r\n\x05\x04\r\x02\x01\x04\x12\x04\xa5\x02\x04\x0c\n\ \r\n\x05\x04\r\x02\x01\x05\x12\x04\xa5\x02\r\x12\n\r\n\x05\x04\r\x02\x01\ \x01\x12\x04\xa5\x02\x13\x19\n\r\n\x05\x04\r\x02\x01\x03\x12\x04\xa5\x02\ - \x1c\x1d\n\xed\x02\n\x04\x04\r\x02\x02\x12\x04\xaf\x02\x04*\x1a\xbc\x01\ - \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ - \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ - \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ - ion\x20port\x20randomization\x20is\n\x20supported.\n2\x9f\x01\x20//\x20p\ - otential\x20future\x20fields\n\x20obfuscator\x20ID\n\x20tagEncoder\x20ID\ - \x20(¶ms?,\x20e.g.\x20format-base64\x20/\x20padding)\n\x20streamEnco\ - der\x20ID\x20(¶ms?,\x20e.g.\x20foramat-base64\x20/\x20padding)\n\n\r\ - \n\x05\x04\r\x02\x02\x04\x12\x04\xaf\x02\x04\x0c\n\r\n\x05\x04\r\x02\x02\ - \x05\x12\x04\xaf\x02\r\x11\n\r\n\x05\x04\r\x02\x02\x01\x12\x04\xaf\x02\ - \x12$\n\r\n\x05\x04\r\x02\x02\x03\x12\x04\xaf\x02')\n\x0c\n\x02\x04\x0e\ - \x12\x06\xb2\x02\0\xb7\x02\x01\n\x0b\n\x03\x04\x0e\x01\x12\x04\xb2\x02\ - \x08\x1e\n\xcb\x01\n\x04\x04\x0e\x02\0\x12\x04\xb6\x02\x04*\x1a\xbc\x01\ - \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ - \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ - \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ - ion\x20port\x20randomization\x20is\n\x20supported.\n\n\r\n\x05\x04\x0e\ - \x02\0\x04\x12\x04\xb6\x02\x04\x0c\n\r\n\x05\x04\x0e\x02\0\x05\x12\x04\ - \xb6\x02\r\x11\n\r\n\x05\x04\x0e\x02\0\x01\x12\x04\xb6\x02\x12$\n\r\n\ - \x05\x04\x0e\x02\0\x03\x12\x04\xb6\x02')\n\x0c\n\x02\x05\x06\x12\x06\xb9\ - \x02\0\xc1\x02\x01\n\x0b\n\x03\x05\x06\x01\x12\x04\xb9\x02\x05\x17\n\x0c\ - \n\x04\x05\x06\x02\0\x12\x04\xba\x02\x02\x12\n\r\n\x05\x05\x06\x02\0\x01\ - \x12\x04\xba\x02\x02\r\n\r\n\x05\x05\x06\x02\0\x02\x12\x04\xba\x02\x10\ - \x11\n\x0c\n\x04\x05\x06\x02\x01\x12\x04\xbb\x02\x08\x15\n\r\n\x05\x05\ - \x06\x02\x01\x01\x12\x04\xbb\x02\x08\x10\n\r\n\x05\x05\x06\x02\x01\x02\ - \x12\x04\xbb\x02\x13\x14\n\x0c\n\x04\x05\x06\x02\x02\x12\x04\xbc\x02\x08\ - \x10\n\r\n\x05\x05\x06\x02\x02\x01\x12\x04\xbc\x02\x08\x0b\n\r\n\x05\x05\ - \x06\x02\x02\x02\x12\x04\xbc\x02\x0e\x0f\n\x0c\n\x04\x05\x06\x02\x03\x12\ - \x04\xbd\x02\x02\x16\n\r\n\x05\x05\x06\x02\x03\x01\x12\x04\xbd\x02\x02\ - \x11\n\r\n\x05\x05\x06\x02\x03\x02\x12\x04\xbd\x02\x14\x15\n\x0c\n\x04\ - \x05\x06\x02\x04\x12\x04\xbe\x02\x02\x17\n\r\n\x05\x05\x06\x02\x04\x01\ - \x12\x04\xbe\x02\x02\x12\n\r\n\x05\x05\x06\x02\x04\x02\x12\x04\xbe\x02\ - \x15\x16\n\x0c\n\x04\x05\x06\x02\x05\x12\x04\xbf\x02\x02\n\n\r\n\x05\x05\ - \x06\x02\x05\x01\x12\x04\xbf\x02\x02\x05\n\r\n\x05\x05\x06\x02\x05\x02\ - \x12\x04\xbf\x02\x08\t\n\x0c\n\x04\x05\x06\x02\x06\x12\x04\xc0\x02\x02\ - \x17\n\r\n\x05\x05\x06\x02\x06\x01\x12\x04\xc0\x02\x02\x12\n\r\n\x05\x05\ - \x06\x02\x06\x02\x12\x04\xc0\x02\x15\x16\n\x0c\n\x02\x04\x0f\x12\x06\xc3\ - \x02\0\xdb\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\x04\xc3\x02\x08\x12\n\x0c\ - \n\x04\x04\x0f\x02\0\x12\x04\xc4\x02\x02#\n\r\n\x05\x04\x0f\x02\0\x04\ - \x12\x04\xc4\x02\x02\n\n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\xc4\x02\x0b\ - \x10\n\r\n\x05\x04\x0f\x02\0\x01\x12\x04\xc4\x02\x11\x1e\n\r\n\x05\x04\ - \x0f\x02\0\x03\x12\x04\xc4\x02!\"\n\x0c\n\x04\x04\x0f\x02\x01\x12\x04\ - \xc5\x02\x024\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\xc5\x02\x02\n\n\r\n\ - \x05\x04\x0f\x02\x01\x06\x12\x04\xc5\x02\x0b\x1a\n\r\n\x05\x04\x0f\x02\ - \x01\x01\x12\x04\xc5\x02\x1b/\n\r\n\x05\x04\x0f\x02\x01\x03\x12\x04\xc5\ - \x0223\n\x0c\n\x04\x04\x0f\x02\x02\x12\x04\xc6\x02\x026\n\r\n\x05\x04\ - \x0f\x02\x02\x04\x12\x04\xc6\x02\x02\n\n\r\n\x05\x04\x0f\x02\x02\x06\x12\ - \x04\xc6\x02\x0b\x1d\n\r\n\x05\x04\x0f\x02\x02\x01\x12\x04\xc6\x02\x1e1\ - \n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xc6\x0245\nC\n\x04\x04\x0f\x02\ - \x03\x12\x04\xc9\x02\x02*\x1a5\x20client\x20source\x20address\x20when\ - \x20receiving\x20a\x20registration\n\n\r\n\x05\x04\x0f\x02\x03\x04\x12\ - \x04\xc9\x02\x02\n\n\r\n\x05\x04\x0f\x02\x03\x05\x12\x04\xc9\x02\x0b\x10\ - \n\r\n\x05\x04\x0f\x02\x03\x01\x12\x04\xc9\x02\x11%\n\r\n\x05\x04\x0f\ - \x02\x03\x03\x12\x04\xc9\x02()\nH\n\x04\x04\x0f\x02\x04\x12\x04\xcc\x02\ - \x02#\x1a:\x20Decoy\x20address\x20used\x20when\x20registering\x20over\ - \x20Decoy\x20registrar\n\n\r\n\x05\x04\x0f\x02\x04\x04\x12\x04\xcc\x02\ - \x02\n\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\xcc\x02\x0b\x10\n\r\n\x05\ - \x04\x0f\x02\x04\x01\x12\x04\xcc\x02\x11\x1e\n\r\n\x05\x04\x0f\x02\x04\ - \x03\x12\x04\xcc\x02!\"\n\xeb\x05\n\x04\x04\x0f\x02\x05\x12\x04\xd8\x02\ - \x02:\x1a\xdc\x05\x20The\x20next\x20three\x20fields\x20allow\x20an\x20in\ - dependent\x20registrar\x20(trusted\x20by\x20a\x20station\x20w/\x20a\x20z\ - mq\x20keypair)\x20to\n\x20share\x20the\x20registration\x20overrides\x20t\ - hat\x20it\x20assigned\x20to\x20the\x20client\x20with\x20the\x20station(s\ - ).\n\x20Registration\x20Respose\x20is\x20here\x20to\x20allow\x20a\x20par\ - sed\x20object\x20with\x20direct\x20access\x20to\x20the\x20fields\x20with\ - in.\n\x20RegRespBytes\x20provides\x20a\x20serialized\x20verion\x20of\x20\ - the\x20Registration\x20response\x20so\x20that\x20the\x20signature\x20of\ - \n\x20the\x20Bidirectional\x20registrar\x20can\x20be\x20validated\x20bef\ - ore\x20a\x20station\x20applies\x20any\x20overrides\x20present\x20in\n\ - \x20the\x20Registration\x20Response.\n\n\x20If\x20you\x20are\x20reading\ - \x20this\x20in\x20the\x20future\x20and\x20you\x20want\x20to\x20extend\ - \x20the\x20functionality\x20here\x20it\x20might\n\x20make\x20sense\x20to\ - \x20make\x20the\x20RegistrationResponse\x20that\x20is\x20sent\x20to\x20t\ - he\x20client\x20a\x20distinct\x20message\x20from\n\x20the\x20one\x20that\ - \x20gets\x20sent\x20to\x20the\x20stations.\n\n\r\n\x05\x04\x0f\x02\x05\ - \x04\x12\x04\xd8\x02\x02\n\n\r\n\x05\x04\x0f\x02\x05\x06\x12\x04\xd8\x02\ - \x0b\x1f\n\r\n\x05\x04\x0f\x02\x05\x01\x12\x04\xd8\x02\x205\n\r\n\x05\ - \x04\x0f\x02\x05\x03\x12\x04\xd8\x0289\n\x0c\n\x04\x04\x0f\x02\x06\x12\ - \x04\xd9\x02\x02\"\n\r\n\x05\x04\x0f\x02\x06\x04\x12\x04\xd9\x02\x02\n\n\ - \r\n\x05\x04\x0f\x02\x06\x05\x12\x04\xd9\x02\x0b\x10\n\r\n\x05\x04\x0f\ - \x02\x06\x01\x12\x04\xd9\x02\x11\x1d\n\r\n\x05\x04\x0f\x02\x06\x03\x12\ - \x04\xd9\x02\x20!\n\x0c\n\x04\x04\x0f\x02\x07\x12\x04\xda\x02\x02'\n\r\n\ - \x05\x04\x0f\x02\x07\x04\x12\x04\xda\x02\x02\n\n\r\n\x05\x04\x0f\x02\x07\ - \x05\x12\x04\xda\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x07\x01\x12\x04\xda\ - \x02\x11!\n\r\n\x05\x04\x0f\x02\x07\x03\x12\x04\xda\x02$&\n\x0c\n\x02\ - \x04\x10\x12\x06\xdd\x02\0\xe9\x02\x01\n\x0b\n\x03\x04\x10\x01\x12\x04\ - \xdd\x02\x08\x14\n9\n\x04\x04\x10\x02\0\x12\x04\xde\x02\x04.\"+\x20how\ - \x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\x05\x04\ - \x10\x02\0\x04\x12\x04\xde\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\x05\x12\ - \x04\xde\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xde\x02\x14(\n\r\ - \n\x05\x04\x10\x02\0\x03\x12\x04\xde\x02+-\nm\n\x04\x04\x10\x02\x01\x12\ - \x04\xe3\x02\x04/\x1a\x1e\x20Applicable\x20to\x20whole\x20session:\n\"\ - \x1a\x20includes\x20failed\x20attempts\n2#\x20Timings\x20below\x20are\ - \x20in\x20milliseconds\n\n\r\n\x05\x04\x10\x02\x01\x04\x12\x04\xe3\x02\ - \x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xe3\x02\r\x13\n\r\n\x05\ - \x04\x10\x02\x01\x01\x12\x04\xe3\x02\x14)\n\r\n\x05\x04\x10\x02\x01\x03\ - \x12\x04\xe3\x02,.\nR\n\x04\x04\x10\x02\x02\x12\x04\xe6\x02\x04(\x1a\x1f\ - \x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20during\ - \x20initial\x20handshake\n\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xe6\x02\ - \x04\x0c\n\r\n\x05\x04\x10\x02\x02\x05\x12\x04\xe6\x02\r\x13\n\r\n\x05\ - \x04\x10\x02\x02\x01\x12\x04\xe6\x02\x14\"\n\r\n\x05\x04\x10\x02\x02\x03\ - \x12\x04\xe6\x02%'\n%\n\x04\x04\x10\x02\x03\x12\x04\xe7\x02\x04&\"\x17\ - \x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x10\x02\x03\x04\x12\ - \x04\xe7\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x05\x12\x04\xe7\x02\r\x13\ - \n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xe7\x02\x14\x20\n\r\n\x05\x04\x10\ - \x02\x03\x03\x12\x04\xe7\x02#%\nB\n\x04\x04\x10\x02\x04\x12\x04\xe8\x02\ - \x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\x20to\ - \x20decot\n\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xe8\x02\x04\x0c\n\r\n\ - \x05\x04\x10\x02\x04\x05\x12\x04\xe8\x02\r\x13\n\r\n\x05\x04\x10\x02\x04\ - \x01\x12\x04\xe8\x02\x14\x20\n\r\n\x05\x04\x10\x02\x04\x03\x12\x04\xe8\ - \x02#%\n\x0c\n\x02\x05\x07\x12\x06\xeb\x02\0\xf0\x02\x01\n\x0b\n\x03\x05\ - \x07\x01\x12\x04\xeb\x02\x05\x16\n\x0c\n\x04\x05\x07\x02\0\x12\x04\xec\ - \x02\x04\x10\n\r\n\x05\x05\x07\x02\0\x01\x12\x04\xec\x02\x04\x0b\n\r\n\ - \x05\x05\x07\x02\0\x02\x12\x04\xec\x02\x0e\x0f\n\x0c\n\x04\x05\x07\x02\ - \x01\x12\x04\xed\x02\x04\x0c\n\r\n\x05\x05\x07\x02\x01\x01\x12\x04\xed\ - \x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\x02\x12\x04\xed\x02\n\x0b\n\x0c\n\ - \x04\x05\x07\x02\x02\x12\x04\xee\x02\x04\x0f\n\r\n\x05\x05\x07\x02\x02\ - \x01\x12\x04\xee\x02\x04\n\n\r\n\x05\x05\x07\x02\x02\x02\x12\x04\xee\x02\ - \r\x0e\n\x0c\n\x04\x05\x07\x02\x03\x12\x04\xef\x02\x04\x0e\n\r\n\x05\x05\ - \x07\x02\x03\x01\x12\x04\xef\x02\x04\t\n\r\n\x05\x05\x07\x02\x03\x02\x12\ - \x04\xef\x02\x0c\r\n\x0c\n\x02\x05\x08\x12\x06\xf2\x02\0\xf6\x02\x01\n\ - \x0b\n\x03\x05\x08\x01\x12\x04\xf2\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\0\ - \x12\x04\xf3\x02\x04\x0c\n\r\n\x05\x05\x08\x02\0\x01\x12\x04\xf3\x02\x04\ - \x07\n\r\n\x05\x05\x08\x02\0\x02\x12\x04\xf3\x02\n\x0b\n\x0c\n\x04\x05\ - \x08\x02\x01\x12\x04\xf4\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\x12\ - \x04\xf4\x02\x04\x07\n\r\n\x05\x05\x08\x02\x01\x02\x12\x04\xf4\x02\n\x0b\ - \n\x0c\n\x04\x05\x08\x02\x02\x12\x04\xf5\x02\x04\x0c\n\r\n\x05\x05\x08\ - \x02\x02\x01\x12\x04\xf5\x02\x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\x12\ - \x04\xf5\x02\n\x0b\n\x0c\n\x02\x04\x11\x12\x06\xf8\x02\0\x83\x03\x01\n\ - \x0b\n\x03\x04\x11\x01\x12\x04\xf8\x02\x08\x19\n\x0c\n\x04\x04\x11\x02\0\ - \x12\x04\xf9\x02\x04#\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xf9\x02\x04\ - \x0c\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xf9\x02\r\x13\n\r\n\x05\x04\x11\ - \x02\0\x01\x12\x04\xf9\x02\x14\x1e\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\ - \xf9\x02!\"\n\x0c\n\x04\x04\x11\x02\x01\x12\x04\xfa\x02\x04\"\n\r\n\x05\ - \x04\x11\x02\x01\x04\x12\x04\xfa\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x01\ - \x05\x12\x04\xfa\x02\r\x13\n\r\n\x05\x04\x11\x02\x01\x01\x12\x04\xfa\x02\ - \x14\x1d\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xfa\x02\x20!\n\x0c\n\x04\ - \x04\x11\x02\x02\x12\x04\xfc\x02\x04#\n\r\n\x05\x04\x11\x02\x02\x04\x12\ - \x04\xfc\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xfc\x02\r\x13\ - \n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xfc\x02\x14\x1e\n\r\n\x05\x04\x11\ - \x02\x02\x03\x12\x04\xfc\x02!\"\n\x0c\n\x04\x04\x11\x02\x03\x12\x04\xfe\ - \x02\x04-\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xfe\x02\x04\x0c\n\r\n\ - \x05\x04\x11\x02\x03\x06\x12\x04\xfe\x02\r\x1e\n\r\n\x05\x04\x11\x02\x03\ - \x01\x12\x04\xfe\x02\x1f(\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\xfe\x02+\ - ,\n\x0c\n\x04\x04\x11\x02\x04\x12\x04\x80\x03\x04\"\n\r\n\x05\x04\x11\ - \x02\x04\x04\x12\x04\x80\x03\x04\x0c\n\r\n\x05\x04\x11\x02\x04\x05\x12\ - \x04\x80\x03\r\x13\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\x80\x03\x14\x1c\ - \n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\x80\x03\x1f!\n\x0c\n\x04\x04\x11\ - \x02\x05\x12\x04\x81\x03\x04\"\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\x81\ - \x03\x04\x0c\n\r\n\x05\x04\x11\x02\x05\x05\x12\x04\x81\x03\r\x13\n\r\n\ - \x05\x04\x11\x02\x05\x01\x12\x04\x81\x03\x14\x1c\n\r\n\x05\x04\x11\x02\ - \x05\x03\x12\x04\x81\x03\x1f!\n\x0c\n\x04\x04\x11\x02\x06\x12\x04\x82\ - \x03\x04\x20\n\r\n\x05\x04\x11\x02\x06\x04\x12\x04\x82\x03\x04\x0c\n\r\n\ - \x05\x04\x11\x02\x06\x06\x12\x04\x82\x03\r\x14\n\r\n\x05\x04\x11\x02\x06\ - \x01\x12\x04\x82\x03\x15\x1a\n\r\n\x05\x04\x11\x02\x06\x03\x12\x04\x82\ - \x03\x1d\x1f\nT\n\x02\x04\x12\x12\x06\x86\x03\0\x9a\x03\x01\x1aF\x20Addi\ + \x1c\x1d\n\x0c\n\x04\x04\r\x02\x02\x12\x04\xa6\x02\x04)\n\r\n\x05\x04\r\ + \x02\x02\x04\x12\x04\xa6\x02\x04\x0c\n\r\n\x05\x04\r\x02\x02\x05\x12\x04\ + \xa6\x02\r\x11\n\r\n\x05\x04\r\x02\x02\x01\x12\x04\xa6\x02\x12$\n\r\n\ + \x05\x04\r\x02\x02\x03\x12\x04\xa6\x02'(\n\xed\x02\n\x04\x04\r\x02\x03\ + \x12\x04\xb0\x02\x04*\x1a\xbc\x01\x20Indicates\x20whether\x20the\x20clie\ + nt\x20has\x20elected\x20to\x20use\x20destination\x20port\x20randomizatio\ + n.\x20Should\x20be\n\x20checked\x20against\x20selected\x20transport\x20t\ + o\x20ensure\x20that\x20destination\x20port\x20randomization\x20is\n\x20s\ + upported.\n2\x9f\x01\x20//\x20potential\x20future\x20fields\n\x20obfusca\ + tor\x20ID\n\x20tagEncoder\x20ID\x20(¶ms?,\x20e.g.\x20format-base64\ + \x20/\x20padding)\n\x20streamEncoder\x20ID\x20(¶ms?,\x20e.g.\x20fora\ + mat-base64\x20/\x20padding)\n\n\r\n\x05\x04\r\x02\x03\x04\x12\x04\xb0\ + \x02\x04\x0c\n\r\n\x05\x04\r\x02\x03\x05\x12\x04\xb0\x02\r\x11\n\r\n\x05\ + \x04\r\x02\x03\x01\x12\x04\xb0\x02\x12$\n\r\n\x05\x04\r\x02\x03\x03\x12\ + \x04\xb0\x02')\n\x0c\n\x02\x04\x0e\x12\x06\xb3\x02\0\xb8\x02\x01\n\x0b\n\ + \x03\x04\x0e\x01\x12\x04\xb3\x02\x08\x1e\n\xcb\x01\n\x04\x04\x0e\x02\0\ + \x12\x04\xb7\x02\x04*\x1a\xbc\x01\x20Indicates\x20whether\x20the\x20clie\ + nt\x20has\x20elected\x20to\x20use\x20destination\x20port\x20randomizatio\ + n.\x20Should\x20be\n\x20checked\x20against\x20selected\x20transport\x20t\ + o\x20ensure\x20that\x20destination\x20port\x20randomization\x20is\n\x20s\ + upported.\n\n\r\n\x05\x04\x0e\x02\0\x04\x12\x04\xb7\x02\x04\x0c\n\r\n\ + \x05\x04\x0e\x02\0\x05\x12\x04\xb7\x02\r\x11\n\r\n\x05\x04\x0e\x02\0\x01\ + \x12\x04\xb7\x02\x12$\n\r\n\x05\x04\x0e\x02\0\x03\x12\x04\xb7\x02')\n\ + \x0c\n\x02\x05\x06\x12\x06\xba\x02\0\xc2\x02\x01\n\x0b\n\x03\x05\x06\x01\ + \x12\x04\xba\x02\x05\x17\n\x0c\n\x04\x05\x06\x02\0\x12\x04\xbb\x02\x02\ + \x12\n\r\n\x05\x05\x06\x02\0\x01\x12\x04\xbb\x02\x02\r\n\r\n\x05\x05\x06\ + \x02\0\x02\x12\x04\xbb\x02\x10\x11\n\x0c\n\x04\x05\x06\x02\x01\x12\x04\ + \xbc\x02\x08\x15\n\r\n\x05\x05\x06\x02\x01\x01\x12\x04\xbc\x02\x08\x10\n\ + \r\n\x05\x05\x06\x02\x01\x02\x12\x04\xbc\x02\x13\x14\n\x0c\n\x04\x05\x06\ + \x02\x02\x12\x04\xbd\x02\x08\x10\n\r\n\x05\x05\x06\x02\x02\x01\x12\x04\ + \xbd\x02\x08\x0b\n\r\n\x05\x05\x06\x02\x02\x02\x12\x04\xbd\x02\x0e\x0f\n\ + \x0c\n\x04\x05\x06\x02\x03\x12\x04\xbe\x02\x02\x16\n\r\n\x05\x05\x06\x02\ + \x03\x01\x12\x04\xbe\x02\x02\x11\n\r\n\x05\x05\x06\x02\x03\x02\x12\x04\ + \xbe\x02\x14\x15\n\x0c\n\x04\x05\x06\x02\x04\x12\x04\xbf\x02\x02\x17\n\r\ + \n\x05\x05\x06\x02\x04\x01\x12\x04\xbf\x02\x02\x12\n\r\n\x05\x05\x06\x02\ + \x04\x02\x12\x04\xbf\x02\x15\x16\n\x0c\n\x04\x05\x06\x02\x05\x12\x04\xc0\ + \x02\x02\n\n\r\n\x05\x05\x06\x02\x05\x01\x12\x04\xc0\x02\x02\x05\n\r\n\ + \x05\x05\x06\x02\x05\x02\x12\x04\xc0\x02\x08\t\n\x0c\n\x04\x05\x06\x02\ + \x06\x12\x04\xc1\x02\x02\x17\n\r\n\x05\x05\x06\x02\x06\x01\x12\x04\xc1\ + \x02\x02\x12\n\r\n\x05\x05\x06\x02\x06\x02\x12\x04\xc1\x02\x15\x16\n\x0c\ + \n\x02\x04\x0f\x12\x06\xc4\x02\0\xdc\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\ + \x04\xc4\x02\x08\x12\n\x0c\n\x04\x04\x0f\x02\0\x12\x04\xc5\x02\x02#\n\r\ + \n\x05\x04\x0f\x02\0\x04\x12\x04\xc5\x02\x02\n\n\r\n\x05\x04\x0f\x02\0\ + \x05\x12\x04\xc5\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\0\x01\x12\x04\xc5\x02\ + \x11\x1e\n\r\n\x05\x04\x0f\x02\0\x03\x12\x04\xc5\x02!\"\n\x0c\n\x04\x04\ + \x0f\x02\x01\x12\x04\xc6\x02\x024\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\ + \xc6\x02\x02\n\n\r\n\x05\x04\x0f\x02\x01\x06\x12\x04\xc6\x02\x0b\x1a\n\r\ + \n\x05\x04\x0f\x02\x01\x01\x12\x04\xc6\x02\x1b/\n\r\n\x05\x04\x0f\x02\ + \x01\x03\x12\x04\xc6\x0223\n\x0c\n\x04\x04\x0f\x02\x02\x12\x04\xc7\x02\ + \x026\n\r\n\x05\x04\x0f\x02\x02\x04\x12\x04\xc7\x02\x02\n\n\r\n\x05\x04\ + \x0f\x02\x02\x06\x12\x04\xc7\x02\x0b\x1d\n\r\n\x05\x04\x0f\x02\x02\x01\ + \x12\x04\xc7\x02\x1e1\n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xc7\x0245\nC\ + \n\x04\x04\x0f\x02\x03\x12\x04\xca\x02\x02*\x1a5\x20client\x20source\x20\ + address\x20when\x20receiving\x20a\x20registration\n\n\r\n\x05\x04\x0f\ + \x02\x03\x04\x12\x04\xca\x02\x02\n\n\r\n\x05\x04\x0f\x02\x03\x05\x12\x04\ + \xca\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x03\x01\x12\x04\xca\x02\x11%\n\r\ + \n\x05\x04\x0f\x02\x03\x03\x12\x04\xca\x02()\nH\n\x04\x04\x0f\x02\x04\ + \x12\x04\xcd\x02\x02#\x1a:\x20Decoy\x20address\x20used\x20when\x20regist\ + ering\x20over\x20Decoy\x20registrar\n\n\r\n\x05\x04\x0f\x02\x04\x04\x12\ + \x04\xcd\x02\x02\n\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\xcd\x02\x0b\x10\ + \n\r\n\x05\x04\x0f\x02\x04\x01\x12\x04\xcd\x02\x11\x1e\n\r\n\x05\x04\x0f\ + \x02\x04\x03\x12\x04\xcd\x02!\"\n\xeb\x05\n\x04\x04\x0f\x02\x05\x12\x04\ + \xd9\x02\x02:\x1a\xdc\x05\x20The\x20next\x20three\x20fields\x20allow\x20\ + an\x20independent\x20registrar\x20(trusted\x20by\x20a\x20station\x20w/\ + \x20a\x20zmq\x20keypair)\x20to\n\x20share\x20the\x20registration\x20over\ + rides\x20that\x20it\x20assigned\x20to\x20the\x20client\x20with\x20the\ + \x20station(s).\n\x20Registration\x20Respose\x20is\x20here\x20to\x20allo\ + w\x20a\x20parsed\x20object\x20with\x20direct\x20access\x20to\x20the\x20f\ + ields\x20within.\n\x20RegRespBytes\x20provides\x20a\x20serialized\x20ver\ + ion\x20of\x20the\x20Registration\x20response\x20so\x20that\x20the\x20sig\ + nature\x20of\n\x20the\x20Bidirectional\x20registrar\x20can\x20be\x20vali\ + dated\x20before\x20a\x20station\x20applies\x20any\x20overrides\x20presen\ + t\x20in\n\x20the\x20Registration\x20Response.\n\n\x20If\x20you\x20are\ + \x20reading\x20this\x20in\x20the\x20future\x20and\x20you\x20want\x20to\ + \x20extend\x20the\x20functionality\x20here\x20it\x20might\n\x20make\x20s\ + ense\x20to\x20make\x20the\x20RegistrationResponse\x20that\x20is\x20sent\ + \x20to\x20the\x20client\x20a\x20distinct\x20message\x20from\n\x20the\x20\ + one\x20that\x20gets\x20sent\x20to\x20the\x20stations.\n\n\r\n\x05\x04\ + \x0f\x02\x05\x04\x12\x04\xd9\x02\x02\n\n\r\n\x05\x04\x0f\x02\x05\x06\x12\ + \x04\xd9\x02\x0b\x1f\n\r\n\x05\x04\x0f\x02\x05\x01\x12\x04\xd9\x02\x205\ + \n\r\n\x05\x04\x0f\x02\x05\x03\x12\x04\xd9\x0289\n\x0c\n\x04\x04\x0f\x02\ + \x06\x12\x04\xda\x02\x02\"\n\r\n\x05\x04\x0f\x02\x06\x04\x12\x04\xda\x02\ + \x02\n\n\r\n\x05\x04\x0f\x02\x06\x05\x12\x04\xda\x02\x0b\x10\n\r\n\x05\ + \x04\x0f\x02\x06\x01\x12\x04\xda\x02\x11\x1d\n\r\n\x05\x04\x0f\x02\x06\ + \x03\x12\x04\xda\x02\x20!\n\x0c\n\x04\x04\x0f\x02\x07\x12\x04\xdb\x02\ + \x02'\n\r\n\x05\x04\x0f\x02\x07\x04\x12\x04\xdb\x02\x02\n\n\r\n\x05\x04\ + \x0f\x02\x07\x05\x12\x04\xdb\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x07\x01\ + \x12\x04\xdb\x02\x11!\n\r\n\x05\x04\x0f\x02\x07\x03\x12\x04\xdb\x02$&\n\ + \x0c\n\x02\x04\x10\x12\x06\xde\x02\0\xea\x02\x01\n\x0b\n\x03\x04\x10\x01\ + \x12\x04\xde\x02\x08\x14\n9\n\x04\x04\x10\x02\0\x12\x04\xdf\x02\x04.\"+\ + \x20how\x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\ + \x05\x04\x10\x02\0\x04\x12\x04\xdf\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\ + \x05\x12\x04\xdf\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xdf\x02\ + \x14(\n\r\n\x05\x04\x10\x02\0\x03\x12\x04\xdf\x02+-\nm\n\x04\x04\x10\x02\ + \x01\x12\x04\xe4\x02\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\x10\x02\x01\x04\x12\x04\xe4\ + \x02\x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xe4\x02\r\x13\n\r\n\ + \x05\x04\x10\x02\x01\x01\x12\x04\xe4\x02\x14)\n\r\n\x05\x04\x10\x02\x01\ + \x03\x12\x04\xe4\x02,.\nR\n\x04\x04\x10\x02\x02\x12\x04\xe7\x02\x04(\x1a\ + \x1f\x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20durin\ + g\x20initial\x20handshake\n\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xe7\ + \x02\x04\x0c\n\r\n\x05\x04\x10\x02\x02\x05\x12\x04\xe7\x02\r\x13\n\r\n\ + \x05\x04\x10\x02\x02\x01\x12\x04\xe7\x02\x14\"\n\r\n\x05\x04\x10\x02\x02\ + \x03\x12\x04\xe7\x02%'\n%\n\x04\x04\x10\x02\x03\x12\x04\xe8\x02\x04&\"\ + \x17\x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x10\x02\x03\x04\ + \x12\x04\xe8\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x05\x12\x04\xe8\x02\r\ + \x13\n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xe8\x02\x14\x20\n\r\n\x05\x04\ + \x10\x02\x03\x03\x12\x04\xe8\x02#%\nB\n\x04\x04\x10\x02\x04\x12\x04\xe9\ + \x02\x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\ + \x20to\x20decot\n\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xe9\x02\x04\x0c\ + \n\r\n\x05\x04\x10\x02\x04\x05\x12\x04\xe9\x02\r\x13\n\r\n\x05\x04\x10\ + \x02\x04\x01\x12\x04\xe9\x02\x14\x20\n\r\n\x05\x04\x10\x02\x04\x03\x12\ + \x04\xe9\x02#%\n\x0c\n\x02\x05\x07\x12\x06\xec\x02\0\xf1\x02\x01\n\x0b\n\ + \x03\x05\x07\x01\x12\x04\xec\x02\x05\x16\n\x0c\n\x04\x05\x07\x02\0\x12\ + \x04\xed\x02\x04\x10\n\r\n\x05\x05\x07\x02\0\x01\x12\x04\xed\x02\x04\x0b\ + \n\r\n\x05\x05\x07\x02\0\x02\x12\x04\xed\x02\x0e\x0f\n\x0c\n\x04\x05\x07\ + \x02\x01\x12\x04\xee\x02\x04\x0c\n\r\n\x05\x05\x07\x02\x01\x01\x12\x04\ + \xee\x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\x02\x12\x04\xee\x02\n\x0b\n\ + \x0c\n\x04\x05\x07\x02\x02\x12\x04\xef\x02\x04\x0f\n\r\n\x05\x05\x07\x02\ + \x02\x01\x12\x04\xef\x02\x04\n\n\r\n\x05\x05\x07\x02\x02\x02\x12\x04\xef\ + \x02\r\x0e\n\x0c\n\x04\x05\x07\x02\x03\x12\x04\xf0\x02\x04\x0e\n\r\n\x05\ + \x05\x07\x02\x03\x01\x12\x04\xf0\x02\x04\t\n\r\n\x05\x05\x07\x02\x03\x02\ + \x12\x04\xf0\x02\x0c\r\n\x0c\n\x02\x05\x08\x12\x06\xf3\x02\0\xf7\x02\x01\ + \n\x0b\n\x03\x05\x08\x01\x12\x04\xf3\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\ + \0\x12\x04\xf4\x02\x04\x0c\n\r\n\x05\x05\x08\x02\0\x01\x12\x04\xf4\x02\ + \x04\x07\n\r\n\x05\x05\x08\x02\0\x02\x12\x04\xf4\x02\n\x0b\n\x0c\n\x04\ + \x05\x08\x02\x01\x12\x04\xf5\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\ + \x12\x04\xf5\x02\x04\x07\n\r\n\x05\x05\x08\x02\x01\x02\x12\x04\xf5\x02\n\ + \x0b\n\x0c\n\x04\x05\x08\x02\x02\x12\x04\xf6\x02\x04\x0c\n\r\n\x05\x05\ + \x08\x02\x02\x01\x12\x04\xf6\x02\x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\ + \x12\x04\xf6\x02\n\x0b\n\x0c\n\x02\x04\x11\x12\x06\xf9\x02\0\x84\x03\x01\ + \n\x0b\n\x03\x04\x11\x01\x12\x04\xf9\x02\x08\x19\n\x0c\n\x04\x04\x11\x02\ + \0\x12\x04\xfa\x02\x04#\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xfa\x02\x04\ + \x0c\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xfa\x02\r\x13\n\r\n\x05\x04\x11\ + \x02\0\x01\x12\x04\xfa\x02\x14\x1e\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\ + \xfa\x02!\"\n\x0c\n\x04\x04\x11\x02\x01\x12\x04\xfb\x02\x04\"\n\r\n\x05\ + \x04\x11\x02\x01\x04\x12\x04\xfb\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x01\ + \x05\x12\x04\xfb\x02\r\x13\n\r\n\x05\x04\x11\x02\x01\x01\x12\x04\xfb\x02\ + \x14\x1d\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xfb\x02\x20!\n\x0c\n\x04\ + \x04\x11\x02\x02\x12\x04\xfd\x02\x04#\n\r\n\x05\x04\x11\x02\x02\x04\x12\ + \x04\xfd\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xfd\x02\r\x13\ + \n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xfd\x02\x14\x1e\n\r\n\x05\x04\x11\ + \x02\x02\x03\x12\x04\xfd\x02!\"\n\x0c\n\x04\x04\x11\x02\x03\x12\x04\xff\ + \x02\x04-\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xff\x02\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x03\x06\x12\x04\xff\x02\r\x1e\n\r\n\x05\x04\x11\x02\x03\ + \x01\x12\x04\xff\x02\x1f(\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\xff\x02+\ + ,\n\x0c\n\x04\x04\x11\x02\x04\x12\x04\x81\x03\x04\"\n\r\n\x05\x04\x11\ + \x02\x04\x04\x12\x04\x81\x03\x04\x0c\n\r\n\x05\x04\x11\x02\x04\x05\x12\ + \x04\x81\x03\r\x13\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\x81\x03\x14\x1c\ + \n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\x81\x03\x1f!\n\x0c\n\x04\x04\x11\ + \x02\x05\x12\x04\x82\x03\x04\"\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\x82\ + \x03\x04\x0c\n\r\n\x05\x04\x11\x02\x05\x05\x12\x04\x82\x03\r\x13\n\r\n\ + \x05\x04\x11\x02\x05\x01\x12\x04\x82\x03\x14\x1c\n\r\n\x05\x04\x11\x02\ + \x05\x03\x12\x04\x82\x03\x1f!\n\x0c\n\x04\x04\x11\x02\x06\x12\x04\x83\ + \x03\x04\x20\n\r\n\x05\x04\x11\x02\x06\x04\x12\x04\x83\x03\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x06\x06\x12\x04\x83\x03\r\x14\n\r\n\x05\x04\x11\x02\x06\ + \x01\x12\x04\x83\x03\x15\x1a\n\r\n\x05\x04\x11\x02\x06\x03\x12\x04\x83\ + \x03\x1d\x1f\nT\n\x02\x04\x12\x12\x06\x87\x03\0\x9b\x03\x01\x1aF\x20Addi\ ng\x20message\x20response\x20from\x20Station\x20to\x20Client\x20for\x20b\ - idirectional\x20API\n\n\x0b\n\x03\x04\x12\x01\x12\x04\x86\x03\x08\x1c\n\ - \x0c\n\x04\x04\x12\x02\0\x12\x04\x87\x03\x02\x20\n\r\n\x05\x04\x12\x02\0\ - \x04\x12\x04\x87\x03\x02\n\n\r\n\x05\x04\x12\x02\0\x05\x12\x04\x87\x03\ - \x0b\x12\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\x87\x03\x13\x1b\n\r\n\x05\ - \x04\x12\x02\0\x03\x12\x04\x87\x03\x1e\x1f\n?\n\x04\x04\x12\x02\x01\x12\ - \x04\x89\x03\x02\x1e\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\ - \x20network\x20byte\x20order\n\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\x89\ - \x03\x02\n\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\x89\x03\x0b\x10\n\r\n\ - \x05\x04\x12\x02\x01\x01\x12\x04\x89\x03\x11\x19\n\r\n\x05\x04\x12\x02\ - \x01\x03\x12\x04\x89\x03\x1c\x1d\n,\n\x04\x04\x12\x02\x02\x12\x04\x8c\ + idirectional\x20API\n\n\x0b\n\x03\x04\x12\x01\x12\x04\x87\x03\x08\x1c\n\ + \x0c\n\x04\x04\x12\x02\0\x12\x04\x88\x03\x02\x20\n\r\n\x05\x04\x12\x02\0\ + \x04\x12\x04\x88\x03\x02\n\n\r\n\x05\x04\x12\x02\0\x05\x12\x04\x88\x03\ + \x0b\x12\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\x88\x03\x13\x1b\n\r\n\x05\ + \x04\x12\x02\0\x03\x12\x04\x88\x03\x1e\x1f\n?\n\x04\x04\x12\x02\x01\x12\ + \x04\x8a\x03\x02\x1e\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\ + \x20network\x20byte\x20order\n\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\x8a\ + \x03\x02\n\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\x8a\x03\x0b\x10\n\r\n\ + \x05\x04\x12\x02\x01\x01\x12\x04\x8a\x03\x11\x19\n\r\n\x05\x04\x12\x02\ + \x01\x03\x12\x04\x8a\x03\x1c\x1d\n,\n\x04\x04\x12\x02\x02\x12\x04\x8d\ \x03\x02\x1f\x1a\x1e\x20Respond\x20with\x20randomized\x20port\n\n\r\n\ - \x05\x04\x12\x02\x02\x04\x12\x04\x8c\x03\x02\n\n\r\n\x05\x04\x12\x02\x02\ - \x05\x12\x04\x8c\x03\x0b\x11\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\x8c\ - \x03\x12\x1a\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\x8c\x03\x1d\x1e\nd\n\ - \x04\x04\x12\x02\x03\x12\x04\x90\x03\x02\"\x1aV\x20Future:\x20station\ + \x05\x04\x12\x02\x02\x04\x12\x04\x8d\x03\x02\n\n\r\n\x05\x04\x12\x02\x02\ + \x05\x12\x04\x8d\x03\x0b\x11\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\x8d\ + \x03\x12\x1a\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\x8d\x03\x1d\x1e\nd\n\ + \x04\x04\x12\x02\x03\x12\x04\x91\x03\x02\"\x1aV\x20Future:\x20station\ \x20provides\x20client\x20with\x20secret,\x20want\x20chanel\x20present\n\ \x20Leave\x20null\x20for\x20now\n\n\r\n\x05\x04\x12\x02\x03\x04\x12\x04\ - \x90\x03\x02\n\n\r\n\x05\x04\x12\x02\x03\x05\x12\x04\x90\x03\x0b\x10\n\r\ - \n\x05\x04\x12\x02\x03\x01\x12\x04\x90\x03\x11\x1d\n\r\n\x05\x04\x12\x02\ - \x03\x03\x12\x04\x90\x03\x20!\nA\n\x04\x04\x12\x02\x04\x12\x04\x93\x03\ + \x91\x03\x02\n\n\r\n\x05\x04\x12\x02\x03\x05\x12\x04\x91\x03\x0b\x10\n\r\ + \n\x05\x04\x12\x02\x03\x01\x12\x04\x91\x03\x11\x1d\n\r\n\x05\x04\x12\x02\ + \x03\x03\x12\x04\x91\x03\x20!\nA\n\x04\x04\x12\x02\x04\x12\x04\x94\x03\ \x02\x1c\x1a3\x20If\x20registration\x20wrong,\x20populate\x20this\x20err\ - or\x20string\n\n\r\n\x05\x04\x12\x02\x04\x04\x12\x04\x93\x03\x02\n\n\r\n\ - \x05\x04\x12\x02\x04\x05\x12\x04\x93\x03\x0b\x11\n\r\n\x05\x04\x12\x02\ - \x04\x01\x12\x04\x93\x03\x12\x17\n\r\n\x05\x04\x12\x02\x04\x03\x12\x04\ - \x93\x03\x1a\x1b\n+\n\x04\x04\x12\x02\x05\x12\x04\x96\x03\x02%\x1a\x1d\ + or\x20string\n\n\r\n\x05\x04\x12\x02\x04\x04\x12\x04\x94\x03\x02\n\n\r\n\ + \x05\x04\x12\x02\x04\x05\x12\x04\x94\x03\x0b\x11\n\r\n\x05\x04\x12\x02\ + \x04\x01\x12\x04\x94\x03\x12\x17\n\r\n\x05\x04\x12\x02\x04\x03\x12\x04\ + \x94\x03\x1a\x1b\n+\n\x04\x04\x12\x02\x05\x12\x04\x97\x03\x02%\x1a\x1d\ \x20ClientConf\x20field\x20(optional)\n\n\r\n\x05\x04\x12\x02\x05\x04\ - \x12\x04\x96\x03\x02\n\n\r\n\x05\x04\x12\x02\x05\x06\x12\x04\x96\x03\x0b\ - \x15\n\r\n\x05\x04\x12\x02\x05\x01\x12\x04\x96\x03\x16\x20\n\r\n\x05\x04\ - \x12\x02\x05\x03\x12\x04\x96\x03#$\nJ\n\x04\x04\x12\x02\x06\x12\x04\x99\ + \x12\x04\x97\x03\x02\n\n\r\n\x05\x04\x12\x02\x05\x06\x12\x04\x97\x03\x0b\ + \x15\n\r\n\x05\x04\x12\x02\x05\x01\x12\x04\x97\x03\x16\x20\n\r\n\x05\x04\ + \x12\x02\x05\x03\x12\x04\x97\x03#$\nJ\n\x04\x04\x12\x02\x06\x12\x04\x9a\ \x03\x025\x1a<\x20Transport\x20Params\x20to\x20if\x20`allow_registrar_ov\ - errides`\x20is\x20set.\n\n\r\n\x05\x04\x12\x02\x06\x04\x12\x04\x99\x03\ - \x02\n\n\r\n\x05\x04\x12\x02\x06\x06\x12\x04\x99\x03\x0b\x1e\n\r\n\x05\ - \x04\x12\x02\x06\x01\x12\x04\x99\x03\x1f/\n\r\n\x05\x04\x12\x02\x06\x03\ - \x12\x04\x99\x0324\n!\n\x02\x04\x13\x12\x06\x9d\x03\0\xa1\x03\x01\x1a\ - \x13\x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x13\x01\x12\x04\x9d\ - \x03\x08\x13\n\x0c\n\x04\x04\x13\x02\0\x12\x04\x9e\x03\x04\x1e\n\r\n\x05\ - \x04\x13\x02\0\x04\x12\x04\x9e\x03\x04\x0c\n\r\n\x05\x04\x13\x02\0\x05\ - \x12\x04\x9e\x03\r\x11\n\r\n\x05\x04\x13\x02\0\x01\x12\x04\x9e\x03\x12\ - \x19\n\r\n\x05\x04\x13\x02\0\x03\x12\x04\x9e\x03\x1c\x1d\n\x0c\n\x04\x04\ - \x13\x02\x01\x12\x04\x9f\x03\x04*\n\r\n\x05\x04\x13\x02\x01\x04\x12\x04\ - \x9f\x03\x04\x0c\n\r\n\x05\x04\x13\x02\x01\x05\x12\x04\x9f\x03\r\x11\n\r\ - \n\x05\x04\x13\x02\x01\x01\x12\x04\x9f\x03\x12%\n\r\n\x05\x04\x13\x02\ - \x01\x03\x12\x04\x9f\x03()\n\x0c\n\x04\x04\x13\x02\x02\x12\x04\xa0\x03\ - \x04=\n\r\n\x05\x04\x13\x02\x02\x04\x12\x04\xa0\x03\x04\x0c\n\r\n\x05\ - \x04\x13\x02\x02\x06\x12\x04\xa0\x03\r!\n\r\n\x05\x04\x13\x02\x02\x01\ - \x12\x04\xa0\x03\"8\n\r\n\x05\x04\x13\x02\x02\x03\x12\x04\xa0\x03;<\ + errides`\x20is\x20set.\n\n\r\n\x05\x04\x12\x02\x06\x04\x12\x04\x9a\x03\ + \x02\n\n\r\n\x05\x04\x12\x02\x06\x06\x12\x04\x9a\x03\x0b\x1e\n\r\n\x05\ + \x04\x12\x02\x06\x01\x12\x04\x9a\x03\x1f/\n\r\n\x05\x04\x12\x02\x06\x03\ + \x12\x04\x9a\x0324\n!\n\x02\x04\x13\x12\x06\x9e\x03\0\xa2\x03\x01\x1a\ + \x13\x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x13\x01\x12\x04\x9e\ + \x03\x08\x13\n\x0c\n\x04\x04\x13\x02\0\x12\x04\x9f\x03\x04\x1e\n\r\n\x05\ + \x04\x13\x02\0\x04\x12\x04\x9f\x03\x04\x0c\n\r\n\x05\x04\x13\x02\0\x05\ + \x12\x04\x9f\x03\r\x11\n\r\n\x05\x04\x13\x02\0\x01\x12\x04\x9f\x03\x12\ + \x19\n\r\n\x05\x04\x13\x02\0\x03\x12\x04\x9f\x03\x1c\x1d\n\x0c\n\x04\x04\ + \x13\x02\x01\x12\x04\xa0\x03\x04*\n\r\n\x05\x04\x13\x02\x01\x04\x12\x04\ + \xa0\x03\x04\x0c\n\r\n\x05\x04\x13\x02\x01\x05\x12\x04\xa0\x03\r\x11\n\r\ + \n\x05\x04\x13\x02\x01\x01\x12\x04\xa0\x03\x12%\n\r\n\x05\x04\x13\x02\ + \x01\x03\x12\x04\xa0\x03()\n\x0c\n\x04\x04\x13\x02\x02\x12\x04\xa1\x03\ + \x04=\n\r\n\x05\x04\x13\x02\x02\x04\x12\x04\xa1\x03\x04\x0c\n\r\n\x05\ + \x04\x13\x02\x02\x06\x12\x04\xa1\x03\r!\n\r\n\x05\x04\x13\x02\x02\x01\ + \x12\x04\xa1\x03\"8\n\r\n\x05\x04\x13\x02\x02\x03\x12\x04\xa1\x03;<\ "; /// `FileDescriptorProto` object which was a source for this generated file diff --git a/src/signalling.rs b/src/signalling.rs index 6a5c31b1..c8bc94cd 100644 --- a/src/signalling.rs +++ b/src/signalling.rs @@ -26,16 +26,16 @@ const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PubKey) +// @@protoc_insertion_point(message:tapdance.PubKey) pub struct PubKey { // message fields /// A public key, as used by the station. - // @@protoc_insertion_point(field:conjure.PubKey.key) + // @@protoc_insertion_point(field:tapdance.PubKey.key) pub key: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.PubKey.type) + // @@protoc_insertion_point(field:tapdance.PubKey.type) pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:conjure.PubKey.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PubKey.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -86,7 +86,7 @@ impl PubKey { self.key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .conjure.KeyType type = 2; + // optional .tapdance.KeyType type = 2; pub fn type_(&self) -> KeyType { match self.type_ { @@ -225,37 +225,37 @@ impl ::protobuf::reflect::ProtobufValue for PubKey { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.TLSDecoySpec) +// @@protoc_insertion_point(message:tapdance.TLSDecoySpec) pub struct TLSDecoySpec { // message fields /// The hostname/SNI to use for this host /// /// The hostname is the only required field, although other /// fields are expected to be present in most cases. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.hostname) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.hostname) pub hostname: ::std::option::Option<::std::string::String>, /// The 32-bit ipv4 address, in network byte order /// /// If the IPv4 address is absent, then it may be resolved via /// DNS by the client, or the client may discard this decoy spec /// if local DNS is untrusted, or the service may be multihomed. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv4addr) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.ipv6addr) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// The Tapdance station public key to use when contacting this /// decoy /// /// If omitted, the default station public key (if any) is used. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.pubkey) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.pubkey) pub pubkey: ::protobuf::MessageField, /// The maximum duration, in milliseconds, to maintain an open /// connection to this decoy (because the decoy may close the /// connection itself after this length of time) /// /// If omitted, a default of 30,000 milliseconds is assumed. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.timeout) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.timeout) pub timeout: ::std::option::Option, /// The maximum TCP window size to attempt to use for this decoy. /// @@ -264,10 +264,10 @@ pub struct TLSDecoySpec { /// TODO: the default is based on the current heuristic of only /// using decoys that permit windows of 15KB or larger. If this /// heuristic changes, then this default doesn't make sense. - // @@protoc_insertion_point(field:conjure.TLSDecoySpec.tcpwin) + // @@protoc_insertion_point(field:tapdance.TLSDecoySpec.tcpwin) pub tcpwin: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.TLSDecoySpec.special_fields) + // @@protoc_insertion_point(special_field:tapdance.TLSDecoySpec.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -593,23 +593,23 @@ impl ::protobuf::reflect::ProtobufValue for TLSDecoySpec { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.ClientConf) +// @@protoc_insertion_point(message:tapdance.ClientConf) pub struct ClientConf { // message fields - // @@protoc_insertion_point(field:conjure.ClientConf.decoy_list) + // @@protoc_insertion_point(field:tapdance.ClientConf.decoy_list) pub decoy_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.generation) + // @@protoc_insertion_point(field:tapdance.ClientConf.generation) pub generation: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.ClientConf.default_pubkey) + // @@protoc_insertion_point(field:tapdance.ClientConf.default_pubkey) pub default_pubkey: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.phantom_subnets_list) + // @@protoc_insertion_point(field:tapdance.ClientConf.phantom_subnets_list) pub phantom_subnets_list: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.conjure_pubkey) + // @@protoc_insertion_point(field:tapdance.ClientConf.conjure_pubkey) pub conjure_pubkey: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.ClientConf.dns_reg_conf) + // @@protoc_insertion_point(field:tapdance.ClientConf.dns_reg_conf) pub dns_reg_conf: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:conjure.ClientConf.special_fields) + // @@protoc_insertion_point(special_field:tapdance.ClientConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -855,23 +855,23 @@ impl ::protobuf::reflect::ProtobufValue for ClientConf { /// Configuration for DNS registrar #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.DnsRegConf) +// @@protoc_insertion_point(message:tapdance.DnsRegConf) pub struct DnsRegConf { // message fields - // @@protoc_insertion_point(field:conjure.DnsRegConf.dns_reg_method) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.dns_reg_method) pub dns_reg_method: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.target) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.target) pub target: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.domain) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.domain) pub domain: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.pubkey) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.pubkey) pub pubkey: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.utls_distribution) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.utls_distribution) pub utls_distribution: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.DnsRegConf.stun_server) + // @@protoc_insertion_point(field:tapdance.DnsRegConf.stun_server) pub stun_server: ::std::option::Option<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:conjure.DnsRegConf.special_fields) + // @@protoc_insertion_point(special_field:tapdance.DnsRegConf.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -886,7 +886,7 @@ impl DnsRegConf { ::std::default::Default::default() } - // required .conjure.DnsRegMethod dns_reg_method = 1; + // required .tapdance.DnsRegMethod dns_reg_method = 1; pub fn dns_reg_method(&self) -> DnsRegMethod { match self.dns_reg_method { @@ -1275,13 +1275,13 @@ impl ::protobuf::reflect::ProtobufValue for DnsRegConf { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.DecoyList) +// @@protoc_insertion_point(message:tapdance.DecoyList) pub struct DecoyList { // message fields - // @@protoc_insertion_point(field:conjure.DecoyList.tls_decoys) + // @@protoc_insertion_point(field:tapdance.DecoyList.tls_decoys) pub tls_decoys: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:conjure.DecoyList.special_fields) + // @@protoc_insertion_point(special_field:tapdance.DecoyList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1398,13 +1398,13 @@ impl ::protobuf::reflect::ProtobufValue for DecoyList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PhantomSubnetsList) +// @@protoc_insertion_point(message:tapdance.PhantomSubnetsList) pub struct PhantomSubnetsList { // message fields - // @@protoc_insertion_point(field:conjure.PhantomSubnetsList.weighted_subnets) + // @@protoc_insertion_point(field:tapdance.PhantomSubnetsList.weighted_subnets) pub weighted_subnets: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:conjure.PhantomSubnetsList.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PhantomSubnetsList.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1521,15 +1521,15 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnetsList { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PhantomSubnets) +// @@protoc_insertion_point(message:tapdance.PhantomSubnets) pub struct PhantomSubnets { // message fields - // @@protoc_insertion_point(field:conjure.PhantomSubnets.weight) + // @@protoc_insertion_point(field:tapdance.PhantomSubnets.weight) pub weight: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.PhantomSubnets.subnets) + // @@protoc_insertion_point(field:tapdance.PhantomSubnets.subnets) pub subnets: ::std::vec::Vec<::std::string::String>, // special fields - // @@protoc_insertion_point(special_field:conjure.PhantomSubnets.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PhantomSubnets.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1681,19 +1681,19 @@ impl ::protobuf::reflect::ProtobufValue for PhantomSubnets { /// Deflated ICE Candidate by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.WebRTCICECandidate) +// @@protoc_insertion_point(message:tapdance.WebRTCICECandidate) pub struct WebRTCICECandidate { // message fields /// IP is represented in its 16-byte form - // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_upper) + // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_upper) pub ip_upper: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.ip_lower) + // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.ip_lower) pub ip_lower: ::std::option::Option, /// Composed info includes port, tcptype (unset if not tcp), candidate type (host, srflx, prflx), protocol (TCP/UDP), and component (RTP/RTCP) - // @@protoc_insertion_point(field:conjure.WebRTCICECandidate.composed_info) + // @@protoc_insertion_point(field:tapdance.WebRTCICECandidate.composed_info) pub composed_info: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.WebRTCICECandidate.special_fields) + // @@protoc_insertion_point(special_field:tapdance.WebRTCICECandidate.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -1908,15 +1908,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCICECandidate { /// Deflated SDP for WebRTC by seed2sdp package #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.WebRTCSDP) +// @@protoc_insertion_point(message:tapdance.WebRTCSDP) pub struct WebRTCSDP { // message fields - // @@protoc_insertion_point(field:conjure.WebRTCSDP.type) + // @@protoc_insertion_point(field:tapdance.WebRTCSDP.type) pub type_: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.WebRTCSDP.candidates) + // @@protoc_insertion_point(field:tapdance.WebRTCSDP.candidates) pub candidates: ::std::vec::Vec, // special fields - // @@protoc_insertion_point(special_field:conjure.WebRTCSDP.special_fields) + // @@protoc_insertion_point(special_field:tapdance.WebRTCSDP.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2077,15 +2077,15 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSDP { /// WebRTCSignal includes a deflated SDP and a seed #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.WebRTCSignal) +// @@protoc_insertion_point(message:tapdance.WebRTCSignal) pub struct WebRTCSignal { // message fields - // @@protoc_insertion_point(field:conjure.WebRTCSignal.seed) + // @@protoc_insertion_point(field:tapdance.WebRTCSignal.seed) pub seed: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.WebRTCSignal.sdp) + // @@protoc_insertion_point(field:tapdance.WebRTCSignal.sdp) pub sdp: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:conjure.WebRTCSignal.special_fields) + // @@protoc_insertion_point(special_field:tapdance.WebRTCSignal.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2265,34 +2265,34 @@ impl ::protobuf::reflect::ProtobufValue for WebRTCSignal { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.StationToClient) +// @@protoc_insertion_point(message:tapdance.StationToClient) pub struct StationToClient { // message fields /// Should accompany (at least) SESSION_INIT and CONFIRM_RECONNECT. - // @@protoc_insertion_point(field:conjure.StationToClient.protocol_version) + // @@protoc_insertion_point(field:tapdance.StationToClient.protocol_version) pub protocol_version: ::std::option::Option, /// There might be a state transition. May be absent; absence should be /// treated identically to NO_CHANGE. - // @@protoc_insertion_point(field:conjure.StationToClient.state_transition) + // @@protoc_insertion_point(field:tapdance.StationToClient.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The station can send client config info piggybacked /// on any message, as it sees fit - // @@protoc_insertion_point(field:conjure.StationToClient.config_info) + // @@protoc_insertion_point(field:tapdance.StationToClient.config_info) pub config_info: ::protobuf::MessageField, /// If state_transition == S2C_ERROR, this field is the explanation. - // @@protoc_insertion_point(field:conjure.StationToClient.err_reason) + // @@protoc_insertion_point(field:tapdance.StationToClient.err_reason) pub err_reason: ::std::option::Option<::protobuf::EnumOrUnknown>, /// Signals client to stop connecting for following amount of seconds - // @@protoc_insertion_point(field:conjure.StationToClient.tmp_backoff) + // @@protoc_insertion_point(field:tapdance.StationToClient.tmp_backoff) pub tmp_backoff: ::std::option::Option, /// Sent in SESSION_INIT, identifies the station that picked up - // @@protoc_insertion_point(field:conjure.StationToClient.station_id) + // @@protoc_insertion_point(field:tapdance.StationToClient.station_id) pub station_id: ::std::option::Option<::std::string::String>, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:conjure.StationToClient.padding) + // @@protoc_insertion_point(field:tapdance.StationToClient.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:conjure.StationToClient.special_fields) + // @@protoc_insertion_point(special_field:tapdance.StationToClient.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2326,7 +2326,7 @@ impl StationToClient { self.protocol_version = ::std::option::Option::Some(v); } - // optional .conjure.S2C_Transition state_transition = 2; + // optional .tapdance.S2C_Transition state_transition = 2; pub fn state_transition(&self) -> S2C_Transition { match self.state_transition { @@ -2348,7 +2348,7 @@ impl StationToClient { self.state_transition = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } - // optional .conjure.ErrorReasonS2C err_reason = 4; + // optional .tapdance.ErrorReasonS2C err_reason = 4; pub fn err_reason(&self) -> ErrorReasonS2C { match self.err_reason { @@ -2664,21 +2664,21 @@ impl ::protobuf::reflect::ProtobufValue for StationToClient { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.RegistrationFlags) +// @@protoc_insertion_point(message:tapdance.RegistrationFlags) pub struct RegistrationFlags { // message fields - // @@protoc_insertion_point(field:conjure.RegistrationFlags.upload_only) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.upload_only) pub upload_only: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.dark_decoy) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.dark_decoy) pub dark_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.proxy_header) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.proxy_header) pub proxy_header: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.use_TIL) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.use_TIL) pub use_TIL: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.RegistrationFlags.prescanned) + // @@protoc_insertion_point(field:tapdance.RegistrationFlags.prescanned) pub prescanned: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.RegistrationFlags.special_fields) + // @@protoc_insertion_point(special_field:tapdance.RegistrationFlags.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -2953,41 +2953,41 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationFlags { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.ClientToStation) +// @@protoc_insertion_point(message:tapdance.ClientToStation) pub struct ClientToStation { // message fields - // @@protoc_insertion_point(field:conjure.ClientToStation.protocol_version) + // @@protoc_insertion_point(field:tapdance.ClientToStation.protocol_version) pub protocol_version: ::std::option::Option, /// The client reports its decoy list's version number here, which the /// station can use to decide whether to send an updated one. The station /// should always send a list if this field is set to 0. - // @@protoc_insertion_point(field:conjure.ClientToStation.decoy_list_generation) + // @@protoc_insertion_point(field:tapdance.ClientToStation.decoy_list_generation) pub decoy_list_generation: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.ClientToStation.state_transition) + // @@protoc_insertion_point(field:tapdance.ClientToStation.state_transition) pub state_transition: ::std::option::Option<::protobuf::EnumOrUnknown>, /// The position in the overall session's upload sequence where the current /// YIELD=>ACQUIRE switchover is happening. - // @@protoc_insertion_point(field:conjure.ClientToStation.upload_sync) + // @@protoc_insertion_point(field:tapdance.ClientToStation.upload_sync) pub upload_sync: ::std::option::Option, /// High level client library version used for indicating feature support, or /// lack therof. - // @@protoc_insertion_point(field:conjure.ClientToStation.client_lib_version) + // @@protoc_insertion_point(field:tapdance.ClientToStation.client_lib_version) pub client_lib_version: ::std::option::Option, /// Indicates whether the client will allow the registrar to provide alternative parameters that /// may work better in substitute for the deterministically selected parameters. This only works /// for bidirectional registration methods where the client receives a RegistrationResponse. - // @@protoc_insertion_point(field:conjure.ClientToStation.allow_registrar_overrides) - pub allow_registrar_overrides: ::std::option::Option, + // @@protoc_insertion_point(field:tapdance.ClientToStation.disable_registrar_overrides) + pub disable_registrar_overrides: ::std::option::Option, /// List of decoys that client have unsuccessfully tried in current session. /// Could be sent in chunks - // @@protoc_insertion_point(field:conjure.ClientToStation.failed_decoys) + // @@protoc_insertion_point(field:tapdance.ClientToStation.failed_decoys) pub failed_decoys: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:conjure.ClientToStation.stats) + // @@protoc_insertion_point(field:tapdance.ClientToStation.stats) pub stats: ::protobuf::MessageField, /// NullTransport, MinTransport, Obfs4Transport, etc. Transport type we want from phantom proxy - // @@protoc_insertion_point(field:conjure.ClientToStation.transport) + // @@protoc_insertion_point(field:tapdance.ClientToStation.transport) pub transport: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:conjure.ClientToStation.transport_params) + // @@protoc_insertion_point(field:tapdance.ClientToStation.transport_params) pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, /// Station is only required to check this variable during session initialization. /// If set, station must facilitate connection to said target by itself, i.e. write into squid @@ -2995,28 +2995,28 @@ pub struct ClientToStation { /// covert_address must have exactly one ':' colon, that separates host (literal IP address or /// resolvable hostname) and port /// TODO: make it required for initialization, and stop connecting any client straight to squid? - // @@protoc_insertion_point(field:conjure.ClientToStation.covert_address) + // @@protoc_insertion_point(field:tapdance.ClientToStation.covert_address) pub covert_address: ::std::option::Option<::std::string::String>, /// Used in dark decoys to signal which dark decoy it will connect to. - // @@protoc_insertion_point(field:conjure.ClientToStation.masked_decoy_server_name) + // @@protoc_insertion_point(field:tapdance.ClientToStation.masked_decoy_server_name) pub masked_decoy_server_name: ::std::option::Option<::std::string::String>, /// Used to indicate to server if client is registering v4, v6 or both - // @@protoc_insertion_point(field:conjure.ClientToStation.v6_support) + // @@protoc_insertion_point(field:tapdance.ClientToStation.v6_support) pub v6_support: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.ClientToStation.v4_support) + // @@protoc_insertion_point(field:tapdance.ClientToStation.v4_support) pub v4_support: ::std::option::Option, /// A collection of optional flags for the registration. - // @@protoc_insertion_point(field:conjure.ClientToStation.flags) + // @@protoc_insertion_point(field:tapdance.ClientToStation.flags) pub flags: ::protobuf::MessageField, /// Transport Extensions /// TODO(jmwample) - move to WebRTC specific transport params protobuf message. - // @@protoc_insertion_point(field:conjure.ClientToStation.webrtc_signal) + // @@protoc_insertion_point(field:tapdance.ClientToStation.webrtc_signal) pub webrtc_signal: ::protobuf::MessageField, /// Random-sized junk to defeat packet size fingerprinting. - // @@protoc_insertion_point(field:conjure.ClientToStation.padding) + // @@protoc_insertion_point(field:tapdance.ClientToStation.padding) pub padding: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:conjure.ClientToStation.special_fields) + // @@protoc_insertion_point(special_field:tapdance.ClientToStation.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3069,7 +3069,7 @@ impl ClientToStation { self.decoy_list_generation = ::std::option::Option::Some(v); } - // optional .conjure.C2S_Transition state_transition = 3; + // optional .tapdance.C2S_Transition state_transition = 3; pub fn state_transition(&self) -> C2S_Transition { match self.state_transition { @@ -3129,26 +3129,26 @@ impl ClientToStation { self.client_lib_version = ::std::option::Option::Some(v); } - // optional bool allow_registrar_overrides = 6; + // optional bool disable_registrar_overrides = 6; - pub fn allow_registrar_overrides(&self) -> bool { - self.allow_registrar_overrides.unwrap_or(false) + pub fn disable_registrar_overrides(&self) -> bool { + self.disable_registrar_overrides.unwrap_or(false) } - pub fn clear_allow_registrar_overrides(&mut self) { - self.allow_registrar_overrides = ::std::option::Option::None; + pub fn clear_disable_registrar_overrides(&mut self) { + self.disable_registrar_overrides = ::std::option::Option::None; } - pub fn has_allow_registrar_overrides(&self) -> bool { - self.allow_registrar_overrides.is_some() + pub fn has_disable_registrar_overrides(&self) -> bool { + self.disable_registrar_overrides.is_some() } // Param is passed by value, moved - pub fn set_allow_registrar_overrides(&mut self, v: bool) { - self.allow_registrar_overrides = ::std::option::Option::Some(v); + pub fn set_disable_registrar_overrides(&mut self, v: bool) { + self.disable_registrar_overrides = ::std::option::Option::Some(v); } - // optional .conjure.TransportType transport = 12; + // optional .tapdance.TransportType transport = 12; pub fn transport(&self) -> TransportType { match self.transport { @@ -3345,9 +3345,9 @@ impl ClientToStation { |m: &mut ClientToStation| { &mut m.client_lib_version }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "allow_registrar_overrides", - |m: &ClientToStation| { &m.allow_registrar_overrides }, - |m: &mut ClientToStation| { &mut m.allow_registrar_overrides }, + "disable_registrar_overrides", + |m: &ClientToStation| { &m.disable_registrar_overrides }, + |m: &mut ClientToStation| { &mut m.disable_registrar_overrides }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "failed_decoys", @@ -3458,7 +3458,7 @@ impl ::protobuf::Message for ClientToStation { self.client_lib_version = ::std::option::Option::Some(is.read_uint32()?); }, 48 => { - self.allow_registrar_overrides = ::std::option::Option::Some(is.read_bool()?); + self.disable_registrar_overrides = ::std::option::Option::Some(is.read_bool()?); }, 82 => { self.failed_decoys.push(is.read_string()?); @@ -3520,7 +3520,7 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { my_size += ::protobuf::rt::uint32_size(5, v); } - if let Some(v) = self.allow_registrar_overrides { + if let Some(v) = self.disable_registrar_overrides { my_size += 1 + 1; } for value in &self.failed_decoys { @@ -3581,7 +3581,7 @@ impl ::protobuf::Message for ClientToStation { if let Some(v) = self.client_lib_version { os.write_uint32(5, v)?; } - if let Some(v) = self.allow_registrar_overrides { + if let Some(v) = self.disable_registrar_overrides { os.write_bool(6, v)?; } for v in &self.failed_decoys { @@ -3639,7 +3639,7 @@ impl ::protobuf::Message for ClientToStation { self.state_transition = ::std::option::Option::None; self.upload_sync = ::std::option::Option::None; self.client_lib_version = ::std::option::Option::None; - self.allow_registrar_overrides = ::std::option::Option::None; + self.disable_registrar_overrides = ::std::option::Option::None; self.failed_decoys.clear(); self.stats.clear(); self.transport = ::std::option::Option::None; @@ -3661,7 +3661,7 @@ impl ::protobuf::Message for ClientToStation { state_transition: ::std::option::Option::None, upload_sync: ::std::option::Option::None, client_lib_version: ::std::option::Option::None, - allow_registrar_overrides: ::std::option::Option::None, + disable_registrar_overrides: ::std::option::Option::None, failed_decoys: ::std::vec::Vec::new(), stats: ::protobuf::MessageField::none(), transport: ::std::option::Option::None, @@ -3697,23 +3697,25 @@ impl ::protobuf::reflect::ProtobufValue for ClientToStation { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.PrefixTransportParams) +// @@protoc_insertion_point(message:tapdance.PrefixTransportParams) pub struct PrefixTransportParams { // message fields /// Prefix Identifier - // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix_id) + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.prefix_id) pub prefix_id: ::std::option::Option, /// Prefix bytes (optional - usually sent from station to client as override if allowed by C2S) /// as the station cannot take this into account when attempting to identify a connection. - // @@protoc_insertion_point(field:conjure.PrefixTransportParams.prefix) + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.prefix) pub prefix: ::std::option::Option<::std::vec::Vec>, + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.flush_after_prefix) + pub flush_after_prefix: ::std::option::Option, /// Indicates whether the client has elected to use destination port randomization. Should be /// checked against selected transport to ensure that destination port randomization is /// supported. - // @@protoc_insertion_point(field:conjure.PrefixTransportParams.randomize_dst_port) + // @@protoc_insertion_point(field:tapdance.PrefixTransportParams.randomize_dst_port) pub randomize_dst_port: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.PrefixTransportParams.special_fields) + // @@protoc_insertion_point(special_field:tapdance.PrefixTransportParams.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -3783,6 +3785,25 @@ impl PrefixTransportParams { self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new()) } + // optional bool flush_after_prefix = 3; + + pub fn flush_after_prefix(&self) -> bool { + self.flush_after_prefix.unwrap_or(false) + } + + pub fn clear_flush_after_prefix(&mut self) { + self.flush_after_prefix = ::std::option::Option::None; + } + + pub fn has_flush_after_prefix(&self) -> bool { + self.flush_after_prefix.is_some() + } + + // Param is passed by value, moved + pub fn set_flush_after_prefix(&mut self, v: bool) { + self.flush_after_prefix = ::std::option::Option::Some(v); + } + // optional bool randomize_dst_port = 13; pub fn randomize_dst_port(&self) -> bool { @@ -3803,7 +3824,7 @@ impl PrefixTransportParams { } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); + let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "prefix_id", @@ -3815,6 +3836,11 @@ impl PrefixTransportParams { |m: &PrefixTransportParams| { &m.prefix }, |m: &mut PrefixTransportParams| { &mut m.prefix }, )); + fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( + "flush_after_prefix", + |m: &PrefixTransportParams| { &m.flush_after_prefix }, + |m: &mut PrefixTransportParams| { &mut m.flush_after_prefix }, + )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "randomize_dst_port", |m: &PrefixTransportParams| { &m.randomize_dst_port }, @@ -3844,6 +3870,9 @@ impl ::protobuf::Message for PrefixTransportParams { 18 => { self.prefix = ::std::option::Option::Some(is.read_bytes()?); }, + 24 => { + self.flush_after_prefix = ::std::option::Option::Some(is.read_bool()?); + }, 104 => { self.randomize_dst_port = ::std::option::Option::Some(is.read_bool()?); }, @@ -3865,6 +3894,9 @@ impl ::protobuf::Message for PrefixTransportParams { if let Some(v) = self.prefix.as_ref() { my_size += ::protobuf::rt::bytes_size(2, &v); } + if let Some(v) = self.flush_after_prefix { + my_size += 1 + 1; + } if let Some(v) = self.randomize_dst_port { my_size += 1 + 1; } @@ -3880,6 +3912,9 @@ impl ::protobuf::Message for PrefixTransportParams { if let Some(v) = self.prefix.as_ref() { os.write_bytes(2, v)?; } + if let Some(v) = self.flush_after_prefix { + os.write_bool(3, v)?; + } if let Some(v) = self.randomize_dst_port { os.write_bool(13, v)?; } @@ -3902,6 +3937,7 @@ impl ::protobuf::Message for PrefixTransportParams { fn clear(&mut self) { self.prefix_id = ::std::option::Option::None; self.prefix = ::std::option::Option::None; + self.flush_after_prefix = ::std::option::Option::None; self.randomize_dst_port = ::std::option::Option::None; self.special_fields.clear(); } @@ -3910,6 +3946,7 @@ impl ::protobuf::Message for PrefixTransportParams { static instance: PrefixTransportParams = PrefixTransportParams { prefix_id: ::std::option::Option::None, prefix: ::std::option::Option::None, + flush_after_prefix: ::std::option::Option::None, randomize_dst_port: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; @@ -3935,16 +3972,16 @@ impl ::protobuf::reflect::ProtobufValue for PrefixTransportParams { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.GenericTransportParams) +// @@protoc_insertion_point(message:tapdance.GenericTransportParams) pub struct GenericTransportParams { // message fields /// Indicates whether the client has elected to use destination port randomization. Should be /// checked against selected transport to ensure that destination port randomization is /// supported. - // @@protoc_insertion_point(field:conjure.GenericTransportParams.randomize_dst_port) + // @@protoc_insertion_point(field:tapdance.GenericTransportParams.randomize_dst_port) pub randomize_dst_port: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.GenericTransportParams.special_fields) + // @@protoc_insertion_point(special_field:tapdance.GenericTransportParams.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4079,20 +4116,20 @@ impl ::protobuf::reflect::ProtobufValue for GenericTransportParams { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.C2SWrapper) +// @@protoc_insertion_point(message:tapdance.C2SWrapper) pub struct C2SWrapper { // message fields - // @@protoc_insertion_point(field:conjure.C2SWrapper.shared_secret) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.shared_secret) pub shared_secret: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_payload) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_payload) pub registration_payload: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_source) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_source) pub registration_source: ::std::option::Option<::protobuf::EnumOrUnknown>, /// client source address when receiving a registration - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_address) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_address) pub registration_address: ::std::option::Option<::std::vec::Vec>, /// Decoy address used when registering over Decoy registrar - // @@protoc_insertion_point(field:conjure.C2SWrapper.decoy_address) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.decoy_address) pub decoy_address: ::std::option::Option<::std::vec::Vec>, /// The next three fields allow an independent registrar (trusted by a station w/ a zmq keypair) to /// share the registration overrides that it assigned to the client with the station(s). @@ -4104,14 +4141,14 @@ pub struct C2SWrapper { /// If you are reading this in the future and you want to extend the functionality here it might /// make sense to make the RegistrationResponse that is sent to the client a distinct message from /// the one that gets sent to the stations. - // @@protoc_insertion_point(field:conjure.C2SWrapper.registration_response) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.registration_response) pub registration_response: ::protobuf::MessageField, - // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespBytes) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.RegRespBytes) pub RegRespBytes: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:conjure.C2SWrapper.RegRespSignature) + // @@protoc_insertion_point(field:tapdance.C2SWrapper.RegRespSignature) pub RegRespSignature: ::std::option::Option<::std::vec::Vec>, // special fields - // @@protoc_insertion_point(special_field:conjure.C2SWrapper.special_fields) + // @@protoc_insertion_point(special_field:tapdance.C2SWrapper.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4162,7 +4199,7 @@ impl C2SWrapper { self.shared_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - // optional .conjure.RegistrationSource registration_source = 4; + // optional .tapdance.RegistrationSource registration_source = 4; pub fn registration_source(&self) -> RegistrationSource { match self.registration_source { @@ -4553,23 +4590,23 @@ impl ::protobuf::reflect::ProtobufValue for C2SWrapper { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.SessionStats) +// @@protoc_insertion_point(message:tapdance.SessionStats) pub struct SessionStats { // message fields - // @@protoc_insertion_point(field:conjure.SessionStats.failed_decoys_amount) + // @@protoc_insertion_point(field:tapdance.SessionStats.failed_decoys_amount) pub failed_decoys_amount: ::std::option::Option, /// Applicable to whole session: - // @@protoc_insertion_point(field:conjure.SessionStats.total_time_to_connect) + // @@protoc_insertion_point(field:tapdance.SessionStats.total_time_to_connect) pub total_time_to_connect: ::std::option::Option, /// Last (i.e. successful) decoy: - // @@protoc_insertion_point(field:conjure.SessionStats.rtt_to_station) + // @@protoc_insertion_point(field:tapdance.SessionStats.rtt_to_station) pub rtt_to_station: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.SessionStats.tls_to_decoy) + // @@protoc_insertion_point(field:tapdance.SessionStats.tls_to_decoy) pub tls_to_decoy: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.SessionStats.tcp_to_decoy) + // @@protoc_insertion_point(field:tapdance.SessionStats.tcp_to_decoy) pub tcp_to_decoy: ::std::option::Option, // special fields - // @@protoc_insertion_point(special_field:conjure.SessionStats.special_fields) + // @@protoc_insertion_point(special_field:tapdance.SessionStats.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4844,25 +4881,25 @@ impl ::protobuf::reflect::ProtobufValue for SessionStats { } #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.StationToDetector) +// @@protoc_insertion_point(message:tapdance.StationToDetector) pub struct StationToDetector { // message fields - // @@protoc_insertion_point(field:conjure.StationToDetector.phantom_ip) + // @@protoc_insertion_point(field:tapdance.StationToDetector.phantom_ip) pub phantom_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.StationToDetector.client_ip) + // @@protoc_insertion_point(field:tapdance.StationToDetector.client_ip) pub client_ip: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:conjure.StationToDetector.timeout_ns) + // @@protoc_insertion_point(field:tapdance.StationToDetector.timeout_ns) pub timeout_ns: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.StationToDetector.operation) + // @@protoc_insertion_point(field:tapdance.StationToDetector.operation) pub operation: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:conjure.StationToDetector.dst_port) + // @@protoc_insertion_point(field:tapdance.StationToDetector.dst_port) pub dst_port: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.StationToDetector.src_port) + // @@protoc_insertion_point(field:tapdance.StationToDetector.src_port) pub src_port: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.StationToDetector.proto) + // @@protoc_insertion_point(field:tapdance.StationToDetector.proto) pub proto: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields - // @@protoc_insertion_point(special_field:conjure.StationToDetector.special_fields) + // @@protoc_insertion_point(special_field:tapdance.StationToDetector.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -4968,7 +5005,7 @@ impl StationToDetector { self.timeout_ns = ::std::option::Option::Some(v); } - // optional .conjure.StationOperations operation = 4; + // optional .tapdance.StationOperations operation = 4; pub fn operation(&self) -> StationOperations { match self.operation { @@ -5028,7 +5065,7 @@ impl StationToDetector { self.src_port = ::std::option::Option::Some(v); } - // optional .conjure.IPProto proto = 12; + // optional .tapdance.IPProto proto = 12; pub fn proto(&self) -> IPProto { match self.proto { @@ -5248,32 +5285,32 @@ impl ::protobuf::reflect::ProtobufValue for StationToDetector { /// Adding message response from Station to Client for bidirectional API #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.RegistrationResponse) +// @@protoc_insertion_point(message:tapdance.RegistrationResponse) pub struct RegistrationResponse { // message fields - // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv4addr) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv4addr) pub ipv4addr: ::std::option::Option, /// The 128-bit ipv6 address, in network byte order - // @@protoc_insertion_point(field:conjure.RegistrationResponse.ipv6addr) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.ipv6addr) pub ipv6addr: ::std::option::Option<::std::vec::Vec>, /// Respond with randomized port - // @@protoc_insertion_point(field:conjure.RegistrationResponse.dst_port) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.dst_port) pub dst_port: ::std::option::Option, /// Future: station provides client with secret, want chanel present /// Leave null for now - // @@protoc_insertion_point(field:conjure.RegistrationResponse.serverRandom) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.serverRandom) pub serverRandom: ::std::option::Option<::std::vec::Vec>, /// If registration wrong, populate this error string - // @@protoc_insertion_point(field:conjure.RegistrationResponse.error) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.error) pub error: ::std::option::Option<::std::string::String>, /// ClientConf field (optional) - // @@protoc_insertion_point(field:conjure.RegistrationResponse.clientConf) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.clientConf) pub clientConf: ::protobuf::MessageField, /// Transport Params to if `allow_registrar_overrides` is set. - // @@protoc_insertion_point(field:conjure.RegistrationResponse.transport_params) + // @@protoc_insertion_point(field:tapdance.RegistrationResponse.transport_params) pub transport_params: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, // special fields - // @@protoc_insertion_point(special_field:conjure.RegistrationResponse.special_fields) + // @@protoc_insertion_point(special_field:tapdance.RegistrationResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5644,17 +5681,17 @@ impl ::protobuf::reflect::ProtobufValue for RegistrationResponse { /// response from dns #[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:conjure.DnsResponse) +// @@protoc_insertion_point(message:tapdance.DnsResponse) pub struct DnsResponse { // message fields - // @@protoc_insertion_point(field:conjure.DnsResponse.success) + // @@protoc_insertion_point(field:tapdance.DnsResponse.success) pub success: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.DnsResponse.clientconf_outdated) + // @@protoc_insertion_point(field:tapdance.DnsResponse.clientconf_outdated) pub clientconf_outdated: ::std::option::Option, - // @@protoc_insertion_point(field:conjure.DnsResponse.bidirectional_response) + // @@protoc_insertion_point(field:tapdance.DnsResponse.bidirectional_response) pub bidirectional_response: ::protobuf::MessageField, // special fields - // @@protoc_insertion_point(special_field:conjure.DnsResponse.special_fields) + // @@protoc_insertion_point(special_field:tapdance.DnsResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } @@ -5846,11 +5883,11 @@ impl ::protobuf::reflect::ProtobufValue for DnsResponse { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.KeyType) +// @@protoc_insertion_point(enum:tapdance.KeyType) pub enum KeyType { - // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_128) + // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_128) AES_GCM_128 = 90, - // @@protoc_insertion_point(enum_value:conjure.KeyType.AES_GCM_256) + // @@protoc_insertion_point(enum_value:tapdance.KeyType.AES_GCM_256) AES_GCM_256 = 91, } @@ -5904,13 +5941,13 @@ impl KeyType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.DnsRegMethod) +// @@protoc_insertion_point(enum:tapdance.DnsRegMethod) pub enum DnsRegMethod { - // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.UDP) + // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.UDP) UDP = 1, - // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOT) + // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOT) DOT = 2, - // @@protoc_insertion_point(enum_value:conjure.DnsRegMethod.DOH) + // @@protoc_insertion_point(enum_value:tapdance.DnsRegMethod.DOH) DOH = 3, } @@ -5968,25 +6005,25 @@ impl DnsRegMethod { /// State transitions of the client #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.C2S_Transition) +// @@protoc_insertion_point(enum:tapdance.C2S_Transition) pub enum C2S_Transition { - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_NO_CHANGE) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_NO_CHANGE) C2S_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_INIT) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_INIT) C2S_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_COVERT_INIT) C2S_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_RECONNECT) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_RECONNECT) C2S_EXPECT_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_SESSION_CLOSE) C2S_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_YIELD_UPLOAD) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_YIELD_UPLOAD) C2S_YIELD_UPLOAD = 4, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ACQUIRE_UPLOAD) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ACQUIRE_UPLOAD) C2S_ACQUIRE_UPLOAD = 5, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_EXPECT_UPLOADONLY_RECONN) C2S_EXPECT_UPLOADONLY_RECONN = 6, - // @@protoc_insertion_point(enum_value:conjure.C2S_Transition.C2S_ERROR) + // @@protoc_insertion_point(enum_value:tapdance.C2S_Transition.C2S_ERROR) C2S_ERROR = 255, } @@ -6061,19 +6098,19 @@ impl C2S_Transition { /// State transitions of the server #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.S2C_Transition) +// @@protoc_insertion_point(enum:tapdance.S2C_Transition) pub enum S2C_Transition { - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_NO_CHANGE) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_NO_CHANGE) S2C_NO_CHANGE = 0, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_INIT) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_INIT) S2C_SESSION_INIT = 1, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_COVERT_INIT) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_COVERT_INIT) S2C_SESSION_COVERT_INIT = 11, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_CONFIRM_RECONNECT) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_CONFIRM_RECONNECT) S2C_CONFIRM_RECONNECT = 2, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_SESSION_CLOSE) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_SESSION_CLOSE) S2C_SESSION_CLOSE = 3, - // @@protoc_insertion_point(enum_value:conjure.S2C_Transition.S2C_ERROR) + // @@protoc_insertion_point(enum_value:tapdance.S2C_Transition.S2C_ERROR) S2C_ERROR = 255, } @@ -6139,23 +6176,23 @@ impl S2C_Transition { /// Should accompany all S2C_ERROR messages. #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.ErrorReasonS2C) +// @@protoc_insertion_point(enum:tapdance.ErrorReasonS2C) pub enum ErrorReasonS2C { - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.NO_ERROR) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.NO_ERROR) NO_ERROR = 0, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.COVERT_STREAM) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.COVERT_STREAM) COVERT_STREAM = 1, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_REPORTED) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_REPORTED) CLIENT_REPORTED = 2, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_PROTOCOL) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_PROTOCOL) CLIENT_PROTOCOL = 3, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.STATION_INTERNAL) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.STATION_INTERNAL) STATION_INTERNAL = 4, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.DECOY_OVERLOAD) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.DECOY_OVERLOAD) DECOY_OVERLOAD = 5, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_STREAM) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_STREAM) CLIENT_STREAM = 100, - // @@protoc_insertion_point(enum_value:conjure.ErrorReasonS2C.CLIENT_TIMEOUT) + // @@protoc_insertion_point(enum_value:tapdance.ErrorReasonS2C.CLIENT_TIMEOUT) CLIENT_TIMEOUT = 101, } @@ -6226,29 +6263,29 @@ impl ErrorReasonS2C { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.TransportType) +// @@protoc_insertion_point(enum:tapdance.TransportType) pub enum TransportType { - // @@protoc_insertion_point(enum_value:conjure.TransportType.Null) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Null) Null = 0, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Min) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Min) Min = 1, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Obfs4) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Obfs4) Obfs4 = 2, - // @@protoc_insertion_point(enum_value:conjure.TransportType.DTLS) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.DTLS) DTLS = 3, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Prefix) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Prefix) Prefix = 4, - // @@protoc_insertion_point(enum_value:conjure.TransportType.uTLS) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.uTLS) uTLS = 5, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Format) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Format) Format = 6, - // @@protoc_insertion_point(enum_value:conjure.TransportType.WASM) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.WASM) WASM = 7, - // @@protoc_insertion_point(enum_value:conjure.TransportType.FTE) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.FTE) FTE = 8, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Quic) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Quic) Quic = 9, - // @@protoc_insertion_point(enum_value:conjure.TransportType.Webrtc) + // @@protoc_insertion_point(enum_value:tapdance.TransportType.Webrtc) Webrtc = 99, } @@ -6328,21 +6365,21 @@ impl TransportType { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.RegistrationSource) +// @@protoc_insertion_point(enum:tapdance.RegistrationSource) pub enum RegistrationSource { - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Unspecified) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Unspecified) Unspecified = 0, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.Detector) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.Detector) Detector = 1, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.API) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.API) API = 2, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DetectorPrescan) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DetectorPrescan) DetectorPrescan = 3, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalAPI) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalAPI) BidirectionalAPI = 4, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.DNS) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.DNS) DNS = 5, - // @@protoc_insertion_point(enum_value:conjure.RegistrationSource.BidirectionalDNS) + // @@protoc_insertion_point(enum_value:tapdance.RegistrationSource.BidirectionalDNS) BidirectionalDNS = 6, } @@ -6402,15 +6439,15 @@ impl RegistrationSource { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.StationOperations) +// @@protoc_insertion_point(enum:tapdance.StationOperations) pub enum StationOperations { - // @@protoc_insertion_point(enum_value:conjure.StationOperations.Unknown) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Unknown) Unknown = 0, - // @@protoc_insertion_point(enum_value:conjure.StationOperations.New) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.New) New = 1, - // @@protoc_insertion_point(enum_value:conjure.StationOperations.Update) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Update) Update = 2, - // @@protoc_insertion_point(enum_value:conjure.StationOperations.Clear) + // @@protoc_insertion_point(enum_value:tapdance.StationOperations.Clear) Clear = 3, } @@ -6464,13 +6501,13 @@ impl StationOperations { } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:conjure.IPProto) +// @@protoc_insertion_point(enum:tapdance.IPProto) pub enum IPProto { - // @@protoc_insertion_point(enum_value:conjure.IPProto.Unk) + // @@protoc_insertion_point(enum_value:tapdance.IPProto.Unk) Unk = 0, - // @@protoc_insertion_point(enum_value:conjure.IPProto.Tcp) + // @@protoc_insertion_point(enum_value:tapdance.IPProto.Tcp) Tcp = 1, - // @@protoc_insertion_point(enum_value:conjure.IPProto.Udp) + // @@protoc_insertion_point(enum_value:tapdance.IPProto.Udp) Udp = 2, } @@ -6522,240 +6559,241 @@ impl IPProto { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10signalling.proto\x12\x07conjure\x1a\x19google/protobuf/any.proto\"\ - @\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12$\n\x04ty\ - pe\x18\x02\x20\x01(\x0e2\x10.conjure.KeyTypeR\x04type\"\xbd\x01\n\x0cTLS\ - DecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\x1a\ - \n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\ - \x18\x06\x20\x01(\x0cR\x08ipv6addr\x12'\n\x06pubkey\x18\x03\x20\x01(\x0b\ - 2\x0f.conjure.PubKeyR\x06pubkey\x12\x18\n\x07timeout\x18\x04\x20\x01(\rR\ - \x07timeout\x12\x16\n\x06tcpwin\x18\x05\x20\x01(\rR\x06tcpwin\"\xd5\x02\ - \n\nClientConf\x121\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x12.conjure.Deco\ - yListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\ngeneration\ - \x126\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x0f.conjure.PubKeyR\rdef\ - aultPubkey\x12M\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\x1b.conj\ - ure.PhantomSubnetsListR\x12phantomSubnetsList\x126\n\x0econjure_pubkey\ - \x18\x05\x20\x01(\x0b2\x0f.conjure.PubKeyR\rconjurePubkey\x125\n\x0cdns_\ - reg_conf\x18\x06\x20\x01(\x0b2\x13.conjure.DnsRegConfR\ndnsRegConf\"\xdf\ - \x01\n\nDnsRegConf\x12;\n\x0edns_reg_method\x18\x01\x20\x02(\x0e2\x15.co\ - njure.DnsRegMethodR\x0cdnsRegMethod\x12\x16\n\x06target\x18\x02\x20\x01(\ - \tR\x06target\x12\x16\n\x06domain\x18\x03\x20\x02(\tR\x06domain\x12\x16\ - \n\x06pubkey\x18\x04\x20\x01(\x0cR\x06pubkey\x12+\n\x11utls_distribution\ - \x18\x05\x20\x01(\tR\x10utlsDistribution\x12\x1f\n\x0bstun_server\x18\ - \x06\x20\x01(\tR\nstunServer\"A\n\tDecoyList\x124\n\ntls_decoys\x18\x01\ - \x20\x03(\x0b2\x15.conjure.TLSDecoySpecR\ttlsDecoys\"X\n\x12PhantomSubne\ - tsList\x12B\n\x10weighted_subnets\x18\x01\x20\x03(\x0b2\x17.conjure.Phan\ - tomSubnetsR\x0fweightedSubnets\"B\n\x0ePhantomSubnets\x12\x16\n\x06weigh\ - t\x18\x01\x20\x01(\rR\x06weight\x12\x18\n\x07subnets\x18\x02\x20\x03(\tR\ - \x07subnets\"o\n\x12WebRTCICECandidate\x12\x19\n\x08ip_upper\x18\x01\x20\ - \x02(\x04R\x07ipUpper\x12\x19\n\x08ip_lower\x18\x02\x20\x02(\x04R\x07ipL\ - ower\x12#\n\rcomposed_info\x18\x03\x20\x02(\rR\x0ccomposedInfo\"\\\n\tWe\ - bRTCSDP\x12\x12\n\x04type\x18\x01\x20\x02(\rR\x04type\x12;\n\ncandidates\ - \x18\x02\x20\x03(\x0b2\x1b.conjure.WebRTCICECandidateR\ncandidates\"H\n\ - \x0cWebRTCSignal\x12\x12\n\x04seed\x18\x01\x20\x02(\tR\x04seed\x12$\n\ - \x03sdp\x18\x02\x20\x02(\x0b2\x12.conjure.WebRTCSDPR\x03sdp\"\xc8\x02\n\ - \x0fStationToClient\x12)\n\x10protocol_version\x18\x01\x20\x01(\rR\x0fpr\ - otocolVersion\x12B\n\x10state_transition\x18\x02\x20\x01(\x0e2\x17.conju\ - re.S2C_TransitionR\x0fstateTransition\x124\n\x0bconfig_info\x18\x03\x20\ - \x01(\x0b2\x13.conjure.ClientConfR\nconfigInfo\x126\n\nerr_reason\x18\ - \x04\x20\x01(\x0e2\x17.conjure.ErrorReasonS2CR\terrReason\x12\x1f\n\x0bt\ - mp_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\x07paddi\ - ng\"\xaf\x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_only\x18\x01\x20\ - \x01(\x08R\nuploadOnly\x12\x1d\n\ndark_decoy\x18\x02\x20\x01(\x08R\tdark\ - Decoy\x12!\n\x0cproxy_header\x18\x03\x20\x01(\x08R\x0bproxyHeader\x12\ - \x17\n\x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\x12\x1e\n\nprescanned\ - \x18\x05\x20\x01(\x08R\nprescanned\"\xae\x06\n\x0fClientToStation\x12)\n\ - \x10protocol_version\x18\x01\x20\x01(\rR\x0fprotocolVersion\x122\n\x15de\ - coy_list_generation\x18\x02\x20\x01(\rR\x13decoyListGeneration\x12B\n\ - \x10state_transition\x18\x03\x20\x01(\x0e2\x17.conjure.C2S_TransitionR\ - \x0fstateTransition\x12\x1f\n\x0bupload_sync\x18\x04\x20\x01(\x04R\nuplo\ - adSync\x12,\n\x12client_lib_version\x18\x05\x20\x01(\rR\x10clientLibVers\ - ion\x12:\n\x19allow_registrar_overrides\x18\x06\x20\x01(\x08R\x17allowRe\ - gistrarOverrides\x12#\n\rfailed_decoys\x18\n\x20\x03(\tR\x0cfailedDecoys\ - \x12+\n\x05stats\x18\x0b\x20\x01(\x0b2\x15.conjure.SessionStatsR\x05stat\ - s\x124\n\ttransport\x18\x0c\x20\x01(\x0e2\x16.conjure.TransportTypeR\ttr\ - ansport\x12?\n\x10transport_params\x18\r\x20\x01(\x0b2\x14.google.protob\ - uf.AnyR\x0ftransportParams\x12%\n\x0ecovert_address\x18\x14\x20\x01(\tR\ - \rcovertAddress\x127\n\x18masked_decoy_server_name\x18\x15\x20\x01(\tR\ - \x15maskedDecoyServerName\x12\x1d\n\nv6_support\x18\x16\x20\x01(\x08R\tv\ - 6Support\x12\x1d\n\nv4_support\x18\x17\x20\x01(\x08R\tv4Support\x120\n\ - \x05flags\x18\x18\x20\x01(\x0b2\x1a.conjure.RegistrationFlagsR\x05flags\ - \x12:\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\x15.conjure.WebRTCSignalR\ - \x0cwebrtcSignal\x12\x18\n\x07padding\x18d\x20\x01(\x0cR\x07padding\"z\n\ - \x15PrefixTransportParams\x12\x1b\n\tprefix_id\x18\x01\x20\x01(\x05R\x08\ - prefixId\x12\x16\n\x06prefix\x18\x02\x20\x01(\x0cR\x06prefix\x12,\n\x12r\ - andomize_dst_port\x18\r\x20\x01(\x08R\x10randomizeDstPort\"F\n\x16Generi\ - cTransportParams\x12,\n\x12randomize_dst_port\x18\r\x20\x01(\x08R\x10ran\ - domizeDstPort\"\xc8\x03\n\nC2SWrapper\x12#\n\rshared_secret\x18\x01\x20\ - \x01(\x0cR\x0csharedSecret\x12K\n\x14registration_payload\x18\x03\x20\ - \x01(\x0b2\x18.conjure.ClientToStationR\x13registrationPayload\x12L\n\ - \x13registration_source\x18\x04\x20\x01(\x0e2\x1b.conjure.RegistrationSo\ - urceR\x12registrationSource\x121\n\x14registration_address\x18\x06\x20\ - \x01(\x0cR\x13registrationAddress\x12#\n\rdecoy_address\x18\x07\x20\x01(\ - \x0cR\x0cdecoyAddress\x12R\n\x15registration_response\x18\x08\x20\x01(\ - \x0b2\x1d.conjure.RegistrationResponseR\x14registrationResponse\x12\"\n\ - \x0cRegRespBytes\x18\t\x20\x01(\x0cR\x0cRegRespBytes\x12*\n\x10RegRespSi\ - gnature\x18\n\x20\x01(\x0cR\x10RegRespSignature\"\xdd\x01\n\x0cSessionSt\ - ats\x120\n\x14failed_decoys_amount\x18\x14\x20\x01(\rR\x12failedDecoysAm\ - ount\x121\n\x15total_time_to_connect\x18\x1f\x20\x01(\rR\x12totalTimeToC\ - onnect\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_deco\ - y\x18'\x20\x01(\rR\ntcpToDecoy\"\x86\x02\n\x11StationToDetector\x12\x1d\ - \n\nphantom_ip\x18\x01\x20\x01(\tR\tphantomIp\x12\x1b\n\tclient_ip\x18\ - \x02\x20\x01(\tR\x08clientIp\x12\x1d\n\ntimeout_ns\x18\x03\x20\x01(\x04R\ - \ttimeoutNs\x128\n\toperation\x18\x04\x20\x01(\x0e2\x1a.conjure.StationO\ - perationsR\toperation\x12\x19\n\x08dst_port\x18\n\x20\x01(\rR\x07dstPort\ - \x12\x19\n\x08src_port\x18\x0b\x20\x01(\rR\x07srcPort\x12&\n\x05proto\ - \x18\x0c\x20\x01(\x0e2\x10.conjure.IPProtoR\x05proto\"\x99\x02\n\x14Regi\ - strationResponse\x12\x1a\n\x08ipv4addr\x18\x01\x20\x01(\x07R\x08ipv4addr\ - \x12\x1a\n\x08ipv6addr\x18\x02\x20\x01(\x0cR\x08ipv6addr\x12\x19\n\x08ds\ - t_port\x18\x03\x20\x01(\rR\x07dstPort\x12\"\n\x0cserverRandom\x18\x04\ - \x20\x01(\x0cR\x0cserverRandom\x12\x14\n\x05error\x18\x05\x20\x01(\tR\ - \x05error\x123\n\nclientConf\x18\x06\x20\x01(\x0b2\x13.conjure.ClientCon\ - fR\nclientConf\x12?\n\x10transport_params\x18\n\x20\x01(\x0b2\x14.google\ - .protobuf.AnyR\x0ftransportParams\"\xae\x01\n\x0bDnsResponse\x12\x18\n\ - \x07success\x18\x01\x20\x01(\x08R\x07success\x12/\n\x13clientconf_outdat\ - ed\x18\x02\x20\x01(\x08R\x12clientconfOutdated\x12T\n\x16bidirectional_r\ - esponse\x18\x03\x20\x01(\x0b2\x1d.conjure.RegistrationResponseR\x15bidir\ - ectionalResponse*+\n\x07KeyType\x12\x0f\n\x0bAES_GCM_128\x10Z\x12\x0f\n\ - \x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\x12\x07\n\x03UDP\x10\x01\x12\ - \x07\n\x03DOT\x10\x02\x12\x07\n\x03DOH\x10\x03*\xe7\x01\n\x0eC2S_Transit\ - ion\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_RE\ - CONNECT\x10\x02\x12\x15\n\x11C2S_SESSION_CLOSE\x10\x03\x12\x14\n\x10C2S_\ - YIELD_UPLOAD\x10\x04\x12\x16\n\x12C2S_ACQUIRE_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\x0eErrorReaso\ - nS2C\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*\x82\ - \x01\n\rTransportType\x12\x08\n\x04Null\x10\0\x12\x07\n\x03Min\x10\x01\ - \x12\t\n\x05Obfs4\x10\x02\x12\x08\n\x04DTLS\x10\x03\x12\n\n\x06Prefix\ - \x10\x04\x12\x08\n\x04uTLS\x10\x05\x12\n\n\x06Format\x10\x06\x12\x08\n\ - \x04WASM\x10\x07\x12\x07\n\x03FTE\x10\x08\x12\x08\n\x04Quic\x10\t\x12\n\ - \n\x06Webrtc\x10c*\x86\x01\n\x12RegistrationSource\x12\x0f\n\x0bUnspecif\ - ied\x10\0\x12\x0c\n\x08Detector\x10\x01\x12\x07\n\x03API\x10\x02\x12\x13\ - \n\x0fDetectorPrescan\x10\x03\x12\x14\n\x10BidirectionalAPI\x10\x04\x12\ - \x07\n\x03DNS\x10\x05\x12\x14\n\x10BidirectionalDNS\x10\x06*@\n\x11Stati\ - onOperations\x12\x0b\n\x07Unknown\x10\0\x12\x07\n\x03New\x10\x01\x12\n\n\ - \x06Update\x10\x02\x12\t\n\x05Clear\x10\x03*$\n\x07IPProto\x12\x07\n\x03\ - Unk\x10\0\x12\x07\n\x03Tcp\x10\x01\x12\x07\n\x03Udp\x10\x02J\xc0\x8d\x01\ - \n\x07\x12\x05\0\0\xa1\x03\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\xb0\x01\ - \n\x01\x02\x12\x03\x06\0\x102\xa5\x01\x20TODO:\x20We're\x20using\x20prot\ - o2\x20because\x20it's\x20the\x20default\x20on\x20Ubuntu\x2016.04.\n\x20A\ - t\x20some\x20point\x20we\x20will\x20want\x20to\x20migrate\x20to\x20proto\ - 3,\x20but\x20we\x20are\x20not\n\x20using\x20any\x20proto3\x20features\ - \x20yet.\n\n\t\n\x02\x03\0\x12\x03\x08\0#\n\n\n\x02\x05\0\x12\x04\n\0\r\ - \x01\n\n\n\x03\x05\0\x01\x12\x03\n\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\ - \x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x0b\x04\x0f\n\x0c\n\ - \x05\x05\0\x02\0\x02\x12\x03\x0b\x12\x14\n\x20\n\x04\x05\0\x02\x01\x12\ - \x03\x0c\x04\x15\"\x13\x20not\x20supported\x20atm\n\n\x0c\n\x05\x05\0\ - \x02\x01\x01\x12\x03\x0c\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\ - \x0c\x12\x14\n\n\n\x02\x04\0\x12\x04\x0f\0\x14\x01\n\n\n\x03\x04\0\x01\ - \x12\x03\x0f\x08\x0e\n4\n\x04\x04\0\x02\0\x12\x03\x11\x04\x1b\x1a'\x20A\ - \x20public\x20key,\x20as\x20used\x20by\x20the\x20station.\n\n\x0c\n\x05\ - \x04\0\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ - \x11\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x11\x13\x16\n\x0c\n\x05\ - \x04\0\x02\0\x03\x12\x03\x11\x19\x1a\n\x0b\n\x04\x04\0\x02\x01\x12\x03\ - \x13\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\x13\x04\x0c\n\x0c\n\ - \x05\x04\0\x02\x01\x06\x12\x03\x13\r\x14\n\x0c\n\x05\x04\0\x02\x01\x01\ - \x12\x03\x13\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x13\x1c\x1d\n\ - \n\n\x02\x04\x01\x12\x04\x16\0<\x01\n\n\n\x03\x04\x01\x01\x12\x03\x16\ - \x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x1b\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\x1b\x04\x0c\n\x0c\n\x05\x04\ - \x01\x02\0\x05\x12\x03\x1b\r\x13\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\ - \x1b\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x1b\x1f\x20\n\xf7\x01\ - \n\x04\x04\x01\x02\x01\x12\x03\"\x04\"\x1a\xe9\x01\x20The\x2032-bit\x20i\ - pv4\x20address,\x20in\x20network\x20byte\x20order\n\n\x20If\x20the\x20IP\ - v4\x20address\x20is\x20absent,\x20then\x20it\x20may\x20be\x20resolved\ - \x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20the\x20client\x20may\ - \x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\x20DNS\x20is\x20un\ - trusted,\x20or\x20the\x20service\x20may\x20be\x20multihomed.\n\n\x0c\n\ - \x05\x04\x01\x02\x01\x04\x12\x03\"\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\ - \x05\x12\x03\"\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\"\x15\x1d\n\ - \x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\"\x20!\n>\n\x04\x04\x01\x02\x02\ - \x12\x03%\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\x20ne\ - twork\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\x20\ - contacting\x20this\n\x20decoy\n\n\x20If\x20omitted,\x20the\x20default\ - \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\x032\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20duration,\x20in\ - \x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connection\x20to\ - \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\x032\x04\x0c\n\x0c\n\ - \x05\x04\x01\x02\x04\x05\x12\x032\r\x13\n\x0c\n\x05\x04\x01\x02\x04\x01\ - \x12\x032\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x032\x1e\x1f\n\xb0\ - \x02\n\x04\x04\x01\x02\x05\x12\x03;\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\x03;\x04\x0c\n\x0c\n\x05\x04\ - \x01\x02\x05\x05\x12\x03;\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03;\ - \x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\x08\n\ - \x02\x04\x02\x12\x04S\0Z\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\x03S\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\ - \x03T\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03T\x04\x0c\n\x0c\n\x05\ - \x04\x02\x02\0\x06\x12\x03T\r\x16\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03T\ - \x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03T$%\n\x0b\n\x04\x04\x02\x02\ - \x01\x12\x03U\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03U\x04\x0c\n\ - \x0c\n\x05\x04\x02\x02\x01\x05\x12\x03U\r\x13\n\x0c\n\x05\x04\x02\x02\ - \x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03U!\"\n\ - \x0b\n\x04\x04\x02\x02\x02\x12\x03V\x04'\n\x0c\n\x05\x04\x02\x02\x02\x04\ - \x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03V\r\x13\n\x0c\n\ - \x05\x04\x02\x02\x02\x01\x12\x03V\x14\"\n\x0c\n\x05\x04\x02\x02\x02\x03\ - \x12\x03V%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03W\x049\n\x0c\n\x05\x04\ - \x02\x02\x03\x04\x12\x03W\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\ - \x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03W\x204\n\x0c\n\x05\ - \x04\x02\x02\x03\x03\x12\x03W78\n\x0b\n\x04\x04\x02\x02\x04\x12\x03X\x04\ - '\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03X\x04\x0c\n\x0c\n\x05\x04\x02\ - \x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03X\x14\ - \"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03X%&\n\x0b\n\x04\x04\x02\x02\ - \x05\x12\x03Y\x04)\n\x0c\n\x05\x04\x02\x02\x05\x04\x12\x03Y\x04\x0c\n\ - \x0c\n\x05\x04\x02\x02\x05\x06\x12\x03Y\r\x17\n\x0c\n\x05\x04\x02\x02\ - \x05\x01\x12\x03Y\x18$\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03Y'(\n-\n\ - \x02\x04\x03\x12\x04]\0d\x01\x1a!\x20Configuration\x20for\x20DNS\x20regi\ - strar\n\n\n\n\x03\x04\x03\x01\x12\x03]\x08\x12\n\x0b\n\x04\x04\x03\x02\0\ - \x12\x03^\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03^\x04\x0c\n\x0c\n\ + \n\x10signalling.proto\x12\x08tapdance\x1a\x19google/protobuf/any.proto\ + \"A\n\x06PubKey\x12\x10\n\x03key\x18\x01\x20\x01(\x0cR\x03key\x12%\n\x04\ + type\x18\x02\x20\x01(\x0e2\x11.tapdance.KeyTypeR\x04type\"\xbe\x01\n\x0c\ + TLSDecoySpec\x12\x1a\n\x08hostname\x18\x01\x20\x01(\tR\x08hostname\x12\ + \x1a\n\x08ipv4addr\x18\x02\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6ad\ + dr\x18\x06\x20\x01(\x0cR\x08ipv6addr\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\"\ + \xda\x02\n\nClientConf\x122\n\ndecoy_list\x18\x01\x20\x01(\x0b2\x13.tapd\ + ance.DecoyListR\tdecoyList\x12\x1e\n\ngeneration\x18\x02\x20\x01(\rR\nge\ + neration\x127\n\x0edefault_pubkey\x18\x03\x20\x01(\x0b2\x10.tapdance.Pub\ + KeyR\rdefaultPubkey\x12N\n\x14phantom_subnets_list\x18\x04\x20\x01(\x0b2\ + \x1c.tapdance.PhantomSubnetsListR\x12phantomSubnetsList\x127\n\x0econjur\ + e_pubkey\x18\x05\x20\x01(\x0b2\x10.tapdance.PubKeyR\rconjurePubkey\x126\ + \n\x0cdns_reg_conf\x18\x06\x20\x01(\x0b2\x14.tapdance.DnsRegConfR\ndnsRe\ + gConf\"\xe0\x01\n\nDnsRegConf\x12<\n\x0edns_reg_method\x18\x01\x20\x02(\ + \x0e2\x16.tapdance.DnsRegMethodR\x0cdnsRegMethod\x12\x16\n\x06target\x18\ + \x02\x20\x01(\tR\x06target\x12\x16\n\x06domain\x18\x03\x20\x02(\tR\x06do\ + main\x12\x16\n\x06pubkey\x18\x04\x20\x01(\x0cR\x06pubkey\x12+\n\x11utls_\ + distribution\x18\x05\x20\x01(\tR\x10utlsDistribution\x12\x1f\n\x0bstun_s\ + erver\x18\x06\x20\x01(\tR\nstunServer\"B\n\tDecoyList\x125\n\ntls_decoys\ + \x18\x01\x20\x03(\x0b2\x16.tapdance.TLSDecoySpecR\ttlsDecoys\"Y\n\x12Pha\ + ntomSubnetsList\x12C\n\x10weighted_subnets\x18\x01\x20\x03(\x0b2\x18.tap\ + dance.PhantomSubnetsR\x0fweightedSubnets\"B\n\x0ePhantomSubnets\x12\x16\ + \n\x06weight\x18\x01\x20\x01(\rR\x06weight\x12\x18\n\x07subnets\x18\x02\ + \x20\x03(\tR\x07subnets\"o\n\x12WebRTCICECandidate\x12\x19\n\x08ip_upper\ + \x18\x01\x20\x02(\x04R\x07ipUpper\x12\x19\n\x08ip_lower\x18\x02\x20\x02(\ + \x04R\x07ipLower\x12#\n\rcomposed_info\x18\x03\x20\x02(\rR\x0ccomposedIn\ + fo\"]\n\tWebRTCSDP\x12\x12\n\x04type\x18\x01\x20\x02(\rR\x04type\x12<\n\ + \ncandidates\x18\x02\x20\x03(\x0b2\x1c.tapdance.WebRTCICECandidateR\ncan\ + didates\"I\n\x0cWebRTCSignal\x12\x12\n\x04seed\x18\x01\x20\x02(\tR\x04se\ + ed\x12%\n\x03sdp\x18\x02\x20\x02(\x0b2\x13.tapdance.WebRTCSDPR\x03sdp\"\ + \xcb\x02\n\x0fStationToClient\x12)\n\x10protocol_version\x18\x01\x20\x01\ + (\rR\x0fprotocolVersion\x12C\n\x10state_transition\x18\x02\x20\x01(\x0e2\ + \x18.tapdance.S2C_TransitionR\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\"\xaf\x01\n\x11RegistrationFlags\x12\x1f\n\x0bupload_on\ + ly\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\x0bpr\ + oxyHeader\x12\x17\n\x07use_TIL\x18\x04\x20\x01(\x08R\x06useTIL\x12\x1e\n\ + \nprescanned\x18\x05\x20\x01(\x08R\nprescanned\"\xb7\x06\n\x0fClientToSt\ + ation\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\x12client_lib_version\x18\x05\x20\x01(\rR\x10cl\ + ientLibVersion\x12>\n\x1bdisable_registrar_overrides\x18\x06\x20\x01(\ + \x08R\x19disableRegistrarOverrides\x12#\n\rfailed_decoys\x18\n\x20\x03(\ + \tR\x0cfailedDecoys\x12,\n\x05stats\x18\x0b\x20\x01(\x0b2\x16.tapdance.S\ + essionStatsR\x05stats\x125\n\ttransport\x18\x0c\x20\x01(\x0e2\x17.tapdan\ + ce.TransportTypeR\ttransport\x12?\n\x10transport_params\x18\r\x20\x01(\ + \x0b2\x14.google.protobuf.AnyR\x0ftransportParams\x12%\n\x0ecovert_addre\ + ss\x18\x14\x20\x01(\tR\rcovertAddress\x127\n\x18masked_decoy_server_name\ + \x18\x15\x20\x01(\tR\x15maskedDecoyServerName\x12\x1d\n\nv6_support\x18\ + \x16\x20\x01(\x08R\tv6Support\x12\x1d\n\nv4_support\x18\x17\x20\x01(\x08\ + R\tv4Support\x121\n\x05flags\x18\x18\x20\x01(\x0b2\x1b.tapdance.Registra\ + tionFlagsR\x05flags\x12;\n\rwebrtc_signal\x18\x1f\x20\x01(\x0b2\x16.tapd\ + ance.WebRTCSignalR\x0cwebrtcSignal\x12\x18\n\x07padding\x18d\x20\x01(\ + \x0cR\x07padding\"\xa8\x01\n\x15PrefixTransportParams\x12\x1b\n\tprefix_\ + id\x18\x01\x20\x01(\x05R\x08prefixId\x12\x16\n\x06prefix\x18\x02\x20\x01\ + (\x0cR\x06prefix\x12,\n\x12flush_after_prefix\x18\x03\x20\x01(\x08R\x10f\ + lushAfterPrefix\x12,\n\x12randomize_dst_port\x18\r\x20\x01(\x08R\x10rand\ + omizeDstPort\"F\n\x16GenericTransportParams\x12,\n\x12randomize_dst_port\ + \x18\r\x20\x01(\x08R\x10randomizeDstPort\"\xcb\x03\n\nC2SWrapper\x12#\n\ + \rshared_secret\x18\x01\x20\x01(\x0cR\x0csharedSecret\x12L\n\x14registra\ + tion_payload\x18\x03\x20\x01(\x0b2\x19.tapdance.ClientToStationR\x13regi\ + strationPayload\x12M\n\x13registration_source\x18\x04\x20\x01(\x0e2\x1c.\ + tapdance.RegistrationSourceR\x12registrationSource\x121\n\x14registratio\ + n_address\x18\x06\x20\x01(\x0cR\x13registrationAddress\x12#\n\rdecoy_add\ + ress\x18\x07\x20\x01(\x0cR\x0cdecoyAddress\x12S\n\x15registration_respon\ + se\x18\x08\x20\x01(\x0b2\x1e.tapdance.RegistrationResponseR\x14registrat\ + ionResponse\x12\"\n\x0cRegRespBytes\x18\t\x20\x01(\x0cR\x0cRegRespBytes\ + \x12*\n\x10RegRespSignature\x18\n\x20\x01(\x0cR\x10RegRespSignature\"\ + \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\ntlsToDe\ + coy\x12\x20\n\x0ctcp_to_decoy\x18'\x20\x01(\rR\ntcpToDecoy\"\x88\x02\n\ + \x11StationToDetector\x12\x1d\n\nphantom_ip\x18\x01\x20\x01(\tR\tphantom\ + Ip\x12\x1b\n\tclient_ip\x18\x02\x20\x01(\tR\x08clientIp\x12\x1d\n\ntimeo\ + ut_ns\x18\x03\x20\x01(\x04R\ttimeoutNs\x129\n\toperation\x18\x04\x20\x01\ + (\x0e2\x1b.tapdance.StationOperationsR\toperation\x12\x19\n\x08dst_port\ + \x18\n\x20\x01(\rR\x07dstPort\x12\x19\n\x08src_port\x18\x0b\x20\x01(\rR\ + \x07srcPort\x12'\n\x05proto\x18\x0c\x20\x01(\x0e2\x11.tapdance.IPProtoR\ + \x05proto\"\x9a\x02\n\x14RegistrationResponse\x12\x1a\n\x08ipv4addr\x18\ + \x01\x20\x01(\x07R\x08ipv4addr\x12\x1a\n\x08ipv6addr\x18\x02\x20\x01(\ + \x0cR\x08ipv6addr\x12\x19\n\x08dst_port\x18\x03\x20\x01(\rR\x07dstPort\ + \x12\"\n\x0cserverRandom\x18\x04\x20\x01(\x0cR\x0cserverRandom\x12\x14\n\ + \x05error\x18\x05\x20\x01(\tR\x05error\x124\n\nclientConf\x18\x06\x20\ + \x01(\x0b2\x14.tapdance.ClientConfR\nclientConf\x12?\n\x10transport_para\ + ms\x18\n\x20\x01(\x0b2\x14.google.protobuf.AnyR\x0ftransportParams\"\xaf\ + \x01\n\x0bDnsResponse\x12\x18\n\x07success\x18\x01\x20\x01(\x08R\x07succ\ + ess\x12/\n\x13clientconf_outdated\x18\x02\x20\x01(\x08R\x12clientconfOut\ + dated\x12U\n\x16bidirectional_response\x18\x03\x20\x01(\x0b2\x1e.tapdanc\ + e.RegistrationResponseR\x15bidirectionalResponse*+\n\x07KeyType\x12\x0f\ + \n\x0bAES_GCM_128\x10Z\x12\x0f\n\x0bAES_GCM_256\x10[*)\n\x0cDnsRegMethod\ + \x12\x07\n\x03UDP\x10\x01\x12\x07\n\x03DOT\x10\x02\x12\x07\n\x03DOH\x10\ + \x03*\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\x10e*\x82\x01\n\rTransportType\x12\x08\n\x04Nul\ + l\x10\0\x12\x07\n\x03Min\x10\x01\x12\t\n\x05Obfs4\x10\x02\x12\x08\n\x04D\ + TLS\x10\x03\x12\n\n\x06Prefix\x10\x04\x12\x08\n\x04uTLS\x10\x05\x12\n\n\ + \x06Format\x10\x06\x12\x08\n\x04WASM\x10\x07\x12\x07\n\x03FTE\x10\x08\ + \x12\x08\n\x04Quic\x10\t\x12\n\n\x06Webrtc\x10c*\x86\x01\n\x12Registrati\ + onSource\x12\x0f\n\x0bUnspecified\x10\0\x12\x0c\n\x08Detector\x10\x01\ + \x12\x07\n\x03API\x10\x02\x12\x13\n\x0fDetectorPrescan\x10\x03\x12\x14\n\ + \x10BidirectionalAPI\x10\x04\x12\x07\n\x03DNS\x10\x05\x12\x14\n\x10Bidir\ + ectionalDNS\x10\x06*@\n\x11StationOperations\x12\x0b\n\x07Unknown\x10\0\ + \x12\x07\n\x03New\x10\x01\x12\n\n\x06Update\x10\x02\x12\t\n\x05Clear\x10\ + \x03*$\n\x07IPProto\x12\x07\n\x03Unk\x10\0\x12\x07\n\x03Tcp\x10\x01\x12\ + \x07\n\x03Udp\x10\x02J\x8a\x8e\x01\n\x07\x12\x05\0\0\xa2\x03\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\x20defau\ + lt\x20on\x20Ubuntu\x2016.04.\n\x20At\x20some\x20point\x20we\x20will\x20w\ + ant\x20to\x20migrate\x20to\x20proto3,\x20but\x20we\x20are\x20not\n\x20us\ + ing\x20any\x20proto3\x20features\x20yet.\n\n\t\n\x02\x03\0\x12\x03\x08\0\ + #\n\n\n\x02\x05\0\x12\x04\n\0\r\x01\n\n\n\x03\x05\0\x01\x12\x03\n\x05\ + \x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\0\ + \x01\x12\x03\x0b\x04\x0f\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x0b\x12\x14\ + \n\x20\n\x04\x05\0\x02\x01\x12\x03\x0c\x04\x15\"\x13\x20not\x20supported\ + \x20atm\n\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x0c\x04\x0f\n\x0c\n\x05\ + \x05\0\x02\x01\x02\x12\x03\x0c\x12\x14\n\n\n\x02\x04\0\x12\x04\x0f\0\x14\ + \x01\n\n\n\x03\x04\0\x01\x12\x03\x0f\x08\x0e\n4\n\x04\x04\0\x02\0\x12\ + \x03\x11\x04\x1b\x1a'\x20A\x20public\x20key,\x20as\x20used\x20by\x20the\ + \x20station.\n\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\ + \x05\x04\0\x02\0\x05\x12\x03\x11\r\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\ + \x03\x11\x13\x16\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x11\x19\x1a\n\x0b\n\ + \x04\x04\0\x02\x01\x12\x03\x13\x04\x1e\n\x0c\n\x05\x04\0\x02\x01\x04\x12\ + \x03\x13\x04\x0c\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\x13\r\x14\n\x0c\n\ + \x05\x04\0\x02\x01\x01\x12\x03\x13\x15\x19\n\x0c\n\x05\x04\0\x02\x01\x03\ + \x12\x03\x13\x1c\x1d\n\n\n\x02\x04\x01\x12\x04\x16\0<\x01\n\n\n\x03\x04\ + \x01\x01\x12\x03\x16\x08\x14\n\xa1\x01\n\x04\x04\x01\x02\0\x12\x03\x1b\ + \x04!\x1a\x93\x01\x20The\x20hostname/SNI\x20to\x20use\x20for\x20this\x20\ + host\n\n\x20The\x20hostname\x20is\x20the\x20only\x20required\x20field,\ + \x20although\x20other\n\x20fields\x20are\x20expected\x20to\x20be\x20pres\ + ent\x20in\x20most\x20cases.\n\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x1b\ + \x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x1b\r\x13\n\x0c\n\x05\x04\ + \x01\x02\0\x01\x12\x03\x1b\x14\x1c\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\ + \x1b\x1f\x20\n\xf7\x01\n\x04\x04\x01\x02\x01\x12\x03\"\x04\"\x1a\xe9\x01\ + \x20The\x2032-bit\x20ipv4\x20address,\x20in\x20network\x20byte\x20order\ + \n\n\x20If\x20the\x20IPv4\x20address\x20is\x20absent,\x20then\x20it\x20m\ + ay\x20be\x20resolved\x20via\n\x20DNS\x20by\x20the\x20client,\x20or\x20th\ + e\x20client\x20may\x20discard\x20this\x20decoy\x20spec\n\x20if\x20local\ + \x20DNS\x20is\x20untrusted,\x20or\x20the\x20service\x20may\x20be\x20mult\ + ihomed.\n\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\x03\"\x04\x0c\n\x0c\n\x05\ + \x04\x01\x02\x01\x05\x12\x03\"\r\x14\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\ + \x03\"\x15\x1d\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\"\x20!\n>\n\x04\ + \x04\x01\x02\x02\x12\x03%\x04\x20\x1a1\x20The\x20128-bit\x20ipv6\x20addr\ + ess,\x20in\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\ + \x20default\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\x032\x04\x20\x1a\xe0\x01\x20The\x20maximum\x20durat\ + ion,\x20in\x20milliseconds,\x20to\x20maintain\x20an\x20open\n\x20connect\ + ion\x20to\x20this\x20decoy\x20(because\x20the\x20decoy\x20may\x20close\ + \x20the\n\x20connection\x20itself\x20after\x20this\x20length\x20of\x20ti\ + me)\n\n\x20If\x20omitted,\x20a\x20default\x20of\x2030,000\x20millisecond\ + s\x20is\x20assumed.\n\n\x0c\n\x05\x04\x01\x02\x04\x04\x12\x032\x04\x0c\n\ + \x0c\n\x05\x04\x01\x02\x04\x05\x12\x032\r\x13\n\x0c\n\x05\x04\x01\x02\ + \x04\x01\x12\x032\x14\x1b\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x032\x1e\ + \x1f\n\xb0\x02\n\x04\x04\x01\x02\x05\x12\x03;\x04\x1f\x1a\xa2\x02\x20The\ + \x20maximum\x20TCP\x20window\x20size\x20to\x20attempt\x20to\x20use\x20fo\ + r\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\x20th\ + at\x20permit\x20windows\x20of\x2015KB\x20or\x20larger.\x20\x20If\x20this\ + \n\x20heuristic\x20changes,\x20then\x20this\x20default\x20doesn't\x20mak\ + e\x20sense.\n\n\x0c\n\x05\x04\x01\x02\x05\x04\x12\x03;\x04\x0c\n\x0c\n\ + \x05\x04\x01\x02\x05\x05\x12\x03;\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\ + \x12\x03;\x14\x1a\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03;\x1d\x1e\n\x83\ + \x08\n\x02\x04\x02\x12\x04S\0Z\x012\xf6\x07\x20In\x20version\x201,\x20th\ + e\x20request\x20is\x20very\x20simple:\x20when\n\x20the\x20client\x20send\ + s\x20a\x20MSG_PROTO\x20to\x20the\x20station,\x20if\x20the\n\x20generatio\ + n\x20number\x20is\x20present,\x20then\x20this\x20request\x20includes\n\ + \x20(in\x20addition\x20to\x20whatever\x20other\x20operations\x20are\x20p\ + art\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\x20number\x20in\x20its\x20request.\n\n\x20If\x20the\x20re\ + sponse\x20contains\x20a\x20DecoyListUpdate\x20with\x20a\x20generation\ + \x20number\x20equal\n\x20to\x20that\x20which\x20the\x20client\x20sent,\ + \x20then\x20the\x20client\x20is\x20\"caught\x20up\"\x20with\n\x20the\x20\ + station\x20and\x20the\x20response\x20contains\x20no\x20new\x20informatio\ + n\n\x20(and\x20all\x20other\x20fields\x20may\x20be\x20omitted\x20or\x20e\ + mpty).\x20\x20Otherwise,\n\x20the\x20station\x20will\x20send\x20the\x20l\ + atest\x20configuration\x20information,\n\x20along\x20with\x20its\x20gene\ + ration\x20number.\n\n\x20The\x20station\x20can\x20also\x20send\x20Client\ + Conf\x20messages\n\x20(as\x20part\x20of\x20Station2Client\x20messages)\ + \x20whenever\x20it\x20wants.\n\x20The\x20client\x20is\x20expected\x20to\ + \x20react\x20as\x20if\x20it\x20had\x20requested\n\x20such\x20messages\ + \x20--\x20possibly\x20by\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\x03S\x08\x12\n\x0b\n\x04\x04\x02\ + \x02\0\x12\x03T\x04&\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03T\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\0\x06\x12\x03T\r\x16\n\x0c\n\x05\x04\x02\x02\0\ + \x01\x12\x03T\x17!\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03T$%\n\x0b\n\x04\ + \x04\x02\x02\x01\x12\x03U\x04#\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03U\ + \x04\x0c\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03U\r\x13\n\x0c\n\x05\x04\ + \x02\x02\x01\x01\x12\x03U\x14\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\ + \x03U!\"\n\x0b\n\x04\x04\x02\x02\x02\x12\x03V\x04'\n\x0c\n\x05\x04\x02\ + \x02\x02\x04\x12\x03V\x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x06\x12\x03V\r\ + \x13\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03V\x14\"\n\x0c\n\x05\x04\x02\ + \x02\x02\x03\x12\x03V%&\n\x0b\n\x04\x04\x02\x02\x03\x12\x03W\x049\n\x0c\ + \n\x05\x04\x02\x02\x03\x04\x12\x03W\x04\x0c\n\x0c\n\x05\x04\x02\x02\x03\ + \x06\x12\x03W\r\x1f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03W\x204\n\x0c\ + \n\x05\x04\x02\x02\x03\x03\x12\x03W78\n\x0b\n\x04\x04\x02\x02\x04\x12\ + \x03X\x04'\n\x0c\n\x05\x04\x02\x02\x04\x04\x12\x03X\x04\x0c\n\x0c\n\x05\ + \x04\x02\x02\x04\x06\x12\x03X\r\x13\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\ + \x03X\x14\"\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03X%&\n\x0b\n\x04\x04\ + \x02\x02\x05\x12\x03Y\x04)\n\x0c\n\x05\x04\x02\x02\x05\x04\x12\x03Y\x04\ + \x0c\n\x0c\n\x05\x04\x02\x02\x05\x06\x12\x03Y\r\x17\n\x0c\n\x05\x04\x02\ + \x02\x05\x01\x12\x03Y\x18$\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03Y'(\n-\ + \n\x02\x04\x03\x12\x04]\0d\x01\x1a!\x20Configuration\x20for\x20DNS\x20re\ + gistrar\n\n\n\n\x03\x04\x03\x01\x12\x03]\x08\x12\n\x0b\n\x04\x04\x03\x02\ + \0\x12\x03^\x04-\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03^\x04\x0c\n\x0c\n\ \x05\x04\x03\x02\0\x06\x12\x03^\r\x19\n\x0c\n\x05\x04\x03\x02\0\x01\x12\ \x03^\x1a(\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03^+,\n\x0b\n\x04\x04\x03\ \x02\x01\x12\x03_\x04\x1f\n\x0c\n\x05\x04\x03\x02\x01\x04\x12\x03_\x04\ @@ -7017,15 +7055,15 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \xf2\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x04\x05\x12\x04\xf2\x01\r\x13\n\r\ \n\x05\x04\x0c\x02\x04\x01\x12\x04\xf2\x01\x14&\n\r\n\x05\x04\x0c\x02\ \x04\x03\x12\x04\xf2\x01)*\n\xa5\x02\n\x04\x04\x0c\x02\x05\x12\x04\xf7\ - \x01\x040\x1a\x96\x02\x20Indicates\x20whether\x20the\x20client\x20will\ + \x01\x042\x1a\x96\x02\x20Indicates\x20whether\x20the\x20client\x20will\ \x20allow\x20the\x20registrar\x20to\x20provide\x20alternative\x20paramet\ ers\x20that\n\x20may\x20work\x20better\x20in\x20substitute\x20for\x20the\ \x20deterministically\x20selected\x20parameters.\x20This\x20only\x20work\ s\n\x20for\x20bidirectional\x20registration\x20methods\x20where\x20the\ \x20client\x20receives\x20a\x20RegistrationResponse.\n\n\r\n\x05\x04\x0c\ \x02\x05\x04\x12\x04\xf7\x01\x04\x0c\n\r\n\x05\x04\x0c\x02\x05\x05\x12\ - \x04\xf7\x01\r\x11\n\r\n\x05\x04\x0c\x02\x05\x01\x12\x04\xf7\x01\x12+\n\ - \r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf7\x01./\nq\n\x04\x04\x0c\x02\x06\ + \x04\xf7\x01\r\x11\n\r\n\x05\x04\x0c\x02\x05\x01\x12\x04\xf7\x01\x12-\n\ + \r\n\x05\x04\x0c\x02\x05\x03\x12\x04\xf7\x0101\nq\n\x04\x04\x0c\x02\x06\ \x12\x04\xfb\x01\x04'\x1ac\x20List\x20of\x20decoys\x20that\x20client\x20\ have\x20unsuccessfully\x20tried\x20in\x20current\x20session.\n\x20Could\ \x20be\x20sent\x20in\x20chunks\n\n\r\n\x05\x04\x0c\x02\x06\x04\x12\x04\ @@ -7085,7 +7123,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20fingerprinting.\n\n\r\n\x05\x04\x0c\x02\x10\x04\x12\x04\x9b\x02\x04\ \x0c\n\r\n\x05\x04\x0c\x02\x10\x05\x12\x04\x9b\x02\r\x12\n\r\n\x05\x04\ \x0c\x02\x10\x01\x12\x04\x9b\x02\x13\x1a\n\r\n\x05\x04\x0c\x02\x10\x03\ - \x12\x04\x9b\x02\x1d\x20\n\x0c\n\x02\x04\r\x12\x06\x9f\x02\0\xb0\x02\x01\ + \x12\x04\x9b\x02\x1d\x20\n\x0c\n\x02\x04\r\x12\x06\x9f\x02\0\xb1\x02\x01\ \n\x0b\n\x03\x04\r\x01\x12\x04\x9f\x02\x08\x1d\n!\n\x04\x04\r\x02\0\x12\ \x04\xa1\x02\x04!\x1a\x13\x20Prefix\x20Identifier\n\n\r\n\x05\x04\r\x02\ \0\x04\x12\x04\xa1\x02\x04\x0c\n\r\n\x05\x04\r\x02\0\x05\x12\x04\xa1\x02\ @@ -7098,209 +7136,212 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20connection.\n\n\r\n\x05\x04\r\x02\x01\x04\x12\x04\xa5\x02\x04\x0c\n\ \r\n\x05\x04\r\x02\x01\x05\x12\x04\xa5\x02\r\x12\n\r\n\x05\x04\r\x02\x01\ \x01\x12\x04\xa5\x02\x13\x19\n\r\n\x05\x04\r\x02\x01\x03\x12\x04\xa5\x02\ - \x1c\x1d\n\xed\x02\n\x04\x04\r\x02\x02\x12\x04\xaf\x02\x04*\x1a\xbc\x01\ - \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ - \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ - \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ - ion\x20port\x20randomization\x20is\n\x20supported.\n2\x9f\x01\x20//\x20p\ - otential\x20future\x20fields\n\x20obfuscator\x20ID\n\x20tagEncoder\x20ID\ - \x20(¶ms?,\x20e.g.\x20format-base64\x20/\x20padding)\n\x20streamEnco\ - der\x20ID\x20(¶ms?,\x20e.g.\x20foramat-base64\x20/\x20padding)\n\n\r\ - \n\x05\x04\r\x02\x02\x04\x12\x04\xaf\x02\x04\x0c\n\r\n\x05\x04\r\x02\x02\ - \x05\x12\x04\xaf\x02\r\x11\n\r\n\x05\x04\r\x02\x02\x01\x12\x04\xaf\x02\ - \x12$\n\r\n\x05\x04\r\x02\x02\x03\x12\x04\xaf\x02')\n\x0c\n\x02\x04\x0e\ - \x12\x06\xb2\x02\0\xb7\x02\x01\n\x0b\n\x03\x04\x0e\x01\x12\x04\xb2\x02\ - \x08\x1e\n\xcb\x01\n\x04\x04\x0e\x02\0\x12\x04\xb6\x02\x04*\x1a\xbc\x01\ - \x20Indicates\x20whether\x20the\x20client\x20has\x20elected\x20to\x20use\ - \x20destination\x20port\x20randomization.\x20Should\x20be\n\x20checked\ - \x20against\x20selected\x20transport\x20to\x20ensure\x20that\x20destinat\ - ion\x20port\x20randomization\x20is\n\x20supported.\n\n\r\n\x05\x04\x0e\ - \x02\0\x04\x12\x04\xb6\x02\x04\x0c\n\r\n\x05\x04\x0e\x02\0\x05\x12\x04\ - \xb6\x02\r\x11\n\r\n\x05\x04\x0e\x02\0\x01\x12\x04\xb6\x02\x12$\n\r\n\ - \x05\x04\x0e\x02\0\x03\x12\x04\xb6\x02')\n\x0c\n\x02\x05\x06\x12\x06\xb9\ - \x02\0\xc1\x02\x01\n\x0b\n\x03\x05\x06\x01\x12\x04\xb9\x02\x05\x17\n\x0c\ - \n\x04\x05\x06\x02\0\x12\x04\xba\x02\x02\x12\n\r\n\x05\x05\x06\x02\0\x01\ - \x12\x04\xba\x02\x02\r\n\r\n\x05\x05\x06\x02\0\x02\x12\x04\xba\x02\x10\ - \x11\n\x0c\n\x04\x05\x06\x02\x01\x12\x04\xbb\x02\x08\x15\n\r\n\x05\x05\ - \x06\x02\x01\x01\x12\x04\xbb\x02\x08\x10\n\r\n\x05\x05\x06\x02\x01\x02\ - \x12\x04\xbb\x02\x13\x14\n\x0c\n\x04\x05\x06\x02\x02\x12\x04\xbc\x02\x08\ - \x10\n\r\n\x05\x05\x06\x02\x02\x01\x12\x04\xbc\x02\x08\x0b\n\r\n\x05\x05\ - \x06\x02\x02\x02\x12\x04\xbc\x02\x0e\x0f\n\x0c\n\x04\x05\x06\x02\x03\x12\ - \x04\xbd\x02\x02\x16\n\r\n\x05\x05\x06\x02\x03\x01\x12\x04\xbd\x02\x02\ - \x11\n\r\n\x05\x05\x06\x02\x03\x02\x12\x04\xbd\x02\x14\x15\n\x0c\n\x04\ - \x05\x06\x02\x04\x12\x04\xbe\x02\x02\x17\n\r\n\x05\x05\x06\x02\x04\x01\ - \x12\x04\xbe\x02\x02\x12\n\r\n\x05\x05\x06\x02\x04\x02\x12\x04\xbe\x02\ - \x15\x16\n\x0c\n\x04\x05\x06\x02\x05\x12\x04\xbf\x02\x02\n\n\r\n\x05\x05\ - \x06\x02\x05\x01\x12\x04\xbf\x02\x02\x05\n\r\n\x05\x05\x06\x02\x05\x02\ - \x12\x04\xbf\x02\x08\t\n\x0c\n\x04\x05\x06\x02\x06\x12\x04\xc0\x02\x02\ - \x17\n\r\n\x05\x05\x06\x02\x06\x01\x12\x04\xc0\x02\x02\x12\n\r\n\x05\x05\ - \x06\x02\x06\x02\x12\x04\xc0\x02\x15\x16\n\x0c\n\x02\x04\x0f\x12\x06\xc3\ - \x02\0\xdb\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\x04\xc3\x02\x08\x12\n\x0c\ - \n\x04\x04\x0f\x02\0\x12\x04\xc4\x02\x02#\n\r\n\x05\x04\x0f\x02\0\x04\ - \x12\x04\xc4\x02\x02\n\n\r\n\x05\x04\x0f\x02\0\x05\x12\x04\xc4\x02\x0b\ - \x10\n\r\n\x05\x04\x0f\x02\0\x01\x12\x04\xc4\x02\x11\x1e\n\r\n\x05\x04\ - \x0f\x02\0\x03\x12\x04\xc4\x02!\"\n\x0c\n\x04\x04\x0f\x02\x01\x12\x04\ - \xc5\x02\x024\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\xc5\x02\x02\n\n\r\n\ - \x05\x04\x0f\x02\x01\x06\x12\x04\xc5\x02\x0b\x1a\n\r\n\x05\x04\x0f\x02\ - \x01\x01\x12\x04\xc5\x02\x1b/\n\r\n\x05\x04\x0f\x02\x01\x03\x12\x04\xc5\ - \x0223\n\x0c\n\x04\x04\x0f\x02\x02\x12\x04\xc6\x02\x026\n\r\n\x05\x04\ - \x0f\x02\x02\x04\x12\x04\xc6\x02\x02\n\n\r\n\x05\x04\x0f\x02\x02\x06\x12\ - \x04\xc6\x02\x0b\x1d\n\r\n\x05\x04\x0f\x02\x02\x01\x12\x04\xc6\x02\x1e1\ - \n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xc6\x0245\nC\n\x04\x04\x0f\x02\ - \x03\x12\x04\xc9\x02\x02*\x1a5\x20client\x20source\x20address\x20when\ - \x20receiving\x20a\x20registration\n\n\r\n\x05\x04\x0f\x02\x03\x04\x12\ - \x04\xc9\x02\x02\n\n\r\n\x05\x04\x0f\x02\x03\x05\x12\x04\xc9\x02\x0b\x10\ - \n\r\n\x05\x04\x0f\x02\x03\x01\x12\x04\xc9\x02\x11%\n\r\n\x05\x04\x0f\ - \x02\x03\x03\x12\x04\xc9\x02()\nH\n\x04\x04\x0f\x02\x04\x12\x04\xcc\x02\ - \x02#\x1a:\x20Decoy\x20address\x20used\x20when\x20registering\x20over\ - \x20Decoy\x20registrar\n\n\r\n\x05\x04\x0f\x02\x04\x04\x12\x04\xcc\x02\ - \x02\n\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\xcc\x02\x0b\x10\n\r\n\x05\ - \x04\x0f\x02\x04\x01\x12\x04\xcc\x02\x11\x1e\n\r\n\x05\x04\x0f\x02\x04\ - \x03\x12\x04\xcc\x02!\"\n\xeb\x05\n\x04\x04\x0f\x02\x05\x12\x04\xd8\x02\ - \x02:\x1a\xdc\x05\x20The\x20next\x20three\x20fields\x20allow\x20an\x20in\ - dependent\x20registrar\x20(trusted\x20by\x20a\x20station\x20w/\x20a\x20z\ - mq\x20keypair)\x20to\n\x20share\x20the\x20registration\x20overrides\x20t\ - hat\x20it\x20assigned\x20to\x20the\x20client\x20with\x20the\x20station(s\ - ).\n\x20Registration\x20Respose\x20is\x20here\x20to\x20allow\x20a\x20par\ - sed\x20object\x20with\x20direct\x20access\x20to\x20the\x20fields\x20with\ - in.\n\x20RegRespBytes\x20provides\x20a\x20serialized\x20verion\x20of\x20\ - the\x20Registration\x20response\x20so\x20that\x20the\x20signature\x20of\ - \n\x20the\x20Bidirectional\x20registrar\x20can\x20be\x20validated\x20bef\ - ore\x20a\x20station\x20applies\x20any\x20overrides\x20present\x20in\n\ - \x20the\x20Registration\x20Response.\n\n\x20If\x20you\x20are\x20reading\ - \x20this\x20in\x20the\x20future\x20and\x20you\x20want\x20to\x20extend\ - \x20the\x20functionality\x20here\x20it\x20might\n\x20make\x20sense\x20to\ - \x20make\x20the\x20RegistrationResponse\x20that\x20is\x20sent\x20to\x20t\ - he\x20client\x20a\x20distinct\x20message\x20from\n\x20the\x20one\x20that\ - \x20gets\x20sent\x20to\x20the\x20stations.\n\n\r\n\x05\x04\x0f\x02\x05\ - \x04\x12\x04\xd8\x02\x02\n\n\r\n\x05\x04\x0f\x02\x05\x06\x12\x04\xd8\x02\ - \x0b\x1f\n\r\n\x05\x04\x0f\x02\x05\x01\x12\x04\xd8\x02\x205\n\r\n\x05\ - \x04\x0f\x02\x05\x03\x12\x04\xd8\x0289\n\x0c\n\x04\x04\x0f\x02\x06\x12\ - \x04\xd9\x02\x02\"\n\r\n\x05\x04\x0f\x02\x06\x04\x12\x04\xd9\x02\x02\n\n\ - \r\n\x05\x04\x0f\x02\x06\x05\x12\x04\xd9\x02\x0b\x10\n\r\n\x05\x04\x0f\ - \x02\x06\x01\x12\x04\xd9\x02\x11\x1d\n\r\n\x05\x04\x0f\x02\x06\x03\x12\ - \x04\xd9\x02\x20!\n\x0c\n\x04\x04\x0f\x02\x07\x12\x04\xda\x02\x02'\n\r\n\ - \x05\x04\x0f\x02\x07\x04\x12\x04\xda\x02\x02\n\n\r\n\x05\x04\x0f\x02\x07\ - \x05\x12\x04\xda\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x07\x01\x12\x04\xda\ - \x02\x11!\n\r\n\x05\x04\x0f\x02\x07\x03\x12\x04\xda\x02$&\n\x0c\n\x02\ - \x04\x10\x12\x06\xdd\x02\0\xe9\x02\x01\n\x0b\n\x03\x04\x10\x01\x12\x04\ - \xdd\x02\x08\x14\n9\n\x04\x04\x10\x02\0\x12\x04\xde\x02\x04.\"+\x20how\ - \x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\x05\x04\ - \x10\x02\0\x04\x12\x04\xde\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\x05\x12\ - \x04\xde\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xde\x02\x14(\n\r\ - \n\x05\x04\x10\x02\0\x03\x12\x04\xde\x02+-\nm\n\x04\x04\x10\x02\x01\x12\ - \x04\xe3\x02\x04/\x1a\x1e\x20Applicable\x20to\x20whole\x20session:\n\"\ - \x1a\x20includes\x20failed\x20attempts\n2#\x20Timings\x20below\x20are\ - \x20in\x20milliseconds\n\n\r\n\x05\x04\x10\x02\x01\x04\x12\x04\xe3\x02\ - \x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xe3\x02\r\x13\n\r\n\x05\ - \x04\x10\x02\x01\x01\x12\x04\xe3\x02\x14)\n\r\n\x05\x04\x10\x02\x01\x03\ - \x12\x04\xe3\x02,.\nR\n\x04\x04\x10\x02\x02\x12\x04\xe6\x02\x04(\x1a\x1f\ - \x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20during\ - \x20initial\x20handshake\n\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xe6\x02\ - \x04\x0c\n\r\n\x05\x04\x10\x02\x02\x05\x12\x04\xe6\x02\r\x13\n\r\n\x05\ - \x04\x10\x02\x02\x01\x12\x04\xe6\x02\x14\"\n\r\n\x05\x04\x10\x02\x02\x03\ - \x12\x04\xe6\x02%'\n%\n\x04\x04\x10\x02\x03\x12\x04\xe7\x02\x04&\"\x17\ - \x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x10\x02\x03\x04\x12\ - \x04\xe7\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x05\x12\x04\xe7\x02\r\x13\ - \n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xe7\x02\x14\x20\n\r\n\x05\x04\x10\ - \x02\x03\x03\x12\x04\xe7\x02#%\nB\n\x04\x04\x10\x02\x04\x12\x04\xe8\x02\ - \x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\x20to\ - \x20decot\n\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xe8\x02\x04\x0c\n\r\n\ - \x05\x04\x10\x02\x04\x05\x12\x04\xe8\x02\r\x13\n\r\n\x05\x04\x10\x02\x04\ - \x01\x12\x04\xe8\x02\x14\x20\n\r\n\x05\x04\x10\x02\x04\x03\x12\x04\xe8\ - \x02#%\n\x0c\n\x02\x05\x07\x12\x06\xeb\x02\0\xf0\x02\x01\n\x0b\n\x03\x05\ - \x07\x01\x12\x04\xeb\x02\x05\x16\n\x0c\n\x04\x05\x07\x02\0\x12\x04\xec\ - \x02\x04\x10\n\r\n\x05\x05\x07\x02\0\x01\x12\x04\xec\x02\x04\x0b\n\r\n\ - \x05\x05\x07\x02\0\x02\x12\x04\xec\x02\x0e\x0f\n\x0c\n\x04\x05\x07\x02\ - \x01\x12\x04\xed\x02\x04\x0c\n\r\n\x05\x05\x07\x02\x01\x01\x12\x04\xed\ - \x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\x02\x12\x04\xed\x02\n\x0b\n\x0c\n\ - \x04\x05\x07\x02\x02\x12\x04\xee\x02\x04\x0f\n\r\n\x05\x05\x07\x02\x02\ - \x01\x12\x04\xee\x02\x04\n\n\r\n\x05\x05\x07\x02\x02\x02\x12\x04\xee\x02\ - \r\x0e\n\x0c\n\x04\x05\x07\x02\x03\x12\x04\xef\x02\x04\x0e\n\r\n\x05\x05\ - \x07\x02\x03\x01\x12\x04\xef\x02\x04\t\n\r\n\x05\x05\x07\x02\x03\x02\x12\ - \x04\xef\x02\x0c\r\n\x0c\n\x02\x05\x08\x12\x06\xf2\x02\0\xf6\x02\x01\n\ - \x0b\n\x03\x05\x08\x01\x12\x04\xf2\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\0\ - \x12\x04\xf3\x02\x04\x0c\n\r\n\x05\x05\x08\x02\0\x01\x12\x04\xf3\x02\x04\ - \x07\n\r\n\x05\x05\x08\x02\0\x02\x12\x04\xf3\x02\n\x0b\n\x0c\n\x04\x05\ - \x08\x02\x01\x12\x04\xf4\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\x12\ - \x04\xf4\x02\x04\x07\n\r\n\x05\x05\x08\x02\x01\x02\x12\x04\xf4\x02\n\x0b\ - \n\x0c\n\x04\x05\x08\x02\x02\x12\x04\xf5\x02\x04\x0c\n\r\n\x05\x05\x08\ - \x02\x02\x01\x12\x04\xf5\x02\x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\x12\ - \x04\xf5\x02\n\x0b\n\x0c\n\x02\x04\x11\x12\x06\xf8\x02\0\x83\x03\x01\n\ - \x0b\n\x03\x04\x11\x01\x12\x04\xf8\x02\x08\x19\n\x0c\n\x04\x04\x11\x02\0\ - \x12\x04\xf9\x02\x04#\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xf9\x02\x04\ - \x0c\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xf9\x02\r\x13\n\r\n\x05\x04\x11\ - \x02\0\x01\x12\x04\xf9\x02\x14\x1e\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\ - \xf9\x02!\"\n\x0c\n\x04\x04\x11\x02\x01\x12\x04\xfa\x02\x04\"\n\r\n\x05\ - \x04\x11\x02\x01\x04\x12\x04\xfa\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x01\ - \x05\x12\x04\xfa\x02\r\x13\n\r\n\x05\x04\x11\x02\x01\x01\x12\x04\xfa\x02\ - \x14\x1d\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xfa\x02\x20!\n\x0c\n\x04\ - \x04\x11\x02\x02\x12\x04\xfc\x02\x04#\n\r\n\x05\x04\x11\x02\x02\x04\x12\ - \x04\xfc\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xfc\x02\r\x13\ - \n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xfc\x02\x14\x1e\n\r\n\x05\x04\x11\ - \x02\x02\x03\x12\x04\xfc\x02!\"\n\x0c\n\x04\x04\x11\x02\x03\x12\x04\xfe\ - \x02\x04-\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xfe\x02\x04\x0c\n\r\n\ - \x05\x04\x11\x02\x03\x06\x12\x04\xfe\x02\r\x1e\n\r\n\x05\x04\x11\x02\x03\ - \x01\x12\x04\xfe\x02\x1f(\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\xfe\x02+\ - ,\n\x0c\n\x04\x04\x11\x02\x04\x12\x04\x80\x03\x04\"\n\r\n\x05\x04\x11\ - \x02\x04\x04\x12\x04\x80\x03\x04\x0c\n\r\n\x05\x04\x11\x02\x04\x05\x12\ - \x04\x80\x03\r\x13\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\x80\x03\x14\x1c\ - \n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\x80\x03\x1f!\n\x0c\n\x04\x04\x11\ - \x02\x05\x12\x04\x81\x03\x04\"\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\x81\ - \x03\x04\x0c\n\r\n\x05\x04\x11\x02\x05\x05\x12\x04\x81\x03\r\x13\n\r\n\ - \x05\x04\x11\x02\x05\x01\x12\x04\x81\x03\x14\x1c\n\r\n\x05\x04\x11\x02\ - \x05\x03\x12\x04\x81\x03\x1f!\n\x0c\n\x04\x04\x11\x02\x06\x12\x04\x82\ - \x03\x04\x20\n\r\n\x05\x04\x11\x02\x06\x04\x12\x04\x82\x03\x04\x0c\n\r\n\ - \x05\x04\x11\x02\x06\x06\x12\x04\x82\x03\r\x14\n\r\n\x05\x04\x11\x02\x06\ - \x01\x12\x04\x82\x03\x15\x1a\n\r\n\x05\x04\x11\x02\x06\x03\x12\x04\x82\ - \x03\x1d\x1f\nT\n\x02\x04\x12\x12\x06\x86\x03\0\x9a\x03\x01\x1aF\x20Addi\ + \x1c\x1d\n\x0c\n\x04\x04\r\x02\x02\x12\x04\xa6\x02\x04)\n\r\n\x05\x04\r\ + \x02\x02\x04\x12\x04\xa6\x02\x04\x0c\n\r\n\x05\x04\r\x02\x02\x05\x12\x04\ + \xa6\x02\r\x11\n\r\n\x05\x04\r\x02\x02\x01\x12\x04\xa6\x02\x12$\n\r\n\ + \x05\x04\r\x02\x02\x03\x12\x04\xa6\x02'(\n\xed\x02\n\x04\x04\r\x02\x03\ + \x12\x04\xb0\x02\x04*\x1a\xbc\x01\x20Indicates\x20whether\x20the\x20clie\ + nt\x20has\x20elected\x20to\x20use\x20destination\x20port\x20randomizatio\ + n.\x20Should\x20be\n\x20checked\x20against\x20selected\x20transport\x20t\ + o\x20ensure\x20that\x20destination\x20port\x20randomization\x20is\n\x20s\ + upported.\n2\x9f\x01\x20//\x20potential\x20future\x20fields\n\x20obfusca\ + tor\x20ID\n\x20tagEncoder\x20ID\x20(¶ms?,\x20e.g.\x20format-base64\ + \x20/\x20padding)\n\x20streamEncoder\x20ID\x20(¶ms?,\x20e.g.\x20fora\ + mat-base64\x20/\x20padding)\n\n\r\n\x05\x04\r\x02\x03\x04\x12\x04\xb0\ + \x02\x04\x0c\n\r\n\x05\x04\r\x02\x03\x05\x12\x04\xb0\x02\r\x11\n\r\n\x05\ + \x04\r\x02\x03\x01\x12\x04\xb0\x02\x12$\n\r\n\x05\x04\r\x02\x03\x03\x12\ + \x04\xb0\x02')\n\x0c\n\x02\x04\x0e\x12\x06\xb3\x02\0\xb8\x02\x01\n\x0b\n\ + \x03\x04\x0e\x01\x12\x04\xb3\x02\x08\x1e\n\xcb\x01\n\x04\x04\x0e\x02\0\ + \x12\x04\xb7\x02\x04*\x1a\xbc\x01\x20Indicates\x20whether\x20the\x20clie\ + nt\x20has\x20elected\x20to\x20use\x20destination\x20port\x20randomizatio\ + n.\x20Should\x20be\n\x20checked\x20against\x20selected\x20transport\x20t\ + o\x20ensure\x20that\x20destination\x20port\x20randomization\x20is\n\x20s\ + upported.\n\n\r\n\x05\x04\x0e\x02\0\x04\x12\x04\xb7\x02\x04\x0c\n\r\n\ + \x05\x04\x0e\x02\0\x05\x12\x04\xb7\x02\r\x11\n\r\n\x05\x04\x0e\x02\0\x01\ + \x12\x04\xb7\x02\x12$\n\r\n\x05\x04\x0e\x02\0\x03\x12\x04\xb7\x02')\n\ + \x0c\n\x02\x05\x06\x12\x06\xba\x02\0\xc2\x02\x01\n\x0b\n\x03\x05\x06\x01\ + \x12\x04\xba\x02\x05\x17\n\x0c\n\x04\x05\x06\x02\0\x12\x04\xbb\x02\x02\ + \x12\n\r\n\x05\x05\x06\x02\0\x01\x12\x04\xbb\x02\x02\r\n\r\n\x05\x05\x06\ + \x02\0\x02\x12\x04\xbb\x02\x10\x11\n\x0c\n\x04\x05\x06\x02\x01\x12\x04\ + \xbc\x02\x08\x15\n\r\n\x05\x05\x06\x02\x01\x01\x12\x04\xbc\x02\x08\x10\n\ + \r\n\x05\x05\x06\x02\x01\x02\x12\x04\xbc\x02\x13\x14\n\x0c\n\x04\x05\x06\ + \x02\x02\x12\x04\xbd\x02\x08\x10\n\r\n\x05\x05\x06\x02\x02\x01\x12\x04\ + \xbd\x02\x08\x0b\n\r\n\x05\x05\x06\x02\x02\x02\x12\x04\xbd\x02\x0e\x0f\n\ + \x0c\n\x04\x05\x06\x02\x03\x12\x04\xbe\x02\x02\x16\n\r\n\x05\x05\x06\x02\ + \x03\x01\x12\x04\xbe\x02\x02\x11\n\r\n\x05\x05\x06\x02\x03\x02\x12\x04\ + \xbe\x02\x14\x15\n\x0c\n\x04\x05\x06\x02\x04\x12\x04\xbf\x02\x02\x17\n\r\ + \n\x05\x05\x06\x02\x04\x01\x12\x04\xbf\x02\x02\x12\n\r\n\x05\x05\x06\x02\ + \x04\x02\x12\x04\xbf\x02\x15\x16\n\x0c\n\x04\x05\x06\x02\x05\x12\x04\xc0\ + \x02\x02\n\n\r\n\x05\x05\x06\x02\x05\x01\x12\x04\xc0\x02\x02\x05\n\r\n\ + \x05\x05\x06\x02\x05\x02\x12\x04\xc0\x02\x08\t\n\x0c\n\x04\x05\x06\x02\ + \x06\x12\x04\xc1\x02\x02\x17\n\r\n\x05\x05\x06\x02\x06\x01\x12\x04\xc1\ + \x02\x02\x12\n\r\n\x05\x05\x06\x02\x06\x02\x12\x04\xc1\x02\x15\x16\n\x0c\ + \n\x02\x04\x0f\x12\x06\xc4\x02\0\xdc\x02\x01\n\x0b\n\x03\x04\x0f\x01\x12\ + \x04\xc4\x02\x08\x12\n\x0c\n\x04\x04\x0f\x02\0\x12\x04\xc5\x02\x02#\n\r\ + \n\x05\x04\x0f\x02\0\x04\x12\x04\xc5\x02\x02\n\n\r\n\x05\x04\x0f\x02\0\ + \x05\x12\x04\xc5\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\0\x01\x12\x04\xc5\x02\ + \x11\x1e\n\r\n\x05\x04\x0f\x02\0\x03\x12\x04\xc5\x02!\"\n\x0c\n\x04\x04\ + \x0f\x02\x01\x12\x04\xc6\x02\x024\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\ + \xc6\x02\x02\n\n\r\n\x05\x04\x0f\x02\x01\x06\x12\x04\xc6\x02\x0b\x1a\n\r\ + \n\x05\x04\x0f\x02\x01\x01\x12\x04\xc6\x02\x1b/\n\r\n\x05\x04\x0f\x02\ + \x01\x03\x12\x04\xc6\x0223\n\x0c\n\x04\x04\x0f\x02\x02\x12\x04\xc7\x02\ + \x026\n\r\n\x05\x04\x0f\x02\x02\x04\x12\x04\xc7\x02\x02\n\n\r\n\x05\x04\ + \x0f\x02\x02\x06\x12\x04\xc7\x02\x0b\x1d\n\r\n\x05\x04\x0f\x02\x02\x01\ + \x12\x04\xc7\x02\x1e1\n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\xc7\x0245\nC\ + \n\x04\x04\x0f\x02\x03\x12\x04\xca\x02\x02*\x1a5\x20client\x20source\x20\ + address\x20when\x20receiving\x20a\x20registration\n\n\r\n\x05\x04\x0f\ + \x02\x03\x04\x12\x04\xca\x02\x02\n\n\r\n\x05\x04\x0f\x02\x03\x05\x12\x04\ + \xca\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x03\x01\x12\x04\xca\x02\x11%\n\r\ + \n\x05\x04\x0f\x02\x03\x03\x12\x04\xca\x02()\nH\n\x04\x04\x0f\x02\x04\ + \x12\x04\xcd\x02\x02#\x1a:\x20Decoy\x20address\x20used\x20when\x20regist\ + ering\x20over\x20Decoy\x20registrar\n\n\r\n\x05\x04\x0f\x02\x04\x04\x12\ + \x04\xcd\x02\x02\n\n\r\n\x05\x04\x0f\x02\x04\x05\x12\x04\xcd\x02\x0b\x10\ + \n\r\n\x05\x04\x0f\x02\x04\x01\x12\x04\xcd\x02\x11\x1e\n\r\n\x05\x04\x0f\ + \x02\x04\x03\x12\x04\xcd\x02!\"\n\xeb\x05\n\x04\x04\x0f\x02\x05\x12\x04\ + \xd9\x02\x02:\x1a\xdc\x05\x20The\x20next\x20three\x20fields\x20allow\x20\ + an\x20independent\x20registrar\x20(trusted\x20by\x20a\x20station\x20w/\ + \x20a\x20zmq\x20keypair)\x20to\n\x20share\x20the\x20registration\x20over\ + rides\x20that\x20it\x20assigned\x20to\x20the\x20client\x20with\x20the\ + \x20station(s).\n\x20Registration\x20Respose\x20is\x20here\x20to\x20allo\ + w\x20a\x20parsed\x20object\x20with\x20direct\x20access\x20to\x20the\x20f\ + ields\x20within.\n\x20RegRespBytes\x20provides\x20a\x20serialized\x20ver\ + ion\x20of\x20the\x20Registration\x20response\x20so\x20that\x20the\x20sig\ + nature\x20of\n\x20the\x20Bidirectional\x20registrar\x20can\x20be\x20vali\ + dated\x20before\x20a\x20station\x20applies\x20any\x20overrides\x20presen\ + t\x20in\n\x20the\x20Registration\x20Response.\n\n\x20If\x20you\x20are\ + \x20reading\x20this\x20in\x20the\x20future\x20and\x20you\x20want\x20to\ + \x20extend\x20the\x20functionality\x20here\x20it\x20might\n\x20make\x20s\ + ense\x20to\x20make\x20the\x20RegistrationResponse\x20that\x20is\x20sent\ + \x20to\x20the\x20client\x20a\x20distinct\x20message\x20from\n\x20the\x20\ + one\x20that\x20gets\x20sent\x20to\x20the\x20stations.\n\n\r\n\x05\x04\ + \x0f\x02\x05\x04\x12\x04\xd9\x02\x02\n\n\r\n\x05\x04\x0f\x02\x05\x06\x12\ + \x04\xd9\x02\x0b\x1f\n\r\n\x05\x04\x0f\x02\x05\x01\x12\x04\xd9\x02\x205\ + \n\r\n\x05\x04\x0f\x02\x05\x03\x12\x04\xd9\x0289\n\x0c\n\x04\x04\x0f\x02\ + \x06\x12\x04\xda\x02\x02\"\n\r\n\x05\x04\x0f\x02\x06\x04\x12\x04\xda\x02\ + \x02\n\n\r\n\x05\x04\x0f\x02\x06\x05\x12\x04\xda\x02\x0b\x10\n\r\n\x05\ + \x04\x0f\x02\x06\x01\x12\x04\xda\x02\x11\x1d\n\r\n\x05\x04\x0f\x02\x06\ + \x03\x12\x04\xda\x02\x20!\n\x0c\n\x04\x04\x0f\x02\x07\x12\x04\xdb\x02\ + \x02'\n\r\n\x05\x04\x0f\x02\x07\x04\x12\x04\xdb\x02\x02\n\n\r\n\x05\x04\ + \x0f\x02\x07\x05\x12\x04\xdb\x02\x0b\x10\n\r\n\x05\x04\x0f\x02\x07\x01\ + \x12\x04\xdb\x02\x11!\n\r\n\x05\x04\x0f\x02\x07\x03\x12\x04\xdb\x02$&\n\ + \x0c\n\x02\x04\x10\x12\x06\xde\x02\0\xea\x02\x01\n\x0b\n\x03\x04\x10\x01\ + \x12\x04\xde\x02\x08\x14\n9\n\x04\x04\x10\x02\0\x12\x04\xdf\x02\x04.\"+\ + \x20how\x20many\x20decoys\x20were\x20tried\x20before\x20success\n\n\r\n\ + \x05\x04\x10\x02\0\x04\x12\x04\xdf\x02\x04\x0c\n\r\n\x05\x04\x10\x02\0\ + \x05\x12\x04\xdf\x02\r\x13\n\r\n\x05\x04\x10\x02\0\x01\x12\x04\xdf\x02\ + \x14(\n\r\n\x05\x04\x10\x02\0\x03\x12\x04\xdf\x02+-\nm\n\x04\x04\x10\x02\ + \x01\x12\x04\xe4\x02\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\x10\x02\x01\x04\x12\x04\xe4\ + \x02\x04\x0c\n\r\n\x05\x04\x10\x02\x01\x05\x12\x04\xe4\x02\r\x13\n\r\n\ + \x05\x04\x10\x02\x01\x01\x12\x04\xe4\x02\x14)\n\r\n\x05\x04\x10\x02\x01\ + \x03\x12\x04\xe4\x02,.\nR\n\x04\x04\x10\x02\x02\x12\x04\xe7\x02\x04(\x1a\ + \x1f\x20Last\x20(i.e.\x20successful)\x20decoy:\n\"#\x20measured\x20durin\ + g\x20initial\x20handshake\n\n\r\n\x05\x04\x10\x02\x02\x04\x12\x04\xe7\ + \x02\x04\x0c\n\r\n\x05\x04\x10\x02\x02\x05\x12\x04\xe7\x02\r\x13\n\r\n\ + \x05\x04\x10\x02\x02\x01\x12\x04\xe7\x02\x14\"\n\r\n\x05\x04\x10\x02\x02\ + \x03\x12\x04\xe7\x02%'\n%\n\x04\x04\x10\x02\x03\x12\x04\xe8\x02\x04&\"\ + \x17\x20includes\x20tcp\x20to\x20decoy\n\n\r\n\x05\x04\x10\x02\x03\x04\ + \x12\x04\xe8\x02\x04\x0c\n\r\n\x05\x04\x10\x02\x03\x05\x12\x04\xe8\x02\r\ + \x13\n\r\n\x05\x04\x10\x02\x03\x01\x12\x04\xe8\x02\x14\x20\n\r\n\x05\x04\ + \x10\x02\x03\x03\x12\x04\xe8\x02#%\nB\n\x04\x04\x10\x02\x04\x12\x04\xe9\ + \x02\x04&\"4\x20measured\x20when\x20establishing\x20tcp\x20connection\ + \x20to\x20decot\n\n\r\n\x05\x04\x10\x02\x04\x04\x12\x04\xe9\x02\x04\x0c\ + \n\r\n\x05\x04\x10\x02\x04\x05\x12\x04\xe9\x02\r\x13\n\r\n\x05\x04\x10\ + \x02\x04\x01\x12\x04\xe9\x02\x14\x20\n\r\n\x05\x04\x10\x02\x04\x03\x12\ + \x04\xe9\x02#%\n\x0c\n\x02\x05\x07\x12\x06\xec\x02\0\xf1\x02\x01\n\x0b\n\ + \x03\x05\x07\x01\x12\x04\xec\x02\x05\x16\n\x0c\n\x04\x05\x07\x02\0\x12\ + \x04\xed\x02\x04\x10\n\r\n\x05\x05\x07\x02\0\x01\x12\x04\xed\x02\x04\x0b\ + \n\r\n\x05\x05\x07\x02\0\x02\x12\x04\xed\x02\x0e\x0f\n\x0c\n\x04\x05\x07\ + \x02\x01\x12\x04\xee\x02\x04\x0c\n\r\n\x05\x05\x07\x02\x01\x01\x12\x04\ + \xee\x02\x04\x07\n\r\n\x05\x05\x07\x02\x01\x02\x12\x04\xee\x02\n\x0b\n\ + \x0c\n\x04\x05\x07\x02\x02\x12\x04\xef\x02\x04\x0f\n\r\n\x05\x05\x07\x02\ + \x02\x01\x12\x04\xef\x02\x04\n\n\r\n\x05\x05\x07\x02\x02\x02\x12\x04\xef\ + \x02\r\x0e\n\x0c\n\x04\x05\x07\x02\x03\x12\x04\xf0\x02\x04\x0e\n\r\n\x05\ + \x05\x07\x02\x03\x01\x12\x04\xf0\x02\x04\t\n\r\n\x05\x05\x07\x02\x03\x02\ + \x12\x04\xf0\x02\x0c\r\n\x0c\n\x02\x05\x08\x12\x06\xf3\x02\0\xf7\x02\x01\ + \n\x0b\n\x03\x05\x08\x01\x12\x04\xf3\x02\x05\x0c\n\x0c\n\x04\x05\x08\x02\ + \0\x12\x04\xf4\x02\x04\x0c\n\r\n\x05\x05\x08\x02\0\x01\x12\x04\xf4\x02\ + \x04\x07\n\r\n\x05\x05\x08\x02\0\x02\x12\x04\xf4\x02\n\x0b\n\x0c\n\x04\ + \x05\x08\x02\x01\x12\x04\xf5\x02\x04\x0c\n\r\n\x05\x05\x08\x02\x01\x01\ + \x12\x04\xf5\x02\x04\x07\n\r\n\x05\x05\x08\x02\x01\x02\x12\x04\xf5\x02\n\ + \x0b\n\x0c\n\x04\x05\x08\x02\x02\x12\x04\xf6\x02\x04\x0c\n\r\n\x05\x05\ + \x08\x02\x02\x01\x12\x04\xf6\x02\x04\x07\n\r\n\x05\x05\x08\x02\x02\x02\ + \x12\x04\xf6\x02\n\x0b\n\x0c\n\x02\x04\x11\x12\x06\xf9\x02\0\x84\x03\x01\ + \n\x0b\n\x03\x04\x11\x01\x12\x04\xf9\x02\x08\x19\n\x0c\n\x04\x04\x11\x02\ + \0\x12\x04\xfa\x02\x04#\n\r\n\x05\x04\x11\x02\0\x04\x12\x04\xfa\x02\x04\ + \x0c\n\r\n\x05\x04\x11\x02\0\x05\x12\x04\xfa\x02\r\x13\n\r\n\x05\x04\x11\ + \x02\0\x01\x12\x04\xfa\x02\x14\x1e\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\ + \xfa\x02!\"\n\x0c\n\x04\x04\x11\x02\x01\x12\x04\xfb\x02\x04\"\n\r\n\x05\ + \x04\x11\x02\x01\x04\x12\x04\xfb\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x01\ + \x05\x12\x04\xfb\x02\r\x13\n\r\n\x05\x04\x11\x02\x01\x01\x12\x04\xfb\x02\ + \x14\x1d\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\xfb\x02\x20!\n\x0c\n\x04\ + \x04\x11\x02\x02\x12\x04\xfd\x02\x04#\n\r\n\x05\x04\x11\x02\x02\x04\x12\ + \x04\xfd\x02\x04\x0c\n\r\n\x05\x04\x11\x02\x02\x05\x12\x04\xfd\x02\r\x13\ + \n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\xfd\x02\x14\x1e\n\r\n\x05\x04\x11\ + \x02\x02\x03\x12\x04\xfd\x02!\"\n\x0c\n\x04\x04\x11\x02\x03\x12\x04\xff\ + \x02\x04-\n\r\n\x05\x04\x11\x02\x03\x04\x12\x04\xff\x02\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x03\x06\x12\x04\xff\x02\r\x1e\n\r\n\x05\x04\x11\x02\x03\ + \x01\x12\x04\xff\x02\x1f(\n\r\n\x05\x04\x11\x02\x03\x03\x12\x04\xff\x02+\ + ,\n\x0c\n\x04\x04\x11\x02\x04\x12\x04\x81\x03\x04\"\n\r\n\x05\x04\x11\ + \x02\x04\x04\x12\x04\x81\x03\x04\x0c\n\r\n\x05\x04\x11\x02\x04\x05\x12\ + \x04\x81\x03\r\x13\n\r\n\x05\x04\x11\x02\x04\x01\x12\x04\x81\x03\x14\x1c\ + \n\r\n\x05\x04\x11\x02\x04\x03\x12\x04\x81\x03\x1f!\n\x0c\n\x04\x04\x11\ + \x02\x05\x12\x04\x82\x03\x04\"\n\r\n\x05\x04\x11\x02\x05\x04\x12\x04\x82\ + \x03\x04\x0c\n\r\n\x05\x04\x11\x02\x05\x05\x12\x04\x82\x03\r\x13\n\r\n\ + \x05\x04\x11\x02\x05\x01\x12\x04\x82\x03\x14\x1c\n\r\n\x05\x04\x11\x02\ + \x05\x03\x12\x04\x82\x03\x1f!\n\x0c\n\x04\x04\x11\x02\x06\x12\x04\x83\ + \x03\x04\x20\n\r\n\x05\x04\x11\x02\x06\x04\x12\x04\x83\x03\x04\x0c\n\r\n\ + \x05\x04\x11\x02\x06\x06\x12\x04\x83\x03\r\x14\n\r\n\x05\x04\x11\x02\x06\ + \x01\x12\x04\x83\x03\x15\x1a\n\r\n\x05\x04\x11\x02\x06\x03\x12\x04\x83\ + \x03\x1d\x1f\nT\n\x02\x04\x12\x12\x06\x87\x03\0\x9b\x03\x01\x1aF\x20Addi\ ng\x20message\x20response\x20from\x20Station\x20to\x20Client\x20for\x20b\ - idirectional\x20API\n\n\x0b\n\x03\x04\x12\x01\x12\x04\x86\x03\x08\x1c\n\ - \x0c\n\x04\x04\x12\x02\0\x12\x04\x87\x03\x02\x20\n\r\n\x05\x04\x12\x02\0\ - \x04\x12\x04\x87\x03\x02\n\n\r\n\x05\x04\x12\x02\0\x05\x12\x04\x87\x03\ - \x0b\x12\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\x87\x03\x13\x1b\n\r\n\x05\ - \x04\x12\x02\0\x03\x12\x04\x87\x03\x1e\x1f\n?\n\x04\x04\x12\x02\x01\x12\ - \x04\x89\x03\x02\x1e\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\ - \x20network\x20byte\x20order\n\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\x89\ - \x03\x02\n\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\x89\x03\x0b\x10\n\r\n\ - \x05\x04\x12\x02\x01\x01\x12\x04\x89\x03\x11\x19\n\r\n\x05\x04\x12\x02\ - \x01\x03\x12\x04\x89\x03\x1c\x1d\n,\n\x04\x04\x12\x02\x02\x12\x04\x8c\ + idirectional\x20API\n\n\x0b\n\x03\x04\x12\x01\x12\x04\x87\x03\x08\x1c\n\ + \x0c\n\x04\x04\x12\x02\0\x12\x04\x88\x03\x02\x20\n\r\n\x05\x04\x12\x02\0\ + \x04\x12\x04\x88\x03\x02\n\n\r\n\x05\x04\x12\x02\0\x05\x12\x04\x88\x03\ + \x0b\x12\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\x88\x03\x13\x1b\n\r\n\x05\ + \x04\x12\x02\0\x03\x12\x04\x88\x03\x1e\x1f\n?\n\x04\x04\x12\x02\x01\x12\ + \x04\x8a\x03\x02\x1e\x1a1\x20The\x20128-bit\x20ipv6\x20address,\x20in\ + \x20network\x20byte\x20order\n\n\r\n\x05\x04\x12\x02\x01\x04\x12\x04\x8a\ + \x03\x02\n\n\r\n\x05\x04\x12\x02\x01\x05\x12\x04\x8a\x03\x0b\x10\n\r\n\ + \x05\x04\x12\x02\x01\x01\x12\x04\x8a\x03\x11\x19\n\r\n\x05\x04\x12\x02\ + \x01\x03\x12\x04\x8a\x03\x1c\x1d\n,\n\x04\x04\x12\x02\x02\x12\x04\x8d\ \x03\x02\x1f\x1a\x1e\x20Respond\x20with\x20randomized\x20port\n\n\r\n\ - \x05\x04\x12\x02\x02\x04\x12\x04\x8c\x03\x02\n\n\r\n\x05\x04\x12\x02\x02\ - \x05\x12\x04\x8c\x03\x0b\x11\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\x8c\ - \x03\x12\x1a\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\x8c\x03\x1d\x1e\nd\n\ - \x04\x04\x12\x02\x03\x12\x04\x90\x03\x02\"\x1aV\x20Future:\x20station\ + \x05\x04\x12\x02\x02\x04\x12\x04\x8d\x03\x02\n\n\r\n\x05\x04\x12\x02\x02\ + \x05\x12\x04\x8d\x03\x0b\x11\n\r\n\x05\x04\x12\x02\x02\x01\x12\x04\x8d\ + \x03\x12\x1a\n\r\n\x05\x04\x12\x02\x02\x03\x12\x04\x8d\x03\x1d\x1e\nd\n\ + \x04\x04\x12\x02\x03\x12\x04\x91\x03\x02\"\x1aV\x20Future:\x20station\ \x20provides\x20client\x20with\x20secret,\x20want\x20chanel\x20present\n\ \x20Leave\x20null\x20for\x20now\n\n\r\n\x05\x04\x12\x02\x03\x04\x12\x04\ - \x90\x03\x02\n\n\r\n\x05\x04\x12\x02\x03\x05\x12\x04\x90\x03\x0b\x10\n\r\ - \n\x05\x04\x12\x02\x03\x01\x12\x04\x90\x03\x11\x1d\n\r\n\x05\x04\x12\x02\ - \x03\x03\x12\x04\x90\x03\x20!\nA\n\x04\x04\x12\x02\x04\x12\x04\x93\x03\ + \x91\x03\x02\n\n\r\n\x05\x04\x12\x02\x03\x05\x12\x04\x91\x03\x0b\x10\n\r\ + \n\x05\x04\x12\x02\x03\x01\x12\x04\x91\x03\x11\x1d\n\r\n\x05\x04\x12\x02\ + \x03\x03\x12\x04\x91\x03\x20!\nA\n\x04\x04\x12\x02\x04\x12\x04\x94\x03\ \x02\x1c\x1a3\x20If\x20registration\x20wrong,\x20populate\x20this\x20err\ - or\x20string\n\n\r\n\x05\x04\x12\x02\x04\x04\x12\x04\x93\x03\x02\n\n\r\n\ - \x05\x04\x12\x02\x04\x05\x12\x04\x93\x03\x0b\x11\n\r\n\x05\x04\x12\x02\ - \x04\x01\x12\x04\x93\x03\x12\x17\n\r\n\x05\x04\x12\x02\x04\x03\x12\x04\ - \x93\x03\x1a\x1b\n+\n\x04\x04\x12\x02\x05\x12\x04\x96\x03\x02%\x1a\x1d\ + or\x20string\n\n\r\n\x05\x04\x12\x02\x04\x04\x12\x04\x94\x03\x02\n\n\r\n\ + \x05\x04\x12\x02\x04\x05\x12\x04\x94\x03\x0b\x11\n\r\n\x05\x04\x12\x02\ + \x04\x01\x12\x04\x94\x03\x12\x17\n\r\n\x05\x04\x12\x02\x04\x03\x12\x04\ + \x94\x03\x1a\x1b\n+\n\x04\x04\x12\x02\x05\x12\x04\x97\x03\x02%\x1a\x1d\ \x20ClientConf\x20field\x20(optional)\n\n\r\n\x05\x04\x12\x02\x05\x04\ - \x12\x04\x96\x03\x02\n\n\r\n\x05\x04\x12\x02\x05\x06\x12\x04\x96\x03\x0b\ - \x15\n\r\n\x05\x04\x12\x02\x05\x01\x12\x04\x96\x03\x16\x20\n\r\n\x05\x04\ - \x12\x02\x05\x03\x12\x04\x96\x03#$\nJ\n\x04\x04\x12\x02\x06\x12\x04\x99\ + \x12\x04\x97\x03\x02\n\n\r\n\x05\x04\x12\x02\x05\x06\x12\x04\x97\x03\x0b\ + \x15\n\r\n\x05\x04\x12\x02\x05\x01\x12\x04\x97\x03\x16\x20\n\r\n\x05\x04\ + \x12\x02\x05\x03\x12\x04\x97\x03#$\nJ\n\x04\x04\x12\x02\x06\x12\x04\x9a\ \x03\x025\x1a<\x20Transport\x20Params\x20to\x20if\x20`allow_registrar_ov\ - errides`\x20is\x20set.\n\n\r\n\x05\x04\x12\x02\x06\x04\x12\x04\x99\x03\ - \x02\n\n\r\n\x05\x04\x12\x02\x06\x06\x12\x04\x99\x03\x0b\x1e\n\r\n\x05\ - \x04\x12\x02\x06\x01\x12\x04\x99\x03\x1f/\n\r\n\x05\x04\x12\x02\x06\x03\ - \x12\x04\x99\x0324\n!\n\x02\x04\x13\x12\x06\x9d\x03\0\xa1\x03\x01\x1a\ - \x13\x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x13\x01\x12\x04\x9d\ - \x03\x08\x13\n\x0c\n\x04\x04\x13\x02\0\x12\x04\x9e\x03\x04\x1e\n\r\n\x05\ - \x04\x13\x02\0\x04\x12\x04\x9e\x03\x04\x0c\n\r\n\x05\x04\x13\x02\0\x05\ - \x12\x04\x9e\x03\r\x11\n\r\n\x05\x04\x13\x02\0\x01\x12\x04\x9e\x03\x12\ - \x19\n\r\n\x05\x04\x13\x02\0\x03\x12\x04\x9e\x03\x1c\x1d\n\x0c\n\x04\x04\ - \x13\x02\x01\x12\x04\x9f\x03\x04*\n\r\n\x05\x04\x13\x02\x01\x04\x12\x04\ - \x9f\x03\x04\x0c\n\r\n\x05\x04\x13\x02\x01\x05\x12\x04\x9f\x03\r\x11\n\r\ - \n\x05\x04\x13\x02\x01\x01\x12\x04\x9f\x03\x12%\n\r\n\x05\x04\x13\x02\ - \x01\x03\x12\x04\x9f\x03()\n\x0c\n\x04\x04\x13\x02\x02\x12\x04\xa0\x03\ - \x04=\n\r\n\x05\x04\x13\x02\x02\x04\x12\x04\xa0\x03\x04\x0c\n\r\n\x05\ - \x04\x13\x02\x02\x06\x12\x04\xa0\x03\r!\n\r\n\x05\x04\x13\x02\x02\x01\ - \x12\x04\xa0\x03\"8\n\r\n\x05\x04\x13\x02\x02\x03\x12\x04\xa0\x03;<\ + errides`\x20is\x20set.\n\n\r\n\x05\x04\x12\x02\x06\x04\x12\x04\x9a\x03\ + \x02\n\n\r\n\x05\x04\x12\x02\x06\x06\x12\x04\x9a\x03\x0b\x1e\n\r\n\x05\ + \x04\x12\x02\x06\x01\x12\x04\x9a\x03\x1f/\n\r\n\x05\x04\x12\x02\x06\x03\ + \x12\x04\x9a\x0324\n!\n\x02\x04\x13\x12\x06\x9e\x03\0\xa2\x03\x01\x1a\ + \x13\x20response\x20from\x20dns\n\n\x0b\n\x03\x04\x13\x01\x12\x04\x9e\ + \x03\x08\x13\n\x0c\n\x04\x04\x13\x02\0\x12\x04\x9f\x03\x04\x1e\n\r\n\x05\ + \x04\x13\x02\0\x04\x12\x04\x9f\x03\x04\x0c\n\r\n\x05\x04\x13\x02\0\x05\ + \x12\x04\x9f\x03\r\x11\n\r\n\x05\x04\x13\x02\0\x01\x12\x04\x9f\x03\x12\ + \x19\n\r\n\x05\x04\x13\x02\0\x03\x12\x04\x9f\x03\x1c\x1d\n\x0c\n\x04\x04\ + \x13\x02\x01\x12\x04\xa0\x03\x04*\n\r\n\x05\x04\x13\x02\x01\x04\x12\x04\ + \xa0\x03\x04\x0c\n\r\n\x05\x04\x13\x02\x01\x05\x12\x04\xa0\x03\r\x11\n\r\ + \n\x05\x04\x13\x02\x01\x01\x12\x04\xa0\x03\x12%\n\r\n\x05\x04\x13\x02\ + \x01\x03\x12\x04\xa0\x03()\n\x0c\n\x04\x04\x13\x02\x02\x12\x04\xa1\x03\ + \x04=\n\r\n\x05\x04\x13\x02\x02\x04\x12\x04\xa1\x03\x04\x0c\n\r\n\x05\ + \x04\x13\x02\x02\x06\x12\x04\xa1\x03\r!\n\r\n\x05\x04\x13\x02\x02\x01\ + \x12\x04\xa1\x03\"8\n\r\n\x05\x04\x13\x02\x02\x03\x12\x04\xa1\x03;<\ "; /// `FileDescriptorProto` object which was a source for this generated file From fdfe78d254e515ac9a2620f4c98a7e1a7ab9acd4 Mon Sep 17 00:00:00 2001 From: marshall Date: Wed, 5 Jul 2023 12:10:21 -0400 Subject: [PATCH 23/26] add conjurepath to find config --- cmd/application/conns_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/application/conns_test.go b/cmd/application/conns_test.go index 2b0e350a..4ff98291 100644 --- a/cmd/application/conns_test.go +++ b/cmd/application/conns_test.go @@ -129,7 +129,7 @@ func TestConnHandleConcurrent(t *testing.T) { // We don't actually care about what gets written logger := log.New(ioutil.Discard, "[TEST CONN STATS] ", golog.Ldate|golog.Lmicroseconds) - testSubnetPath := os.Getenv("GOPATH") + "/src/github.com/refraction-networking/conjure/application/lib/test/phantom_subnets.toml" + testSubnetPath := conjurepath.Root + "/pkg/station/lib/test/phantom_subnets.toml" os.Setenv("PHANTOM_SUBNET_LOCATION", testSubnetPath) rm := cj.NewRegistrationManager(&cj.RegConfig{}) From e7948ecebb3fc7c8107ab07ee76f28e92688f99f Mon Sep 17 00:00:00 2001 From: jmwample Date: Wed, 5 Jul 2023 15:58:19 -0600 Subject: [PATCH 24/26] fix linter issues from migrated gotapdance pieces --- pkg/ed25519/edwards25519/edwards25519.go | 85 ++++++++++++------- pkg/ed25519/extra25519/extra25519_test.go | 3 + pkg/phantoms/phantoms_test.go | 8 +- pkg/registrars/dns-registrar/dns/dns.go | 85 ++++++++++++++----- pkg/registrars/dns-registrar/dns/dns_test.go | 2 +- pkg/registrars/dns-registrar/requester/dns.go | 6 +- pkg/registrars/registration/api-registrar.go | 6 +- .../registration/api-registrar_test.go | 13 +-- pkg/registrars/registration/config.go | 1 + pkg/transports/client/transports.go | 5 +- 10 files changed, 146 insertions(+), 68 deletions(-) diff --git a/pkg/ed25519/edwards25519/edwards25519.go b/pkg/ed25519/edwards25519/edwards25519.go index 90798185..4cb049d3 100644 --- a/pkg/ed25519/edwards25519/edwards25519.go +++ b/pkg/ed25519/edwards25519/edwards25519.go @@ -109,27 +109,29 @@ func FeFromBytes(dst *FieldElement, src *[32]byte) { // FeToBytes marshals h to s. // Preconditions: -// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. +// +// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. // // Write p=2^255-19; q=floor(h/p). // Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))). // // Proof: -// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4. -// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4. // -// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9). -// Then 0> 5) @@ -1449,11 +1466,15 @@ func ScMulAdd(s, a, b, c *[32]byte) { } // Input: -// s[0]+256*s[1]+...+256^63*s[63] = s +// +// s[0]+256*s[1]+...+256^63*s[63] = s // // Output: -// s[0]+256*s[1]+...+256^31*s[31] = s mod l -// where l = 2^252 + 27742317777372353535851937790883648493. +// +// s[0]+256*s[1]+...+256^31*s[31] = s mod l +// where l = 2^252 + 27742317777372353535851937790883648493. +// +//nolint:ineffassign func ScReduce(out *[32]byte, s *[64]byte) { s0 := 2097151 & load3(s[:]) s1 := 2097151 & (load4(s[2:]) >> 5) diff --git a/pkg/ed25519/extra25519/extra25519_test.go b/pkg/ed25519/extra25519/extra25519_test.go index 6875ecbf..54c0758e 100644 --- a/pkg/ed25519/extra25519/extra25519_test.go +++ b/pkg/ed25519/extra25519/extra25519_test.go @@ -29,6 +29,7 @@ func TestCurve25519Conversion(t *testing.T) { } } +//nolint:errcheck func TestElligator(t *testing.T) { var publicKey, publicKey2, publicKey3, representative, privateKey [32]byte @@ -50,6 +51,7 @@ func TestElligator(t *testing.T) { } } +//nolint:errcheck func BenchmarkKeyGeneration(b *testing.B) { var publicKey, representative, privateKey [32]byte @@ -67,6 +69,7 @@ func BenchmarkKeyGeneration(b *testing.B) { } } +//nolint:errcheck func BenchmarkMap(b *testing.B) { var publicKey, representative [32]byte rand.Reader.Read(representative[:]) diff --git a/pkg/phantoms/phantoms_test.go b/pkg/phantoms/phantoms_test.go index dcb6561e..7b55493d 100644 --- a/pkg/phantoms/phantoms_test.go +++ b/pkg/phantoms/phantoms_test.go @@ -54,7 +54,7 @@ func TestSelectWeightedMany(t *testing.T) { count := []int{0, 0} loops := 1000 - rand.Seed(12345) + r := rand.New(rand.NewSource(12345)) _, net1, err := net.ParseCIDR("192.122.190.0/24") if err != nil { t.Fatal(err) @@ -73,7 +73,7 @@ func TestSelectWeightedMany(t *testing.T) { for i := 1; i <= loops; i++ { seed := make([]byte, 16) - _, err := rand.Read(seed) + _, err := r.Read(seed) if err != nil { t.Fatalf("Failed to generate seed: %v", err) } @@ -98,7 +98,7 @@ func TestWeightedSelection(t *testing.T) { count := []int{0, 0} loops := 1000 - rand.Seed(5421212341231) + r := rand.New(rand.NewSource(5421212341231)) w := uint32(1) var ps = &pb.PhantomSubnetsList{ WeightedSubnets: []*pb.PhantomSubnets{ @@ -109,7 +109,7 @@ func TestWeightedSelection(t *testing.T) { for i := 1; i <= loops; i++ { seed := make([]byte, 16) - _, err := rand.Read(seed) + _, err := r.Read(seed) if err != nil { t.Fatalf("Failed to generate seed: %v", err) } diff --git a/pkg/registrars/dns-registrar/dns/dns.go b/pkg/registrars/dns-registrar/dns/dns.go index 6c5bfd3a..bad1649b 100644 --- a/pkg/registrars/dns-registrar/dns/dns.go +++ b/pkg/registrars/dns-registrar/dns/dns.go @@ -86,7 +86,10 @@ func NewName(labels [][]byte) (Name, error) { } // Check the total length. builder := newMessageBuilder() - builder.WriteName(name) + err := builder.WriteName(name) + if err != nil { + return name, err + } if len(builder.Bytes()) > 255 { return nil, fmt.Errorf("%w, current length: %v", ErrNameTooLong, len(builder.Bytes())) } @@ -423,14 +426,13 @@ func (builder *messageBuilder) Bytes() []byte { // WriteName appends name to the in-progress messageBuilder, employing // compression pointers to previously written names if possible. -func (builder *messageBuilder) WriteName(name Name) { +func (builder *messageBuilder) WriteName(name Name) error { // https://tools.ietf.org/html/rfc1035#section-3.1 for i := range name { // Has this suffix already been encoded in the message? if ptr, ok := builder.nameCache[name[i:].String()]; ok && ptr&0x3fff == ptr { // If so, we can write a compression pointer. - binary.Write(&builder.w, binary.BigEndian, uint16(0xc000|ptr)) - return + return binary.Write(&builder.w, binary.BigEndian, uint16(0xc000|ptr)) } // Not cached; we must encode this label verbatim. Store a cache // entry pointing to the beginning of it. @@ -439,36 +441,63 @@ func (builder *messageBuilder) WriteName(name Name) { if length == 0 || length > 63 { panic(length) } - builder.w.WriteByte(byte(length)) - builder.w.Write(name[i]) + err := builder.w.WriteByte(byte(length)) + if err != nil { + return err + } + _, err = builder.w.Write(name[i]) + if err != nil { + return err + } } - builder.w.WriteByte(0) + return builder.w.WriteByte(0) } // WriteQuestion appends a Question section entry to the in-progress // messageBuilder. -func (builder *messageBuilder) WriteQuestion(question *Question) { +func (builder *messageBuilder) WriteQuestion(question *Question) error { // https://tools.ietf.org/html/rfc1035#section-4.1.2 - builder.WriteName(question.Name) - binary.Write(&builder.w, binary.BigEndian, question.Type) - binary.Write(&builder.w, binary.BigEndian, question.Class) + err := builder.WriteName(question.Name) + if err != nil { + return err + } + err = binary.Write(&builder.w, binary.BigEndian, question.Type) + if err != nil { + return err + } + return binary.Write(&builder.w, binary.BigEndian, question.Class) } // WriteRR appends a resource record to the in-progress messageBuilder. It // returns ErrIntegerOverflow if the length of rr.Data does not fit in 16 bits. func (builder *messageBuilder) WriteRR(rr *RR) error { // https://tools.ietf.org/html/rfc1035#section-4.1.3 - builder.WriteName(rr.Name) - binary.Write(&builder.w, binary.BigEndian, rr.Type) - binary.Write(&builder.w, binary.BigEndian, rr.Class) - binary.Write(&builder.w, binary.BigEndian, rr.TTL) + err := builder.WriteName(rr.Name) + if err != nil { + return err + } + err = binary.Write(&builder.w, binary.BigEndian, rr.Type) + if err != nil { + return err + } + err = binary.Write(&builder.w, binary.BigEndian, rr.Class) + if err != nil { + return err + } + err = binary.Write(&builder.w, binary.BigEndian, rr.TTL) + if err != nil { + return err + } rdLength := uint16(len(rr.Data)) if int(rdLength) != len(rr.Data) { return ErrIntegerOverflow } - binary.Write(&builder.w, binary.BigEndian, rdLength) - builder.w.Write(rr.Data) - return nil + err = binary.Write(&builder.w, binary.BigEndian, rdLength) + if err != nil { + return err + } + _, err = builder.w.Write(rr.Data) + return err } // WriteMessage appends a complete DNS message to the in-progress @@ -478,8 +507,14 @@ func (builder *messageBuilder) WriteRR(rr *RR) error { func (builder *messageBuilder) WriteMessage(message *Message) error { // Header section // https://tools.ietf.org/html/rfc1035#section-4.1.1 - binary.Write(&builder.w, binary.BigEndian, message.ID) - binary.Write(&builder.w, binary.BigEndian, message.Flags) + err := binary.Write(&builder.w, binary.BigEndian, message.ID) + if err != nil { + return err + } + err = binary.Write(&builder.w, binary.BigEndian, message.Flags) + if err != nil { + return err + } for _, count := range []int{ len(message.Question), len(message.Answer), @@ -490,13 +525,19 @@ func (builder *messageBuilder) WriteMessage(message *Message) error { if int(count16) != count { return ErrIntegerOverflow } - binary.Write(&builder.w, binary.BigEndian, count16) + err = binary.Write(&builder.w, binary.BigEndian, count16) + if err != nil { + return err + } } // Question section // https://tools.ietf.org/html/rfc1035#section-4.1.2 for _, question := range message.Question { - builder.WriteQuestion(&question) + err := builder.WriteQuestion(&question) + if err != nil { + return err + } } // Answer, Authority, and Additional sections diff --git a/pkg/registrars/dns-registrar/dns/dns_test.go b/pkg/registrars/dns-registrar/dns/dns_test.go index 3e628470..37c57470 100644 --- a/pkg/registrars/dns-registrar/dns/dns_test.go +++ b/pkg/registrars/dns-registrar/dns/dns_test.go @@ -552,7 +552,7 @@ func TestEncodeRDataTXT(t *testing.T) { // zero, not an empty slice. p := make([]byte, 0) encoded := EncodeRDataTXT(p) - if len(encoded) < 0 { + if len(encoded) != 1 || encoded[0] != 0 { t.Errorf("EncodeRDataTXT(%v) returned %v", p, encoded) } diff --git a/pkg/registrars/dns-registrar/requester/dns.go b/pkg/registrars/dns-registrar/requester/dns.go index a589c324..9d3ef6fd 100644 --- a/pkg/registrars/dns-registrar/requester/dns.go +++ b/pkg/registrars/dns-registrar/requester/dns.go @@ -158,7 +158,11 @@ func (c *DNSPacketConn) send(transport net.Conn, p []byte) error { } var id uint16 - binary.Read(rand.Reader, binary.BigEndian, &id) + err = binary.Read(rand.Reader, binary.BigEndian, &id) + if err != nil { + return err + } + query := &dns.Message{ ID: id, Flags: 0x0100, // QR = 0, RD = 1 diff --git a/pkg/registrars/registration/api-registrar.go b/pkg/registrars/registration/api-registrar.go index 881b0ffc..f1cedef5 100644 --- a/pkg/registrars/registration/api-registrar.go +++ b/pkg/registrars/registration/api-registrar.go @@ -132,7 +132,11 @@ func (r *APIRegistrar) registerBidirectional(cjSession *tapdance.ConjureSession, continue } - reg.UnpackRegResp(regResp) + err = reg.UnpackRegResp(regResp) + if err != nil { + return nil, err + } + return reg, nil } diff --git a/pkg/registrars/registration/api-registrar_test.go b/pkg/registrars/registration/api-registrar_test.go index 01ec7beb..d5976a65 100644 --- a/pkg/registrars/registration/api-registrar_test.go +++ b/pkg/registrars/registration/api-registrar_test.go @@ -19,9 +19,8 @@ import ( ) func TestAPIRegistrar(t *testing.T) { - tapdance.AssetsSetDir("./assets") + _ = transports.EnableDefaultTransports() - transports.EnableDefaultTransports() transport, err := transports.New("min") require.Nil(t, err) @@ -59,14 +58,15 @@ func TestAPIRegistrar(t *testing.T) { logger: logrus.New(), } - registrar.Register(session, context.TODO()) + _, err = registrar.Register(session, context.TODO()) + require.Nil(t, err) server.Close() } func TestAPIRegistrarBidirectional(t *testing.T) { - tapdance.AssetsSetDir("./assets") - transports.EnableDefaultTransports() + _ = transports.EnableDefaultTransports() + transport, err := transports.New("min") require.Nil(t, err) // Make Conjure session with covert address @@ -112,7 +112,8 @@ func TestAPIRegistrarBidirectional(t *testing.T) { t.Logf("IPv6 address %v -----> %v", addr6, regResp.Ipv6Addr) body, _ = proto.Marshal(regResp) - w.Write(body) + _, err = w.Write(body) + require.Nil(t, err) })) registrar := APIRegistrar{ diff --git a/pkg/registrars/registration/config.go b/pkg/registrars/registration/config.go index cecd7881..49311afd 100644 --- a/pkg/registrars/registration/config.go +++ b/pkg/registrars/registration/config.go @@ -52,6 +52,7 @@ const ( UDP ) +//nolint:unused func validateConfig(config *Config) error { if config == nil { return fmt.Errorf("no config provided") diff --git a/pkg/transports/client/transports.go b/pkg/transports/client/transports.go index 495f88ed..2f277ac3 100644 --- a/pkg/transports/client/transports.go +++ b/pkg/transports/client/transports.go @@ -92,7 +92,10 @@ func EnableDefaultTransports() error { } func init() { - EnableDefaultTransports() + err := EnableDefaultTransports() + if err != nil { + panic(err) + } } func ConfigFromTransportType(transportType pb.TransportType, randomizePortDefault bool) (cj.Transport, error) { From 36fce5264592d30de4e8ed5847b8d13c0e99d0c1 Mon Sep 17 00:00:00 2001 From: jmwample Date: Wed, 5 Jul 2023 16:34:38 -0600 Subject: [PATCH 25/26] fix path issues relating to testing --- {pkg => cmd/application}/app_config.toml | 0 pkg/station/lib/config_test.go | 2 +- src/process_packet.rs | 11 ++++++----- 3 files changed, 7 insertions(+), 6 deletions(-) rename {pkg => cmd/application}/app_config.toml (100%) diff --git a/pkg/app_config.toml b/cmd/application/app_config.toml similarity index 100% rename from pkg/app_config.toml rename to cmd/application/app_config.toml diff --git a/pkg/station/lib/config_test.go b/pkg/station/lib/config_test.go index f25f2d3c..dfbc133f 100644 --- a/pkg/station/lib/config_test.go +++ b/pkg/station/lib/config_test.go @@ -12,7 +12,7 @@ import ( // TestConfigParse double checks to ensure that the identity struct reflection // trick works and that the fields are accessible. func TestConfigParse(t *testing.T) { - os.Setenv("CJ_STATION_CONFIG", conjurepath.Root+"/pkg/app_config.toml") + os.Setenv("CJ_STATION_CONFIG", conjurepath.Root+"/cmd/application/app_config.toml") var c Config _, err := toml.DecodeFile(os.Getenv("CJ_STATION_CONFIG"), &c) diff --git a/src/process_packet.rs b/src/process_packet.rs index 2b13f307..ef863ea1 100644 --- a/src/process_packet.rs +++ b/src/process_packet.rs @@ -3,6 +3,7 @@ use std::os::raw::c_void; use std::panic; use std::slice; use std::str; +use std::u8; use pnet::packet::ethernet::{EtherTypes, EthernetPacket}; use pnet::packet::ip::IpNextHeaderProtocols; @@ -13,7 +14,6 @@ use pnet::packet::udp::UdpPacket; use pnet::packet::Packet; // use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; -use std::u8; //use elligator; use flow_tracker::{Flow, FlowNoSrcPort}; // use dd_selector::DDIpSelector; @@ -376,14 +376,15 @@ mod tests { use std::fs; use toml; use StationConfig; + use std::path::PathBuf; + #[test] fn test_filter_station_traffic() { - env::set_var("CJ_STATION_CONFIG", "./application/app_config.toml"); - - // -- - let conf_path = env::var("CJ_STATION_CONFIG").unwrap(); + let mut conf_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + conf_path.push("cmd/application/app_config.toml"); + print!("{}", conf_path.to_str().unwrap()); let contents = fs::read_to_string(conf_path).expect("Something went wrong reading the file"); From 3c7d9c2a0af1b6e45c71ea262e2a3a4ad29b3c4b Mon Sep 17 00:00:00 2001 From: jmwample Date: Wed, 5 Jul 2023 16:40:41 -0600 Subject: [PATCH 26/26] rust lint --- src/process_packet.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/process_packet.rs b/src/process_packet.rs index ef863ea1..a74f0988 100644 --- a/src/process_packet.rs +++ b/src/process_packet.rs @@ -374,10 +374,9 @@ impl PerCoreGlobal { mod tests { use std::env; use std::fs; + use std::path::PathBuf; use toml; use StationConfig; - use std::path::PathBuf; - #[test] fn test_filter_station_traffic() {