Fix legacy rule-set download_detour blocked by empty direct check

This commit is contained in:
世界
2026-08-30 17:41:39 +08:00
parent 40e2b5fd4b
commit 8e8d1dcca8
5 changed files with 47 additions and 44 deletions
+6 -5
View File
@@ -295,11 +295,12 @@ func (s *RemoteRuleSet) resolveTransport() (adapter.HTTPTransport, error) {
}
if s.options.RemoteOptions.DownloadDetour != "" { //nolint:staticcheck
deprecated.Report(s.ctx, deprecated.OptionLegacyRuleSetDownloadDetour)
var httpClientOptions option.HTTPClientOptions
httpClientOptions.DialerOptions = option.DialerOptions{
Detour: s.options.RemoteOptions.DownloadDetour, //nolint:staticcheck
}
return httpClientManager.ResolveTransport(s.ctx, s.logger, httpClientOptions)
return httpClientManager.ResolveTransport(s.ctx, s.logger, option.HTTPClientOptions{
DialerOptions: option.DialerOptions{
Detour: s.options.RemoteOptions.DownloadDetour, //nolint:staticcheck
},
DisableEmptyDirectCheck: true,
})
}
defaultTransport := httpClientManager.DefaultTransport()
if defaultTransport == nil {