dsh-relay-phone 0.18.3 → 0.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/relay-client.js +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-relay-phone",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
4
4
|
"description": "Remote-control your local DeepSeek Harness from a phone through your own zero-knowledge relay: phone-first page, QR pairing, end-to-end encryption, approvals, full desktop UI fallback.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/relay-client.js
CHANGED
|
@@ -167,13 +167,13 @@ export class RelayClient extends EventTarget {
|
|
|
167
167
|
let msg
|
|
168
168
|
try { msg = JSON.parse(data.toString()) } catch { return }
|
|
169
169
|
if (msg.t === 'challenge') {
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
//
|
|
170
|
+
// A tenant proof is keyed by a hash of the relay key (the relay never
|
|
171
|
+
// stores the key itself); the legacy admin --key is keyed by the key.
|
|
172
|
+
// Version 2 domain-separates the secret from the key id, and an older
|
|
173
|
+
// relay sends no `v`, so the v1 derivation stays the fallback.
|
|
174
174
|
const key = String(this.relayKey)
|
|
175
175
|
const secret = msg.mode === 'tenant'
|
|
176
|
-
? crypto.createHash('sha256').update(key).digest('hex')
|
|
176
|
+
? crypto.createHash('sha256').update(msg.v >= 2 ? `dsh-relay:hmac:v2:${key}` : key).digest('hex')
|
|
177
177
|
: key
|
|
178
178
|
const proof = crypto.createHmac('sha256', secret)
|
|
179
179
|
.update(`${msg.nonce}|${this.identity.id}`).digest('hex')
|