qwen-code/packages/channels/telegram/package.json
tanzhenxin 7219469285
fix(channels): apply proxy settings to channel start command (#3136)
`qwen channel start` never calls `loadCliConfig`, so the proxy
configured via `--proxy` or `HTTPS_PROXY`/`HTTP_PROXY` env vars
was not applied. This caused Telegram's `getMe` (and all other
channel HTTP traffic) to bypass the proxy entirely.

The fix has two parts:

1. Resolve proxy in `start.ts` bootstrap and call
   `setGlobalDispatcher(new ProxyAgent(...))` for native fetch()
   calls (file downloads, other channels). This mirrors the same
   pattern used by Config constructor in the main CLI path.

2. Thread the proxy URL through `ChannelBaseOptions` so adapters
   can configure their own HTTP clients. TelegramAdapter passes
   an `HttpsProxyAgent` to grammy's `baseFetchConfig.agent` since
   grammy uses node-fetch which ignores undici's global dispatcher.

Fixes #3122
2026-04-11 16:44:14 +08:00

29 lines
618 B
JSON

{
"name": "@qwen-code/channel-telegram",
"version": "0.14.3",
"description": "Telegram channel adapter for Qwen Code",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsc --build"
},
"dependencies": {
"@qwen-code/channel-base": "file:../base",
"grammy": "^1.41.1",
"https-proxy-agent": "^7.0.6",
"telegram-markdown-formatter": "^0.1.2"
},
"devDependencies": {
"typescript": "^5.0.0"
}
}