TUN-2776: Add header serialization feature in cloudflared

This commit is contained in:
Areg Harutyunyan 2020-02-28 17:36:29 +00:00
parent 29f4650e25
commit 26f5f80811
3 changed files with 11 additions and 0 deletions

9
connection/features.go Normal file
View File

@ -0,0 +1,9 @@
package connection
const (
FEATURE_SERIALIZED_HEADERS = "serialized_headers"
)
var SUPPORTED_FEATURES = []string{
//FEATURE_SERIALIZED_HEADERS,
}

View File

@ -161,6 +161,7 @@ func (c *TunnelConfig) RegistrationOptions(connectionID uint8, OriginLocalIP str
RunFromTerminal: c.RunFromTerminal, RunFromTerminal: c.RunFromTerminal,
CompressionQuality: c.CompressionQuality, CompressionQuality: c.CompressionQuality,
UUID: uuid.String(), UUID: uuid.String(),
Features: connection.SUPPORTED_FEATURES,
} }
} }

View File

@ -168,6 +168,7 @@ type RegistrationOptions struct {
CompressionQuality uint64 `capnp:"compressionQuality"` CompressionQuality uint64 `capnp:"compressionQuality"`
UUID string `capnp:"uuid"` UUID string `capnp:"uuid"`
NumPreviousAttempts uint8 NumPreviousAttempts uint8
Features []string
} }
func MarshalRegistrationOptions(s tunnelrpc.RegistrationOptions, p *RegistrationOptions) error { func MarshalRegistrationOptions(s tunnelrpc.RegistrationOptions, p *RegistrationOptions) error {