修 devssh:定义了 HOST_FALLBACKS 却从来没用过

随身 WiFi 跟着教室网络走,地址会在 192.168.2.156 和
192.168.10.105 之间变。devssh.py 里明明定义了 HOST_FALLBACKS,
但 run / upload / download 三个函数**全都直接用 HOST** ——
于是设备一换网段就全部连不上,而且报的是连接超时,
看起来像设备挂了。

现在改成按候选列表顺序试:
    环境变量 YKXMZ_DEV_HOST 优先
    -> 192.168.2.156(当前)
    -> 192.168.10.105(换网前用过)
并记住上次通的那个,后续调用不用每次从头试。
连上时打一行 `[devssh] 连上 x.x.x.x`,免得以后又搞不清连的是哪台。

还加了 `--probe` 子命令,一句话看现在哪个地址能用:

    python _build/devssh.py --probe

实测:192.168.2.156 通、192.168.10.105 不通,自动选中前者。
This commit is contained in:
xmz7891
2026-10-07 20:29:37 +08:00
parent 75c15f793c
commit 41bf110e22
4 changed files with 169 additions and 27 deletions
+21
View File
@@ -309,3 +309,24 @@ time code ms
2026-10-07 19:00:44 200 1199
2026-10-07 19:01:00 200 1335
2026-10-07 19:01:17 200 1437
2026-10-07 19:01:33 200 1430
2026-10-07 19:01:50 200 1414
2026-10-07 19:02:06 200 1146
2026-10-07 19:02:22 200 1079
2026-10-07 19:02:38 200 1429
2026-10-07 19:02:54 200 1057
2026-10-07 19:03:11 200 1479
2026-10-07 19:03:27 200 1129
2026-10-07 19:03:44 200 1790
2026-10-07 19:04:00 200 1420
2026-10-07 19:04:18 200 2459
2026-10-07 19:04:34 200 1148
2026-10-07 19:04:50 200 1420
2026-10-07 19:05:06 200 1085
2026-10-07 19:05:23 200 1428
2026-10-07 19:05:39 200 1017
2026-10-07 19:05:55 200 1427
2026-10-07 19:06:11 200 1085
2026-10-07 19:06:27 200 1139
2026-10-07 19:06:44 200 1036
2026-10-07 19:06:59 200 833
1 time code ms
309 2026-10-07 19:00:44 200 1199
310 2026-10-07 19:01:00 200 1335
311 2026-10-07 19:01:17 200 1437
312 2026-10-07 19:01:33 200 1430
313 2026-10-07 19:01:50 200 1414
314 2026-10-07 19:02:06 200 1146
315 2026-10-07 19:02:22 200 1079
316 2026-10-07 19:02:38 200 1429
317 2026-10-07 19:02:54 200 1057
318 2026-10-07 19:03:11 200 1479
319 2026-10-07 19:03:27 200 1129
320 2026-10-07 19:03:44 200 1790
321 2026-10-07 19:04:00 200 1420
322 2026-10-07 19:04:18 200 2459
323 2026-10-07 19:04:34 200 1148
324 2026-10-07 19:04:50 200 1420
325 2026-10-07 19:05:06 200 1085
326 2026-10-07 19:05:23 200 1428
327 2026-10-07 19:05:39 200 1017
328 2026-10-07 19:05:55 200 1427
329 2026-10-07 19:06:11 200 1085
330 2026-10-07 19:06:27 200 1139
331 2026-10-07 19:06:44 200 1036
332 2026-10-07 19:06:59 200 833