feat(seckill): 增加只读预演并强化代理风控切换

This commit is contained in:
yml
2026-11-22 14:52:46 +08:00
parent 70612a8f0c
commit e20907800d
20 changed files with 1916 additions and 40 deletions
+5 -1
View File
@@ -56,7 +56,11 @@ func (a *App) FetchProxy(apiURL string) types.ProxyFetchResult {
}
func extractProxyEndpoints(cfg types.Config, apiURL string, count int) ([]proxyprovider.Endpoint, error) {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
return extractProxyEndpointsWithTimeout(cfg, apiURL, count, 30*time.Second)
}
func extractProxyEndpointsWithTimeout(cfg types.Config, apiURL string, count int, timeout time.Duration) ([]proxyprovider.Endpoint, error) {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
service := proxyprovider.NewService()
endpoints, err := service.ExtractWithWhitelist(ctx, apiURL, count, proxyprovider.WhitelistConfig{