use proper shse.pubkey

This commit is contained in:
Andre Staltz 2023-08-10 10:56:25 +03:00
parent b3168890a7
commit ef89d8de8f
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
3 changed files with 11 additions and 11 deletions

View File

@ -82,7 +82,7 @@ module.exports = {
return { return {
attendants() { attendants() {
const clientPubkey = bs58.encode(Buffer.from(this.id, 'base64')) const clientPubkey = this.shse.pubkey
const clientRPC = local.peers[this.id][0] const clientRPC = local.peers[this.id][0]
if (clientPubkey && clientPubkey !== local.pubkey) { if (clientPubkey && clientPubkey !== local.pubkey) {
debug('welcome %s', clientPubkey) debug('welcome %s', clientPubkey)
@ -102,9 +102,8 @@ module.exports = {
createTunnel(target) { createTunnel(target) {
if (attendants.has(target)) { if (attendants.has(target)) {
// prettier-ignore const origin = this.shse.pubkey
debug('received tunnel request for target %s from %s', target, this.id) debug('received tunnel request for target %s from %s', target, origin)
const origin = bs58.encode(Buffer.from(this.id, 'base64'))
return attendants.get(target).hubClient.connect(origin, () => {}) return attendants.get(target).hubClient.connect(origin, () => {})
} else { } else {
// prettier-ignore // prettier-ignore

13
package-lock.json generated
View File

@ -26,7 +26,7 @@
"remark-parse": "10.0.2", "remark-parse": "10.0.2",
"remark-rehype": "10.1.0", "remark-rehype": "10.1.0",
"secret-handshake-ext": "0.0.8", "secret-handshake-ext": "0.0.8",
"secret-stack": "ssbc/secret-stack#bare-mode", "secret-stack": "7.1.0",
"ssb-caps": "1.1.0", "ssb-caps": "1.1.0",
"ssb-conn": "6.0.4", "ssb-conn": "6.0.4",
"unified": "10.1.2" "unified": "10.1.2"
@ -2931,9 +2931,9 @@
} }
}, },
"node_modules/secret-stack": { "node_modules/secret-stack": {
"version": "6.4.2", "version": "7.1.0",
"resolved": "git+ssh://git@github.com/ssbc/secret-stack.git#e91f4d9cd0f63fff9b06dc538c844cd73ccaba5f", "resolved": "https://registry.npmjs.org/secret-stack/-/secret-stack-7.1.0.tgz",
"license": "MIT", "integrity": "sha512-3gL8HV1WHv2fLDuLqmMlwgwP4adG1t3PNLjwEDxKXoAHg00ECO/LN5Z0dKhjF9qTmhgltpQYpad6OPqcsrFTEQ==",
"dependencies": { "dependencies": {
"debug": "^4.3.0", "debug": "^4.3.0",
"hoox": "0.0.1", "hoox": "0.0.1",
@ -5999,8 +5999,9 @@
} }
}, },
"secret-stack": { "secret-stack": {
"version": "git+ssh://git@github.com/ssbc/secret-stack.git#e91f4d9cd0f63fff9b06dc538c844cd73ccaba5f", "version": "7.1.0",
"from": "secret-stack@ssbc/secret-stack#bare-mode", "resolved": "https://registry.npmjs.org/secret-stack/-/secret-stack-7.1.0.tgz",
"integrity": "sha512-3gL8HV1WHv2fLDuLqmMlwgwP4adG1t3PNLjwEDxKXoAHg00ECO/LN5Z0dKhjF9qTmhgltpQYpad6OPqcsrFTEQ==",
"requires": { "requires": {
"debug": "^4.3.0", "debug": "^4.3.0",
"hoox": "0.0.1", "hoox": "0.0.1",

View File

@ -37,7 +37,7 @@
"pull-cat": "1.1.11", "pull-cat": "1.1.11",
"pull-notify": "0.1.2", "pull-notify": "0.1.2",
"pull-stream": "3.7.0", "pull-stream": "3.7.0",
"secret-stack": "ssbc/secret-stack#bare-mode", "secret-stack": "7.1.0",
"secret-handshake-ext": "0.0.8", "secret-handshake-ext": "0.0.8",
"ssb-caps": "1.1.0", "ssb-caps": "1.1.0",
"ssb-conn": "6.0.4", "ssb-conn": "6.0.4",