fix: harden bot accounts and download handling

This commit is contained in:
ShukeBta
2026-06-07 18:30:27 +08:00
parent 7e37126f7c
commit df02fd1166
26 changed files with 1373 additions and 136 deletions
+7 -5
View File
@@ -78,12 +78,14 @@ func telegramHTTPClients(timeout time.Duration, cfg map[string]string) []*http.C
if proxyURL, err := telegramAutoProxyURL(cfg); err == nil {
addProxy(proxyURL)
}
for _, proxyRaw := range telegramFallbackProxyCandidates() {
proxyURL, err := normalizeProxyURL(proxyRaw, "http")
if err != nil || proxyURL == nil {
continue
if telegramAPIBaseURL(cfg) == defaultTelegramAPIBaseURL {
for _, proxyRaw := range telegramFallbackProxyCandidates() {
proxyURL, err := normalizeProxyURL(proxyRaw, "http")
if err != nil || proxyURL == nil {
continue
}
addProxy(proxyURL)
}
addProxy(proxyURL)
}
transport := NewExternalTransport()
transport.Proxy = nil