fix/optimize: fix https h2 problem and add h2 mutiplex

This commit is contained in:
mzz2017
2023-03-27 21:44:13 +08:00
parent cc50bea0fc
commit d85e7080fe
5 changed files with 13 additions and 12 deletions

View File

@ -740,13 +740,6 @@ func (c *ControlPlane) chooseBestDnsDialer(
bestTarget netip.AddrPort
dialMark uint32
)
if c.log.IsLevelEnabled(logrus.TraceLevel) {
c.log.WithFields(logrus.Fields{
"ipversions": ipversions,
"l4protos": l4protos,
"upstream": dnsUpstream.String(),
}).Traceln("Choose DNS path")
}
// Get the min latency path.
networkType := dialer.NetworkType{
IsDns: true,
@ -805,6 +798,14 @@ func (c *ControlPlane) chooseBestDnsDialer(
if bestDialer == nil {
return nil, fmt.Errorf("no proper dialer for DNS upstream: %v", dnsUpstream.String())
}
if c.log.IsLevelEnabled(logrus.TraceLevel) {
c.log.WithFields(logrus.Fields{
"ipversions": ipversions,
"l4protos": l4protos,
"upstream": dnsUpstream.String(),
"choose": string(l4proto) + "+" + string(ipversion),
}).Traceln("Choose DNS path")
}
switch ipversion {
case consts.IpVersionStr_4:
bestTarget = netip.AddrPortFrom(dnsUpstream.Ip4, dnsUpstream.Port)