From ef89d8de8f52740b484d7713d6637495501555cc Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Thu, 10 Aug 2023 10:56:25 +0300 Subject: [PATCH] use proper shse.pubkey --- lib/plugin-hub.cjs | 7 +++---- package-lock.json | 13 +++++++------ package.json | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/plugin-hub.cjs b/lib/plugin-hub.cjs index a2fc16b..342b302 100644 --- a/lib/plugin-hub.cjs +++ b/lib/plugin-hub.cjs @@ -82,7 +82,7 @@ module.exports = { return { attendants() { - const clientPubkey = bs58.encode(Buffer.from(this.id, 'base64')) + const clientPubkey = this.shse.pubkey const clientRPC = local.peers[this.id][0] if (clientPubkey && clientPubkey !== local.pubkey) { debug('welcome %s', clientPubkey) @@ -102,9 +102,8 @@ module.exports = { createTunnel(target) { if (attendants.has(target)) { - // prettier-ignore - debug('received tunnel request for target %s from %s', target, this.id) - const origin = bs58.encode(Buffer.from(this.id, 'base64')) + const origin = this.shse.pubkey + debug('received tunnel request for target %s from %s', target, origin) return attendants.get(target).hubClient.connect(origin, () => {}) } else { // prettier-ignore diff --git a/package-lock.json b/package-lock.json index 78fa964..fab78c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "remark-parse": "10.0.2", "remark-rehype": "10.1.0", "secret-handshake-ext": "0.0.8", - "secret-stack": "ssbc/secret-stack#bare-mode", + "secret-stack": "7.1.0", "ssb-caps": "1.1.0", "ssb-conn": "6.0.4", "unified": "10.1.2" @@ -2931,9 +2931,9 @@ } }, "node_modules/secret-stack": { - "version": "6.4.2", - "resolved": "git+ssh://git@github.com/ssbc/secret-stack.git#e91f4d9cd0f63fff9b06dc538c844cd73ccaba5f", - "license": "MIT", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/secret-stack/-/secret-stack-7.1.0.tgz", + "integrity": "sha512-3gL8HV1WHv2fLDuLqmMlwgwP4adG1t3PNLjwEDxKXoAHg00ECO/LN5Z0dKhjF9qTmhgltpQYpad6OPqcsrFTEQ==", "dependencies": { "debug": "^4.3.0", "hoox": "0.0.1", @@ -5999,8 +5999,9 @@ } }, "secret-stack": { - "version": "git+ssh://git@github.com/ssbc/secret-stack.git#e91f4d9cd0f63fff9b06dc538c844cd73ccaba5f", - "from": "secret-stack@ssbc/secret-stack#bare-mode", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/secret-stack/-/secret-stack-7.1.0.tgz", + "integrity": "sha512-3gL8HV1WHv2fLDuLqmMlwgwP4adG1t3PNLjwEDxKXoAHg00ECO/LN5Z0dKhjF9qTmhgltpQYpad6OPqcsrFTEQ==", "requires": { "debug": "^4.3.0", "hoox": "0.0.1", diff --git a/package.json b/package.json index f4d6e16..af23d19 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "pull-cat": "1.1.11", "pull-notify": "0.1.2", "pull-stream": "3.7.0", - "secret-stack": "ssbc/secret-stack#bare-mode", + "secret-stack": "7.1.0", "secret-handshake-ext": "0.0.8", "ssb-caps": "1.1.0", "ssb-conn": "6.0.4",