- AutoTest:大厅 Hash Request → 取 digest/空间 id → 空间连接 EnterSpace → 收空间帧 - StreamDecoder:首条密文即穷举单字节链路密钥(K),之后 s2c 自动解密 - 首条空间帧到达后再加密发送 G.q1wd,服务端才会继续下发容器数据 - RunAutoTest.ps1:自动拉起大厅/空间两条中继,跑完自动回收 - 实测通过:握手成功、K 唯一命中、容器 1 条、回编码一致
23 lines
605 B
Kotlin
23 lines
605 B
Kotlin
// app:入口与自检驱动(Node 下跑 golden 解码,浏览器下启动客户端)
|
|
plugins {
|
|
kotlin("multiplatform")
|
|
}
|
|
|
|
kotlin {
|
|
js(IR) {
|
|
browser()
|
|
nodejs()
|
|
binaries.executable()
|
|
}
|
|
sourceSets {
|
|
val jsMain by getting {
|
|
dependencies {
|
|
implementation(project(":core"))
|
|
implementation(project(":net"))
|
|
// 自动测试用 ws 客户端:需要自定义 User-Agent(真实服务器会拒绝 Node 默认 UA)
|
|
implementation(npm("ws", "8.18.0"))
|
|
}
|
|
}
|
|
}
|
|
}
|