mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-12-19 16:30:07 +08:00
Merge 165047acae into 17966b5418
This commit is contained in:
commit
cc47f9fdf7
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/metacubex/mihomo/common/callback"
|
"github.com/metacubex/mihomo/common/callback"
|
||||||
@ -67,6 +68,11 @@ func (u *URLTest) DialContext(ctx context.Context, metadata *C.Metadata) (c C.Co
|
|||||||
c.AppendToChains(u)
|
c.AppendToChains(u)
|
||||||
} else {
|
} else {
|
||||||
u.onDialFailed(proxy.Type(), err, u.healthCheck)
|
u.onDialFailed(proxy.Type(), err, u.healthCheck)
|
||||||
|
expectedStatus, err := utils.NewUnsignedRanges[uint16](u.expectedStatus)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("DialContext onDialFailed %s: %w", proxy.Name(), err)
|
||||||
|
}
|
||||||
|
proxy.URLTest(ctx, u.testUrl, expectedStatus)
|
||||||
}
|
}
|
||||||
|
|
||||||
if N.NeedHandshake(c) {
|
if N.NeedHandshake(c) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user