From 4b46aabc8210158f97c3c6e9274b8f703f7a8aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80?= <78488229+viktor138irk@users.noreply.github.com> Date: Fri, 8 May 2026 18:34:07 +0900 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=20socks5h=20=D0=B4=D0=BB=D1=8F=20Teleg?= =?UTF-8?q?ram=20bridge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/telegram.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/telegram.js b/backend/src/telegram.js index 8b6f734..9451bac 100644 --- a/backend/src/telegram.js +++ b/backend/src/telegram.js @@ -33,7 +33,9 @@ function buildProxyAgent(proxy) { ? `${encodeURIComponent(proxy.username)}:${encodeURIComponent(proxy.password || '')}@` : ''; - return new SocksProxyAgent(`socks5://${auth}${proxy.host}:${proxy.port}`); + // socks5h forces DNS resolution through the proxy. This is required when Telegram + // is not reachable/resolvable directly from the VPS network. + return new SocksProxyAgent(`socks5h://${auth}${proxy.host}:${proxy.port}`); } function buildTelegramOptions(settings) {