From 2ee2ee79e6b0a6c29916dc22eb7040456d2c9c34 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Fri, 3 Oct 2025 12:43:30 +0100 Subject: [PATCH] Fix: Remove MaxAutomaticRedirections when AllowAutoRedirect is false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MaxAutomaticRedirections cannot be set to 0 in .NET 9.0. When AllowAutoRedirect is false, the MaxAutomaticRedirections property should not be set at all. This fixes the TeleBot TOR proxy configuration crash. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- TeleBot/TeleBot/Http/Socks5HttpHandler.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/TeleBot/TeleBot/Http/Socks5HttpHandler.cs b/TeleBot/TeleBot/Http/Socks5HttpHandler.cs index 6b1dfdb..23619a3 100644 --- a/TeleBot/TeleBot/Http/Socks5HttpHandler.cs +++ b/TeleBot/TeleBot/Http/Socks5HttpHandler.cs @@ -36,7 +36,6 @@ namespace TeleBot.Http }, UseProxy = true, AllowAutoRedirect = false, // Prevent redirect-based deanonymization - MaxAutomaticRedirections = 0, PooledConnectionLifetime = TimeSpan.FromMinutes(5), // Rotate circuits PooledConnectionIdleTimeout = TimeSpan.FromMinutes(2) };