Commit 2132bd9fceb7210863db722bc5fd5ad1370adf84
Merge pull request #258 from ssbc/upgrade-scuttlebot-to-12
Bump scuttlebot to 12.0.0 and use unix socket + noauth for local sbot connectionAnders Rune Jensen authored on 9/14/2018, 1:43:37 PM
GitHub committed on 9/14/2018, 1:43:37 PM
Parent: bdff198133f1c2a6de3a2eb1374aca2178ce1813
Parent: 32dce475ec91f2a5a01cdc3c18e065cdec7125dd
Files changed
config.js | changed |
package-lock.json | changed |
package.json | changed |
config.js | |||
---|---|---|---|
@@ -1,8 +1,9 @@ | |||
1 | 1 … | const nest = require('depnest') | |
2 | 2 … | const Config = require('ssb-config/inject') | |
3 | 3 … | const ssbKeys = require('ssb-keys') | |
4 | 4 … | const Path = require('path') | |
5 … | +const merge = require('lodash/merge') | ||
5 | 6 … | ||
6 | 7 … | const appName = process.env.ssb_appname || 'ssb' | |
7 | 8 … | const opts = appName === 'ssb' | |
8 | 9 … | ? null | |
@@ -14,12 +15,19 @@ | |||
14 | 15 … | return nest('config.sync.load', () => { | |
15 | 16 … | if (!config) { | |
16 | 17 … | console.log('LOADING config') | |
17 | 18 … | config = Config(appName, opts) | |
18 | - config.keys = ssbKeys.loadOrCreateSync(Path.join(config.path, 'secret')) | ||
19 | 19 … | ||
20 | - // HACK: fix offline on windows by specifying 127.0.0.1 instead of localhost (default) | ||
21 | - config.remote = `net:127.0.0.1:${config.port}~shs:${config.keys.id.slice(1).replace('.ed25519', '')}` | ||
20 … | + const keys = ssbKeys.loadOrCreateSync(Path.join(config.path, 'secret')) | ||
21 … | + const pubkey = keys.id.slice(1).replace(`.${keys.curve}`, '') | ||
22 … | + | ||
23 … | + config = merge(config, { | ||
24 … | + connections: { | ||
25 … | + incoming: { unix: [{ 'scope': 'local', 'transform': 'noauth' }] } | ||
26 … | + }, | ||
27 … | + keys, | ||
28 … | + remote: `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}` | ||
29 … | + }) | ||
22 | 30 … | } | |
23 | 31 … | return config | |
24 | 32 … | }) | |
25 | 33 … | } |
package-lock.json | ||
---|---|---|
The diff is too large to show. Use a local git client to view these changes. Old file size: 314313 bytes New file size: 314336 bytes |
package.json | ||
---|---|---|
@@ -82,17 +82,17 @@ | ||
82 | 82 … | "read-directory": "^3.0.0", |
83 | 83 … | "require-style": "^1.0.1", |
84 | 84 … | "scuttle-blog": "^1.0.1", |
85 | 85 … | "scuttle-poll": "^1.3.4", |
86 | - "scuttlebot": "^11.4.2", | |
86 … | + "scuttlebot": "^12.0.0", | |
87 | 87 … | "setimmediate": "^1.0.5", |
88 | 88 … | "ssb-about": "^0.1.2", |
89 | 89 … | "ssb-backlinks": "^0.7.3", |
90 | 90 … | "ssb-blobs": "^1.1.5", |
91 | 91 … | "ssb-chess": "^2.3.12", |
92 | 92 … | "ssb-chess-db": "^1.0.3", |
93 | - "ssb-config": "^2.2.0", | |
94 | - "ssb-ebt": "^5.2.2", | |
93 … | + "ssb-config": "^2.3.0", | |
94 … | + "ssb-ebt": "^5.2.3", | |
95 | 95 … | "ssb-friends": "^3.1.3", |
96 | 96 … | "ssb-keys": "^7.0.15", |
97 | 97 … | "ssb-meme": "^1.0.4", |
98 | 98 … | "ssb-mentions": "^0.5.0", |
Built with git-ssb-web