Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should maybe connect to pubs automatically #275

Closed
christianbundy opened this issue Feb 29, 2020 · 8 comments · Fixed by #339
Closed

Should maybe connect to pubs automatically #275

christianbundy opened this issue Feb 29, 2020 · 8 comments · Fixed by #339
Labels
enhancement New feature or request networking Connections between computers safety Moderation, abuse, and other safety concerns
Milestone

Comments

@christianbundy
Copy link
Member

What's the problem you want solved? SSB-CONN is taking an approach where you only connect to people that you explicitly authorize connections to, which means that right now we only connect to people that we follow directly. This makes replication hard, because if you follow one person then you can only peer when you're both on the same LAN. This gives us a bit of privacy because it doesn't share our IP addresses with randos, but makes replication painful (especially if you're starting from scratch like #274).

Is there a solution you'd like to recommend? Honestly I want to just say "automatically connect to anyone we can", but that's probably not good from a privacy perspective. Maybe we should automatically connect to people within N hops? I'd feel bad about having the user have to manually add peers to their peer list, so I'd like to do it automatically, but there's a delicate balance between convenience and privacy.

@christianbundy christianbundy added enhancement New feature or request safety Moderation, abuse, and other safety concerns networking Connections between computers labels Feb 29, 2020
@georgeowell
Copy link
Collaborator

As I understand it:

  • Patchwork is set to two hops by default
  • Patchbay has two sliders, one for the hops of the pubs you connect to and one for the hops of general replication.

For example a default ~/.ssb/config could look like:

{
  "friends": {
    "hops": 2
  },
  "gossip": {
    "friends": true,
    "global": false
  },
  "friendPub": {
    "hops": 1
  }
}

This example shows that someone is replicating with friends and friend of friends and then only connecting to pubs of friends (not sure how this is calculated).

Could we just implement some quick UX for setting this?

@christianbundy
Copy link
Member Author

@georgeowell thanks for the reminder about those!

@arj03 does friendpub or incoming guard work with SSB-CONN to automatically connect to staged peers, or is there a better way to do this?

@arj03
Copy link

arj03 commented Mar 1, 2020

I think ssb-friend-pub is what you are after here. It's actually quite high on my list for the browser stuff. It would be nice if the announce + confirm dance could be integrated into the UI so that one can explain what it is and why it is important. I did the hops slider as a way to explain how it works in patchbay, I still think that is good.

For me it really ties back to building infrastructure (the whole thing) as a commons and for each other.

@christianbundy
Copy link
Member Author

@arj03 Does that integrate with SSB-CONN? I just did a Ctrl+F for "conn" but didn't see anything. The problem I'm facing is that SSB-CONN requires that I manually connect to available peers, but I don't want to present that in the UI with "here's a list of people, connect to them if you want" because that's low-level detail that I'd like for beginners to be able to avoid.

I think I'd like a solution that automatically connects to any staged peer that's within N hops, that way I can say "hey we can't find any peers within N hops, do you want to increase the range?" and have it be configurable. As long as you follow your pub (or same-as (#267)) I think that should fall within the correct number of hops, but the incoming guard seems to only stop incoming connections rather than auto-connect to staged peers.

@arj03
Copy link

arj03 commented Mar 3, 2020

@christianbundy well it hooks into ssb.gossip. If you use conn instead of gossip, it is nice enough to also present itself as ssb.gossip for backwards compatibility.

As for incoming guard, lets keep that out of the discussion for now. I remember talking to staltz at some point that it needs to be rethought when it comes to ssb-conn.

I havn't digged too much into ssb-conn yet, but will soon, because as I said friend pub is high on my list and I need to run it together with ssb-conn to handle multiple connections.

@cinnamon-bun
Copy link
Collaborator

@christianbundy

As long as you follow your pub

I have thoughts about auto-following pubs :)

Following a pub will dump a lot of randos into your social radius. I wish that either

  • Joining a pub didn't make you also follow it. Then you'd have to find friends by going laterally through your friends-of-friends, hopefully resulting in a social graph more similar to your real-life friends. This also requires peer invites to solve the cold-start problem.
  • Or people were reminded to unfollow pubs once they've made 15 friends, and there was a useful interface for doing so
  • Or pubs were more strongly themed as communities (like mastodon servers are) so that you'd get a useful collection of randos

This could all be improved with a very clear pub UI which explains the difference between following and joining a pub, has a list of pubs and your relationship with them.

What do we want SSB to be - is it a worldwide plaza like Twitter or a warren of your real-life friends like a chat app?

My perspective is mostly about safety, abuse, and spam problems. Those are much worse on a Twitter than a WhatsApp which is why I lean towards keeping things small and local. But right now SSB is more of a Twitter and I've made friends around the world that I wouldn't have otherwise! So I'm conflicted.

@cinnamon-bun
Copy link
Collaborator

Privacy-wise: we could add a toggle button between "connect to any peers" and "connect to approved peers only". I'd feel ok starting this on "any peers" on new Oasis installations if there's some other under-the-hood limit like number of hops.

My privacy concern is: if someone malicious has a pub that logs IP addresses and SSB ids to correlate them, how much of the scuttleverse can they get to connect to their pub?

@cinnamon-bun
Copy link
Collaborator

The user flow for approving peers will be forgotten if it's hidden in the Settings page. I wonder if we need a little "network status" panel that appears in the navbar. It wouldn't update live like it does in Patchwork, only on page reloads.

Network status
⚡ Connected to 4 peers
❓ New peers available, click here

We could also show little messages there to prompt people through the setup process on a fresh install.

@christianbundy christianbundy linked a pull request Mar 25, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request networking Connections between computers safety Moderation, abuse, and other safety concerns
Development

Successfully merging a pull request may close this issue.

4 participants