Skip to content

Commit 8825f70

Browse files
committed
chore(deps): teleproto ^1.228.1;复核上游修复与侧向补丁
- 升至 1.228.1(#25 下载 signal/timeout、#28 keepalive 可配置已合入上游) - 保留 main-DC MediaScheduler.savePart 短接(#24 仍 open) - 保留 channelGapBreaker(#26 仍 open) - README Teleproto 版本对齐
1 parent 6f3ba11 commit 8825f70

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ abstract class Plugin {
181181
|:----:|:----:|:----:|
182182
| 运行时 | Node.js | `24.x` |
183183
| 语言 | TypeScript | `^5.9.2` |
184-
| Telegram | Teleproto | `^1.228.0` |
184+
| Telegram | Teleproto | `^1.228.1` |
185185
| 数据库 | better-sqlite3 · lowdb | `^12.2.0` · `^7.0.1` |
186186
| 运行 | tsx | `^4.22.4` |
187187
| HTTP / 图像 / 工具 | axios · sharp · lodash · cron | 见 `package.json` |

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"smartcrop-sharp": "^2.0.8",
6666
"ssh2": "^1.15.0",
6767
"telegraf": "^4.16.3",
68-
"teleproto": "^1.228.0",
68+
"teleproto": "^1.228.1",
6969
"tsconfig-paths": "^4.2.0",
7070
"tsx": "^4.22.4",
7171
"typescript": "^5.9.2"

‎src/utils/runtimeManager.ts‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ import { readAppName } from "./teleboxInfoHelper";
66
import { logger } from "./logger";
77
import { initializeClientSession } from "./loginManager";
88

9-
// ── Fix teleproto main-DC media upload deadlock ────────────────────────────
10-
// teleproto (through 1.228.0) still routes upload.SaveFilePart through a
11-
// separate media sender even when the target is the account's main DC. On
12-
// affected sessions that media sender's auth is rejected and every part waits
13-
// through all scheduler deadlines, while the exact same SaveFilePart succeeds
14-
// immediately through the already-authorized main sender.
9+
// ── Fix teleproto main-DC media upload deadlock (upstream #24 still open) ──
10+
// teleproto through 1.228.1 still routes upload.SaveFilePart via MediaScheduler's
11+
// media sender even when dcId === session.dcId. On affected sessions that path
12+
// burns requestRetries × deadline while client.invoke(SaveFilePart) succeeds.
13+
//
14+
// 1.228.1 fixed #25 (download AbortSignal/requestTimeout) and #28 (keepalive
15+
// interval option) — no TeleBox patches needed for those. #24 remains open, so
16+
// keep this main-DC short-circuit. channelGapBreaker stays for #26 (still open).
1517
//
1618
// Route only main-DC uploads through client.invoke(). Non-main DC operations
1719
// retain the native MediaScheduler path (including migration/retry logic).
18-
// This is a TeleBox runtime hook; the npm dependency remains untouched.
1920
// ───────────────────────────────────────────────────────────────────────────
2021
(function patchMainDcMediaUpload() {
2122
try {
@@ -110,8 +111,8 @@ async function createClient(): Promise<TelegramClient> {
110111
console.log("使用代理连接 Telegram:", proxy);
111112
}
112113

113-
// teleproto ≥1.228.0 enables TCP keepalive + setNoDelay natively in
114-
// PromisedNetSockets (hardcoded 30s). No CustomPromisedNetSockets needed.
114+
// teleproto ≥1.228.0 enables TCP keepalive + setNoDelay natively;
115+
// 1.228.1 adds keepAliveInterval option (#28). No CustomPromisedNetSockets needed.
115116
// Keep proxy.timeout default so SOCKS connect doesn't hang forever.
116117
if (proxy && !proxy.timeout) {
117118
proxy.timeout = 10; // seconds

0 commit comments

Comments
 (0)