TUN-6929: Use same protocol for other connections as first one

This PR changes protocol initialization of the other N connections to be
the same as the one we know the initial tunnel connected with. This is
so we homogenize connections and not lead to some connections being
QUIC-able and the others not.

There's also an improvement to the connection registered log so we know
what protocol every individual connection connected with from the
cloudflared side.
This commit is contained in:
Sudarsan Reddy
2022-11-16 09:08:45 +00:00
parent 19106cd609
commit 9339bb9485
4 changed files with 82 additions and 3 deletions

View File

@@ -206,6 +206,10 @@ type EdgeTunnelServer struct {
connAwareLogger *ConnAwareLogger
}
type TunnelServer interface {
Serve(ctx context.Context, connIndex uint8, protocolFallback *protocolFallback, connectedSignal *signal.Signal) error
}
func (e *EdgeTunnelServer) Serve(ctx context.Context, connIndex uint8, protocolFallback *protocolFallback, connectedSignal *signal.Signal) error {
haConnections.Inc()
defer haConnections.Dec()