chore: 添加KEX详细字节调试日志并修复package.json中的wrangler执行方式

This commit is contained in:
GreenhandTan committed 2026-06-14 10:05:56 +08:00
1 parent 5c1aeedb65
commit 4fc4e7ec42
2 files changed
+6 -2

No files matched your search

+2 -2
View File
@@ -4,8 +4,8 @@
"description": "纯 Cloudflare 架构 Web SSH 工具",
"main": "src/worker/index.ts",
"scripts": {
"dev": "node scripts/build-html.js && wrangler dev",
"deploy": "node scripts/build-html.js && wrangler deploy",
"dev": "node scripts/build-html.js && npx wrangler dev",
"deploy": "node scripts/build-html.js && npx wrangler deploy",
"build:frontend": "node scripts/build-html.js",
"test": "vitest run"
},
+4
View File
@@ -343,6 +343,10 @@ export class SSHSession {
);
console.log('[KEX] Exchange hash hex=' + Array.from(H).map(b => b.toString(16).padStart(2, '0')).join(''));
console.log('[KEX] sharedSecret hex=' + Array.from(sharedSecret).map(b => b.toString(16).padStart(2, '0')).join(''));
console.log('[KEX] hostKey hex=' + Array.from(hostKey).map(b => b.toString(16).padStart(2, '0')).join(''));
console.log('[KEX] signature hex=' + Array.from(signature).map(b => b.toString(16).padStart(2, '0')).join(''));
console.log('[KEX] clientPubKey hex=' + Array.from(this.ecdhRawPublicKey).map(b => b.toString(16).padStart(2, '0')).join(''));
console.log('[KEX] serverPubKey hex=' + Array.from(serverRawPublicKey).map(b => b.toString(16).padStart(2, '0')).join(''));
if (!this.sessionID) {
this.sessionID = H;