tui.py: 服务器地址自动补 http:// 前缀 (只输 IP:端口 即可)

This commit is contained in:
lou
2026-08-10 00:35:59 +08:00
parent e1d19c0bd4
commit b18e853fea
+2
View File
@@ -43,6 +43,8 @@ def upload() -> None:
print(f"[错误] 文件不存在: {path}")
return
server = _clean(input("服务器 [http://127.0.0.1:8000]: ")) or "http://127.0.0.1:8000"
if not server.startswith(("http://", "https://")):
server = "http://" + server # 只输 IP:端口 自动补协议
chunk_size = _clean(input("卷大小 MB [10]: ")) or "10"
print("\n[1/2] 加密 + 分卷 + 元数据 ...")