-
Notifications
You must be signed in to change notification settings - Fork 1
/
ssb-server.js
82 lines (75 loc) · 1.59 KB
/
ssb-server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
var Server = require('ssb-server')
var ssbKeys = require('ssb-keys')
var Config = require('ssb-config/inject')
var host = "ssb.guild.land"
var config = Config('ssb', {
host: host,
blobsPort: 8989,
connections: {
"incoming": {
"ws": [{
"host": "localhost",
"scope": ["public", "local"],
"port": 8989,
"transform": "shs",
"http": true
}],
"net": [
{
"scope": "device",
"port": 8009,
"host": "134.209.101.27",
"transform": "noauth"
},
{
"scope": "public",
"external": [ host ],
"host": "0.0.0.0",
"transform": "shs",
"port": 8008
},
],
"unix": [
{
"scope":"device",
"transform":"noauth",
"server": true
}
],
},
"outgoing": {
"net": [{ "transform": "shs" }]
}
},
permissions:
{
allow: null,
deny: null
},
logging:
{
level: "info"
}
})
var keys = ssbKeys.loadOrCreateSync("secret")
config.keys = keys
// add plugins
Server
.use(require('./ssb-trusting'))
.use(require('./ssb-geo-db'))
.use(require('ssb-clingy'))
.use(require('ssb-server/plugins/unix-socket'))
.use(require('ssb-server/plugins/plugins'))
.use(require('ssb-gossip'))
.use(require('ssb-replicate'))
.use(require('ssb-friends'))
.use(require('ssb-backlinks'))
.use(require('ssb-invite'))
.use(require('ssb-query'))
.use(require('ssb-blobs'))
.use(require('ssb-links'))
.use(require('ssb-ws'))
.use(require('ssb-ebt'))
.use(require('ssb-ooo'))
.use(require('ssb-server/plugins/local'))
var server = Server(config)