Files
ykxmz/_build/fix_build_ps1.py
xmz7891 b62ac865ea ykxmz 1.5.0:修复手表端 TLS 证书校验 + MTU 修复网络稳定性
被控端
- 修复 MTU 问题:夹 MSS + 路径 MTU 探测(公网可用率 48% -> 100%)
- 复用 HTTP 连接(免掉每次新建 TLS 的 30% 握手失败)
- 每分钟回头找局域网,自动切回快 400 倍的路径
- 画面心跳帧:静止时省流量,客户端仍知道流是活的
- 锁屏时给出可操作的提示

手表端
- 内置 GTS Root R4 / GlobalSign Root CA,修 SSLHandshakeException
- 连接错误翻译成人话(证书/时间/解析/超时分别提示)
- 经中转连上后用服务器报的地址刷新已配对记录
- 新增局域网连接页面、服务器延迟检测

服务器端
- 支持 chunked 请求体(修每 16 秒一次的连接错乱与大面积 502)
- 网络调优脚本 net-tune.sh(开机自动应用)
- 管理页:批量删除、网络体检、下载区
- 隧道改 HTTP/2 + 双连接

文档
- 许可协议 / 安装前必读 / 安装后须知(作者:小麦子)
2026-10-06 19:01:05 +08:00

56 lines
1.6 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""修 build_exe.ps1 里被搞坏的两行。
上一版用 PowerShell 内联 Python,$windows 被 PowerShell 先插值成了空,
续行符的反引号也丢了,导致脚本直接语法错误。
这里改成独立脚本文件,不受 PowerShell 插值影响。
"""
from __future__ import annotations
import sys
from pathlib import Path
TARGET = Path(r"C:\Users\shu\Desktop\deepseekagent\LanRemote\windows"
r"\build_exe.ps1")
BACKTICK = "`"
GOOD_LINES = [
f' --version-file (Join-Path $windows "version_info.txt") {BACKTICK}\n',
f' --noupx {BACKTICK}\n',
]
def main() -> int:
lines = TARGET.read_text(encoding="utf-8").splitlines(keepends=True)
out = []
removed = 0
inserted = False
for line in lines:
stripped = line.strip()
# 删掉上次插坏的两行
if stripped.startswith("--version-file") or stripped.startswith("--noupx"):
removed += 1
continue
out.append(line)
if (not inserted) and "PIL._tkinter_finder" in line:
out.extend(GOOD_LINES)
inserted = True
if not inserted:
print(" [失败] 没找到 PIL._tkinter_finder 锚点")
return 1
TARGET.write_text("".join(out), encoding="utf-8")
print(f" 删掉坏行 {removed} 行,插入正确行 {len(GOOD_LINES)} 行")
# 打印确认
print()
for i, line in enumerate(TARGET.read_text(encoding="utf-8").splitlines()):
if 24 <= i + 1 <= 38:
print(f" {i + 1}: {line}")
return 0
if __name__ == "__main__":
sys.exit(main())