Fix Telegram notify proxyAgent URI

This commit is contained in:
kong 2025-12-15 10:11:14 +08:00
parent 33fa3aca99
commit b9c4790bda
2 changed files with 2 additions and 2 deletions

View File

@ -259,7 +259,7 @@ export default class NotificationService {
let agent;
if (telegramBotProxyHost && telegramBotProxyPort) {
agent = new ProxyAgent({
uri: `http://${authStr}${telegramBotProxyHost}:${telegramBotProxyPort}`,
uri: `http://${authStr}@${telegramBotProxyHost}:${telegramBotProxyPort}`,
});
}
try {

View File

@ -484,7 +484,7 @@ function tgBotNotify(text, desp) {
if (TG_PROXY_HOST && TG_PROXY_PORT) {
let agent;
agent = new ProxyAgent({
uri: `http://${TG_PROXY_AUTH}${TG_PROXY_HOST}:${TG_PROXY_PORT}`,
uri: `http://${TG_PROXY_AUTH}@${TG_PROXY_HOST}:${TG_PROXY_PORT}`,
});
options.dispatcher = agent;
}