Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ import { startMonitoring } from './monitoring';
const socksProxyHost = process.env.SOCKS_PROXY_HOST?.trim();
const telegramAgent = socksProxyHost
? (() => {
const proxyUrl = /^socks[45]?:\/\//i.test(socksProxyHost)
const proxyUrl = /^(?:socks|socks4|socks5|socks5h):\/\//i.test(
socksProxyHost,
)
? socksProxyHost
: `socks5://${socksProxyHost}`;
logger.info(`Using SOCKS proxy for Telegram API: ${proxyUrl}`);
Expand Down