Skip to content

telegram中的MTProto代理不支持fake tls #17719

Open
@xiaolifeizei

Description

@xiaolifeizei

路由地址

/telegram/channel/:username/:routeParams?

完整路由地址

/telegram/channel/zyfx_0315

相关文档

https://docs.rsshub.app/zh/routes/social-media#channel

预期是什么?

当设置了TELEGRAM_PROXY_HOST,TELEGRAM_PROXY_PORT,TELEGRAM_PROXY_SECRET后应该走MTProto协议正常获取内容
``

实际发生了什么?

TELEGRAM_PROXY_SECRET该参数只支持16 byte的密钥,而不支持更长的以ee开头的fake tls的密钥。

麻烦大佬处理一下,不然自建无法挂梯子

源码:/lib/routes/telegram/tglib/client.ts 21行

client = new TelegramClient(stringSession, apiId, apiHash, {
        connectionRetries: Infinity,
        autoReconnect: true,
        retryDelay: 3000,
        maxConcurrentDownloads: Number(config.telegram.maxConcurrentDownloads ?? 10),
        proxy:
            config.telegram.proxy?.host && config.telegram.proxy.port && config.telegram.proxy.secret
                ? {
                      ip: config.telegram.proxy.host,
                      port: Number(config.telegram.proxy.port),
                      MTProxy: true,
                      secret: config.telegram.proxy.secret,
                  }
                : undefined,
    });

部署

自建

部署相关信息

No response

额外信息

FetchError: FetchError: [GET] "https://t.me/s/zyfx_0315": <no response> fetch failed
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async $fetchRaw2 (D:\my\dev\workspace_nodejs\RSSHub\node_modules\.pnpm\o[email protected]\node_modules\ofetch\dist\shared\ofetch.d8adb063.cjs:276:14)
at async $fetchRaw2 (D:\my\dev\workspace_nodejs\RSSHub\node_modules\.pnpm\o[email protected]\node_modules\ofetch\dist\shared\ofetch.d8adb063.cjs:276:14)
at async $fetch2 (D:\my\dev\workspace_nodejs\RSSHub\node_modules\.pnpm\o[email protected]\node_modules\ofetch\dist\shared\ofetch.d8adb063.cjs:322:15)
at async <anonymous> (D:\my\dev\workspace_nodejs\RSSHub\lib\routes\telegram\channel.ts:194:24)
at async Object.tryGet (D:\my\dev\workspace_nodejs\RSSHub\lib\utils\cache\index.ts:92:27)
at async Object.handler (D:\my\dev\workspace_nodejs\RSSHub\lib\routes\telegram\channel.ts:191:18)
at async wrappedHandler (D:\my\dev\workspace_nodejs\RSSHub\lib\registry.ts:96:33)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\cache.ts:57:9)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\parameter.ts:65:5)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\anti-hotlink.ts:101:5)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\header.ts:26:5)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\template.tsx:15:5)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\debug.ts:16:5)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\access-control.ts:21:9)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\sentry.ts:18:5)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\trace.ts:17:9)
at async dispatch (file:///D:/my/dev/workspace_nodejs/RSSHub/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:17)
at async middleware (D:\my\dev\workspace_nodejs\RSSHub\lib\middleware\logger.ts:36:5)

这不是重复的 issue

  • 我已经搜索了 现有 issue,以确保该错误尚未被报告。

Metadata

Metadata

Assignees

No one assigned

    Labels

    RSS bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions