Feature: Add TorSocksHost configuration support
Allows TOR proxy host to be configured via Privacy:TorSocksHost setting. Defaults to 127.0.0.1 if not specified for backward compatibility. This enables using external TOR gateways in Docker/container environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2ee2ee79e6
commit
84172d47a4
@ -21,8 +21,9 @@ namespace TeleBot.Http
|
||||
|
||||
if (torEnabled)
|
||||
{
|
||||
var torSocksHost = configuration.GetValue<string>("Privacy:TorSocksHost") ?? "127.0.0.1";
|
||||
var torSocksPort = configuration.GetValue<int>("Privacy:TorSocksPort", 9050);
|
||||
var proxyUri = $"socks5://127.0.0.1:{torSocksPort}";
|
||||
var proxyUri = $"socks5://{torSocksHost}:{torSocksPort}";
|
||||
|
||||
logger?.LogInformation("SOCKS5 proxy configured: {ProxyUri} (TOR enabled)", proxyUri);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user