TUN-3456: New protocol option auto to automatically select between http2 and h2mux

This commit is contained in:
cthuang
2020-10-14 11:28:07 +01:00
parent 6886e5f90a
commit b5cdf3b2c7
7 changed files with 176 additions and 19 deletions

View File

@@ -238,7 +238,7 @@ func ServeTunnel(
fuse: fuse,
backoff: backoff,
}
if config.NamedTunnel != nil && config.NamedTunnel.Protocol == connection.HTTP2 {
if config.Protocol == connection.HTTP2 {
connOptions := config.ConnectionOptions(edgeConn.LocalAddr().String(), uint8(backoff.retries))
return ServeHTTP2(ctx, config, edgeConn, connOptions, connectionIndex, connectedFuse, reconnectCh)
}