From 26f5f80811d431c12ac29fa8e0c3fcb42d354dbe Mon Sep 17 00:00:00 2001 From: Areg Harutyunyan Date: Fri, 28 Feb 2020 17:36:29 +0000 Subject: [PATCH] TUN-2776: Add header serialization feature in cloudflared --- connection/features.go | 9 +++++++++ origin/tunnel.go | 1 + tunnelrpc/pogs/tunnelrpc.go | 1 + 3 files changed, 11 insertions(+) create mode 100644 connection/features.go diff --git a/connection/features.go b/connection/features.go new file mode 100644 index 00000000..c10f7cbf --- /dev/null +++ b/connection/features.go @@ -0,0 +1,9 @@ +package connection + +const ( + FEATURE_SERIALIZED_HEADERS = "serialized_headers" +) + +var SUPPORTED_FEATURES = []string{ + //FEATURE_SERIALIZED_HEADERS, +} diff --git a/origin/tunnel.go b/origin/tunnel.go index 991d95c1..5b04e0d2 100644 --- a/origin/tunnel.go +++ b/origin/tunnel.go @@ -161,6 +161,7 @@ func (c *TunnelConfig) RegistrationOptions(connectionID uint8, OriginLocalIP str RunFromTerminal: c.RunFromTerminal, CompressionQuality: c.CompressionQuality, UUID: uuid.String(), + Features: connection.SUPPORTED_FEATURES, } } diff --git a/tunnelrpc/pogs/tunnelrpc.go b/tunnelrpc/pogs/tunnelrpc.go index bbf0001a..6aab7d94 100644 --- a/tunnelrpc/pogs/tunnelrpc.go +++ b/tunnelrpc/pogs/tunnelrpc.go @@ -168,6 +168,7 @@ type RegistrationOptions struct { CompressionQuality uint64 `capnp:"compressionQuality"` UUID string `capnp:"uuid"` NumPreviousAttempts uint8 + Features []string } func MarshalRegistrationOptions(s tunnelrpc.RegistrationOptions, p *RegistrationOptions) error {