fix: 清空运行时代理后转发器直连并门控恢复、跳过空地址成员、补测

This commit is contained in:
RuoJi6 committed 2026-11-01 22:53:11 +08:00
1 parent 5dcfd9fd39
commit e74ab49f72
4 files changed
+149 -14

No files matched your search

+3 -1
View File
@@ -588,7 +588,9 @@ func NewManager(dir, proxyAddr string) (*Manager, error) {
m := &Manager{dir: dir, pg: pg, assets: pg.Assets(), tasks: map[string]*Task{}, interceptor: intercept.New(pg)}
if fp, ferr := newDynamicForwardProxy(func() string { return m.GlobalProxy() }); ferr == nil {
m.forwardProxy = fp
fp.direct = func() bool { return !m.proxyPoolConfigured.Load() }
// An empty runtime route means direct egress, even when the persisted
// pool still contains disabled or blank entries.
fp.direct = func() bool { return strings.TrimSpace(m.GlobalProxy()) == "" }
} else {
log.Printf("[proxy] local forwarder disabled: %v", ferr)
}