ssbc / ssb-config

standard configuration for ssb
MIT License
23 stars 18 forks source link

scope=local? #18

Closed staltz closed 5 years ago

staltz commented 5 years ago

The readme describes a connections config object with an entry that has "scope": "local". Is that even supported? I thought scope was either "private" or "public". As far as I understood, "private" is a closed network like a LAN, and "public" is on the internet. It would be useful to support scope meaning 'only this computer', and "local" is that idea, but I'm not sure if it works at all. And the naming is rather unfortunate, given that the sbot local plugin is actually using scope "private", not scope "local".

cc @arj03 @cryptix

staltz commented 5 years ago

Answering myself: "local" works. Odd (because this value is no where in sight in multiserver. Does any value other than "public" and "private" do the same as "local"?)

cryptix commented 5 years ago

I see the confusion but sadly can't answer. I really just tested what arj made, wasn't really involved in it's conception.

staltz commented 5 years ago

Also, I just tested "scope": "device" and it does the same as "local". I suppose since it's not a hard value, we could already begin to name it something else than "local" to avoid confusion.

cryptix commented 5 years ago

I guess that means everything that isn‘t pub or priv is local?

arj03 commented 5 years ago

Yeah local here just means something other than public and private. The idea is that we never want to advertise the unix socket to anybody. Private is used for the local plugin and yeah I agree that the naming can be a bit unfortunate.

staltz commented 5 years ago

Okay, thanks for the context.

By the way, the unix socket still uses local for the addresses: https://github.com/ssbc/multiserver/blob/80c8dc7302faa6ffdfbc72b0f3be378d51720001/plugins/unix-socket.js#L84 That's 3 different semantics for the same word

arj03 commented 5 years ago

Thanks @staltz for bringing this up. Seems to trip some people up. I have released a new version of multiserver and ssb-config to clear things up.