改造client直接接入网关,网关的配置信息,ssh服务器信息读取:terminal.config.json 网关使用~/remoteconn现有网关,gateway在本地,wss协议,使用8787端口。外部访问web使用https://shell.biboer.cn:5173。 使用shell.biboer.cn这个域名, npm run dev后,使用https://shell.biboer.cn:5173访问。 Vite 开发服务本身走 HTTPS。 证书和私钥: const DEV_PUBLIC_HOST = "shell.biboer.cn"; const DEV_CERT_PATH = "/Users/gavin/.acme.sh/shell.biboer.cn_ecc/fullchain.cer"; const DEV_KEY_PATH = "/Users/gavin/.acme.sh/shell.biboer.cn_ecc/shell.biboer.cn.key"; --- 参考../xterminal,增加: 1. 软键盘弹出和折叠,行的位置计算参考xtermal。 -- 这点重要 2. 滚动容器保持原生丝滑。现在xterm太卡。 --- 结论: 使用xterm.js,手机体验不好.