Closed dominictarr closed 4 years ago
also tried to make better documentation
@mixmix @christianbundy thoughts?
here's the ouput I got running this locally. Seems good to me
"incoming": {
"net": [
{
"host": "127.0.0.1",
"port": 8008,
"scope": [
"device"
],
"transform": "shs"
},
{
"host": "::1",
"port": 8008,
"scope": [
"device"
],
"transform": "shs"
},
{
"host": "192.168.1.162",
"port": 8008,
"scope": [
"local"
],
"transform": "shs"
},
{
"host": "2407:7000:9c49:4e00:ecda:4ad0:b28a:25a2",
"port": 8008,
"scope": [
"public"
],
"transform": "shs"
},
{
"host": "2407:7000:9c49:4e00:cb8a:5dd8:b866:f655",
"port": 8008,
"scope": [
"public"
],
"transform": "shs"
}
],
"ws": [
{
"host": "127.0.0.1",
"port": 8989,
"scope": [
"device"
],
"transform": "shs"
},
{
"host": "::1",
"port": 8989,
"scope": [
"device"
],
"transform": "shs"
},
{
"host": "192.168.1.162",
"port": 8989,
"scope": [
"local"
],
"transform": "shs"
},
{
"host": "2407:7000:9c49:4e00:ecda:4ad0:b28a:25a2",
"port": 8989,
"scope": [
"public"
],
"transform": "shs"
},
{
"host": "2407:7000:9c49:4e00:cb8a:5dd8:b866:f655",
"port": 8989,
"scope": [
"public"
],
"transform": "shs"
}
]
}
hmmm .. . I tested this on windows + linux.
It looks to be generating sensible output, and it seems to be forming connections between windows + linux on the local wifi. The problem is that I think we need to test discovery + connection in both directions and not sure how best to do that.
ok turned off internet and saw a message replicated locally fine from Linux > windows. I'm merging this
Dominic there are now 2 sections with Scope, I'm gonna merge those
MISSING ip
dependency!
published as 3.4.3
thanks @dominictarr :heart:
thanks @mixmix note to other maintainers: mix's home wifi gives a public ipv6 address (actually, two!), which is fairly unusual.
fixes https://github.com/ssbc/ssb-config/issues/63
binds each interface to just one scope. that means
sbot.getAddress('local')
will return a 192... (or whatever, possibly including ipv6, etc. andsbot.getAddress('device')
will return 'localhost'.basically this was the code inside of non-private-ip, which was just a wrapper for the
ip
module but assumed you wanted a single host which made sense before we had multiserver and scopes etc