fix: should allow fallbacking ip version if dialing domain (#164)

This commit is contained in:
mzz
2023-06-29 22:30:33 +08:00
committed by GitHub
parent 1a9afb0913
commit 0bac1c6ecb
6 changed files with 56 additions and 25 deletions

View File

@ -24,13 +24,16 @@ func FormatL4Proto(l4proto uint8) string {
return strconv.Itoa(int(l4proto))
}
func (c *controlPlaneCore) OutboundAliveChangeCallback(outbound uint8) func(alive bool, networkType *dialer.NetworkType, isInit bool) {
func (c *controlPlaneCore) outboundAliveChangeCallback(outbound uint8, dryrun bool) func(alive bool, networkType *dialer.NetworkType, isInit bool) {
return func(alive bool, networkType *dialer.NetworkType, isInit bool) {
select {
case <-c.closed.Done():
return
default:
}
if !isInit && dryrun {
return
}
if !isInit || c.log.IsLevelEnabled(logrus.TraceLevel) {
strAlive := "NOT ALIVE"
if alive {