跨平台支持:CLI 模式 + 三平台一键安装命令

- cli.py:无界面命令行(host/tunnel/list/test/start/remove),复用隧道引擎
- storage.py:配置目录跨平台(Win %APPDATA%,Linux ~/ssh-e2e/.config,macOS ~/ssh-e2e/Library),
  非 Windows 经 keyring+AES-GCM 加密机密,无后端时明文并提示
- install.sh / install.ps1:经 gitea.xbay.cc 一键拉取安装
- 修复:Store 未创建配置目录的崩溃(CLI 路径)
This commit is contained in:
leefer
2026-09-27 19:59:25 +08:00
parent 27a3b4c6a8
commit 97d8b7ae89
6 changed files with 599 additions and 62 deletions
+2 -3
View File
@@ -10,7 +10,7 @@ from pathlib import Path
import webview
from engine import TunnelManager, probe_host
from storage import Store
from storage import Store, data_root
APP_DIR_NAME = "SshTunnelManager"
APP_TITLE = "SSH 隧道管理器"
@@ -21,8 +21,7 @@ _SENSITIVE = ("password", "key_passphrase")
def data_dir() -> Path:
base = os.environ.get("APPDATA") or str(Path.home() / "AppData" / "Roaming")
d = Path(base) / APP_DIR_NAME
d = data_root()
d.mkdir(parents=True, exist_ok=True)
return d