mirror of
https://gitee.com/xmz7891/ykxmz.git
synced 2026-10-18 16:00:43 +00:00
琚帶绔?- 淇 MTU 闂锛氬す MSS + 璺緞 MTU 鎺㈡祴锛堝叕缃戝彲鐢ㄧ巼 48% -> 100%锛?- 澶嶇敤 HTTP 杩炴帴锛堝厤鎺夋瘡娆℃柊寤?TLS 鐨?30% 鎻℃墜澶辫触锛?- 姣忓垎閽熷洖澶存壘灞€鍩熺綉锛岃嚜鍔ㄥ垏鍥炲揩 400 鍊嶇殑璺緞 - 鐢婚潰蹇冭烦甯э細闈欐鏃剁渷娴侀噺锛屽鎴风浠嶇煡閬撴祦鏄椿鐨?- 閿佸睆鏃剁粰鍑哄彲鎿嶄綔鐨勬彁绀? 鎵嬭〃绔?- 鍐呯疆 GTS Root R4 / GlobalSign Root CA锛屼慨 SSLHandshakeException - 杩炴帴閿欒缈昏瘧鎴愪汉璇濓紙璇佷功/鏃堕棿/瑙f瀽/瓒呮椂鍒嗗埆鎻愮ず锛?- 缁忎腑杞繛涓婂悗鐢ㄦ湇鍔″櫒鎶ョ殑鍦板潃鍒锋柊宸查厤瀵硅褰?- 鏂板灞€鍩熺綉杩炴帴椤甸潰銆佹湇鍔″櫒寤惰繜妫€娴? 鏈嶅姟鍣ㄧ - 鏀寔 chunked 璇锋眰浣擄紙淇瘡 16 绉掍竴娆$殑杩炴帴閿欎贡涓庡ぇ闈㈢Н 502锛?- 缃戠粶璋冧紭鑴氭湰 net-tune.sh锛堝紑鏈鸿嚜鍔ㄥ簲鐢級 - 绠$悊椤碉細鎵归噺鍒犻櫎銆佺綉缁滀綋妫€銆佷笅杞藉尯 - 闅ч亾鏀?HTTP/2 + 鍙岃繛鎺? 鏂囨。 - 璁稿彲鍗忚 / 瀹夎鍓嶅繀璇?/ 瀹夎鍚庨』鐭ワ紙浣滆€咃細灏忛害瀛愶級
84 lines
3.0 KiB
Python
84 lines
3.0 KiB
Python
# -*- coding: utf-8 -*-
|
||
"""补齐被误删的字段 + import + 删掉局域网自检的调用点。
|
||
|
||
前面那个补丁的正则太贪,挖掉了这些字段声明:
|
||
busy boolean (if (busy) / busy = true/false)
|
||
mirrorStreaming boolean (mirrorStreaming = false / ok)
|
||
incoming ByteArrayOutputStream
|
||
incomingName String (.isEmpty())
|
||
|
||
还差一个 import:DialogInterface(promptPairingCode 里用了)。
|
||
以及 requestPcSelfCheck() 被删了,但 942 行还在调它。
|
||
"""
|
||
from __future__ import annotations
|
||
|
||
import sys
|
||
from pathlib import Path
|
||
|
||
MAIN = Path(r"C:\Users\shu\Desktop\deepseekagent\LanRemote\android\src"
|
||
r"\com\lanremote\watch\MainActivity.java")
|
||
|
||
# 1. import
|
||
IMPORT_OLD = "import android.content.Intent;"
|
||
IMPORT_NEW = ("import android.content.DialogInterface;\n"
|
||
"import android.content.Intent;")
|
||
|
||
# 2. 字段(挂在 deviceBox 那一组后面)
|
||
FIELD_ANCHOR = ''' // 待排版的按钮队列,flushGrid() 里按列数切成行
|
||
private final java.util.List<View> cellQueue =
|
||
new java.util.ArrayList<View>();'''
|
||
|
||
FIELD_NEW = FIELD_ANCHOR + '''
|
||
// 正在连接中(避免重复点)
|
||
private volatile boolean busy;
|
||
// 屏幕镜像是否在推流
|
||
private volatile boolean mirrorStreaming;
|
||
// 正在接收的文件缓冲 + 文件名
|
||
private ByteArrayOutputStream incoming;
|
||
private String incomingName = "";'''
|
||
|
||
# 3. 自检调用点
|
||
CALL_OLD = " public void run() { requestPcSelfCheck(); }"
|
||
|
||
|
||
def main() -> int:
|
||
text = MAIN.read_text(encoding="utf-8")
|
||
ok = True
|
||
|
||
if "import android.content.DialogInterface;" in text:
|
||
print(" import DialogInterface 已在")
|
||
elif IMPORT_OLD in text:
|
||
text = text.replace(IMPORT_OLD, IMPORT_NEW, 1)
|
||
print(" 加了 import DialogInterface")
|
||
else:
|
||
print(" [失败] 找不到 import 锚点")
|
||
ok = False
|
||
|
||
if "private volatile boolean busy;" in text or "private boolean busy;" in text:
|
||
print(" busy 字段已在")
|
||
elif FIELD_ANCHOR in text:
|
||
text = text.replace(FIELD_ANCHOR, FIELD_NEW, 1)
|
||
print(" 补回 busy / mirrorStreaming / incoming / incomingName")
|
||
else:
|
||
print(" [失败] 找不到字段锚点")
|
||
ok = False
|
||
|
||
# 删掉自检调用
|
||
if CALL_OLD in text:
|
||
text = text.replace(CALL_OLD,
|
||
" public void run() {\n"
|
||
" // 局域网自检已随局域网功能一起移除\n"
|
||
" statusView.setText(\"该功能已移除\");\n"
|
||
" }", 1)
|
||
print(" 修掉 requestPcSelfCheck() 的调用点(改成提示已移除)")
|
||
else:
|
||
count = text.count("requestPcSelfCheck")
|
||
print(f" requestPcSelfCheck 剩余引用 {count} 处")
|
||
|
||
MAIN.write_text(text, encoding="utf-8", newline="\n")
|
||
return 0 if ok else 1
|
||
|
||
|
||
if __name__ == "__main__":
|
||
sys.exit(main())
|