TUN-3581: Tunnels can be run by name using only --credentials-file, no

origin cert necessary.
This commit is contained in:
Adam Chalmers
2020-11-23 15:36:16 -06:00
parent fcc393e2f0
commit 69fd502db3
11 changed files with 338 additions and 90 deletions

View File

@@ -165,7 +165,7 @@ func NewProtocolSelector(protocolFlag string, namedTunnel *NamedTunnelConfig, fe
if protocolFlag != autoSelectFlag {
return nil, fmt.Errorf("Unknown protocol %s, %s", protocolFlag, AvailableProtocolFlagMessage)
}
threshold := switchThreshold(namedTunnel.Auth.AccountTag)
threshold := switchThreshold(namedTunnel.Credentials.AccountTag)
if threshold < http2Percentage {
return newAutoProtocolSelector(HTTP2, threshold, fetchFunc, ttl, logger), nil
}