Sign in

Post by @stefano

stefano
1d Public en edited

littleFedi introducing littleMesh

We've been buried in littleFedi work lately, and there's one piece I want to talk about because it's the one I'm genuinely excited about: littleMesh.

The problem is an old one. Federation assumes you have a domain, a public IP, an open port, a TLS certificate. Fine if you're renting a VPS somewhere. Not fine if your instance lives on a Raspberry Pi in your house, behind CGNAT, with an ISP that will never hand you a real IP address no matter how nicely you ask. Until now, that simply meant no federation for you. Full stop.

littleMesh gets rid of that requirement entirely, without asking you to build any of the infrastructure above.

On first run, your instance generates its own Ed25519 keypair. That key becomes your identity, no domain required, because your instance's address is derived straight from your public key, in the form .mesh.. Then your node opens an outbound connection to a "lighthouse", a small, publicly reachable relay, and registers itself there. Since the connection is outbound, it works from behind any NAT, any CGNAT, with zero port forwarding. The ISP never even notices.

When someone wants to reach you, they ask the lighthouse to open a circuit. The lighthouse introduces both sides, you call back, and it splices the connection together, but it only ever sees encrypted bytes, never your actual traffic.
Once the introduction is made, if you happen to have a reachable address after all, both sides skip the relay and talk directly. If not, the relay just keeps carrying you, quietly, in the background.

And if you already run an instance with a real domain, you can still turn on littleMesh, purely to reach mesh-only instances. Your own identity doesn't change at all.

There will be a default pair of community lighthouses, so you don't even need to find or run your own relay to get started, just say yes during littleFedi init and you're on the mesh.

The fediverse shouldn't require you to be reachable. It should reach you.

#littleFedi #littleMesh #Fediverse #OwnYourData

70 likes
57 boosts
Replying to @stefano
packet
packet
@packet @bsd.cafe
1d Public

@stefano that lighthouse function could be useful in other projects, too, it seems.

Replying to @stefano
Linux
Linux Is Best
@Linux @planet.moe
1d Public

@stefano

My only concern is that the relay could be the gatekeeper.

Replying to @Linux@planet.moe
stefano
1d Public en

@Linux@planet.moe the lighthouses can be self hosted and you can set multiple ones for failover. The first "official" two will share the same suffix, so they're totally swappable.

Replying to @stefano
Linux
Linux Is Best
@Linux @planet.moe
1d Public

@stefano

That works.

As long as someone can take control of their own relay and their own instance, this seems like an interesting idea.

Replying to @Linux@planet.moe
stefano
1d Public en

@Linux@planet.moe the same executable that runs the instance can run a lighthouse.

Replying to @Linux@planet.moe
stefano
1d Public en

@Linux@planet.moe littleMesh lets a littleFedi instance federate without a public IP address, a
DNS name, or an inbound port: from behind home NAT, behind CGNAT, on a laptop,
on a Pi plugged into a router nobody administers.

It is an additional transport, not a new protocol. ActivityPub, WebFinger, HTTP
Signatures, media fetches and the delivery queue all run over it unchanged.

Two kinds of machine take part:

  • a node is an ordinary littleFedi instance that cannot accept incoming
    connections;
  • a lighthouse is a small publicly reachable relay that introduces nodes to
    each other and copies encrypted bytes between them. It stores no accounts,
    reads no messages, and hosts no identities.

You need at least one lighthouse somewhere. It can be someone else's, a €3 VPS
of your own, or a machine you already run with a public address.

But we're also planning to run two "public" lighthouses and let the "littlefedi init" process to pre-configure them. Going online will really be a matter of seconds - without even needing a reverse proxy.

Replying to @stefano
fullywoolly
Ryan
@fullywoolly @mastodon.social
1d Public

@stefano sounds a lot like cloudflared tunnels but more transparent. Cool idea!

stefano
1d Public en

@fullywoolly@mastodon.social the idea came both from cloudflared and #DeltaChat relays. Dumb relays, that just interconnect people.

The only difference is that Delta Chat relays store messages, littleMesh doesn't

Replying to @stefano
fullywoolly
Ryan
@fullywoolly @mastodon.social
1d Public

@stefano I haven't played with delta chat yet. I just got most of the people I talk to on signal and not ready for more pain.

Replying to @stefano
fullywoolly
Ryan
@fullywoolly @mastodon.social
1d Public

@stefano ya it's always made me a bit apprehensive but generally ok with my threat model. Maybe one day I'll push another switch.

Replying to @stefano
samuel
Samuel
@samuel @social.spejset.org
1d Public

@stefano cool! Can you give an example of a handle? Like now I have @ samuel @ social.spejset.org

stefano
1d Public en
@samuel@social.spejset.org oh, the handle will be "terrible" - something like @@ghngxhtemvno7qyv4a7nejwjj36vh3xgqk5torc7jvpfezss2jyq.mesh.faro.example - but it's the only price to pay to federate from everywhere.
Replying to @stefano
samuel
Samuel
@samuel @social.spejset.org
1d Public

@stefano hehe, yeah I guess so :)

samuel
Samuel
@samuel @social.spejset.org
1d Public

@stefano will the handle be the same if one switches relay?

stefano
1d Public en

@samuel@social.spejset.org unfortunately, the handle will be created and will be the same for the entire lifecycle of the instance. You can change the secondary relays, but not the first one.

But you can multiple relays serving the same handle, so you can have a failover setup.

Replying to @stefano
samuel
Samuel
@samuel @social.spejset.org
1d Public

@stefano ohh, that is prettt neat! Like DeltaChat relays kind of?

stefano
1d Public en

@samuel@social.spejset.org Some ideas are similar, but Delta Chat relays have less constraints. The common idea is that the relay cannot read your contents, but littleMesh is (currently) more static than Delta Chat approach. This is because we need to keep compatible with the other ActivityPub implementation and the domain name needs to stay static.

Replying to @stefano
stereo
ralf tauscher :FreiburgSocial:
@stereo @freiburg.social
1d Unlisted

@stefano reminds me of reticulum

stefano
1d Unlisted en

@stereo@freiburg.social yes, there are some common points

Replying to @stefano
RootMoose
Root Moose
@RootMoose @bsd.cafe
1d Public

@stefano This is awesome.

Replying to @stefano
sturai
Fredo AM
@sturai @masto.es
1d Public

@stefano With littleMesh, will a user’s Fediverse identity be tied to the lighthouse’s domain, or could they use their own domain and switch lighthouses without changing their handle? Avoiding domain lock-in seems important for true decentralization.

Replying to @sturai@masto.es
stefano
1d Public en edited

@sturai@masto.es It's a mixed approach: you can have your official domain (like example.com) and still federate via mesh. But you (currently) cannot change the domain name, so if your primary use is via lighthouse, you need to stick with the lighthouse's domain (for proper federation). This is because we need to keep compatible with the other ActivityPub implementations and the domain name needs to stay static.

There are some workarounds like you can have more lighthouses and they can have the same domain (we call it suffix).

True decentralisation via total domain name swapping could be feasible but it would only work between littleFedi instances, as Mastodon and other ActivityPub implementations wouldn't support it.

Anyway, we're still trying to find a reliable workaround for this. My dream would be total decentralisation and total migration from one relay to another, like Delta Chat.

We already tested something similar and it worked, but broke federation with other AP implementations.

Replying to @stefano
sturai
Fredo AM
@sturai @masto.es
1d Public

@stefano Thanks for your response. Excited with this!✊🏻

Replying to @stefano
hotelzululima
hotelzululima
@hotelzululima @mastodon.social
1d Unlisted

@stefano @sturai

would be really nice if you offered Federation to Tor v3 Hidden service addresses in addition.. we have the same issue running under tor as those running on rfc1918 addresses behind CGNAT

stefano
1d Unlisted en

@hotelzululima@mastodon.social It's planned, and should not be complex to add as it's the same concept as using the mesh with direct connections (no relays involved).

Replying to @stefano
luca
Luca Sironi
@luca @sironi.xyz
1d Public

@stefano

Here in Romania I've never seen CGNAT, they give you a seldom changing public ip and ipv6 (works, but i have to find the time to study and review my dns/proxy config for that).

Other software use relays (Holos, nostr..) but it's not something I'm enthusiast about, again, it's a choke.

What about using something like tor ?

Replying to @luca@sironi.xyz
stefano
1d Public en

@luca@sironi.xyz It's planned, and should not be complex to add as it's the same concept as using the mesh with direct connections (no relays involved).

Replying to @stefano
pa
pa
@pa @zusammenhalt.de
18h Public

@stefano but how does the current Fediverse reach the mesh nodes? Are addons required inside the servers? Great Idea!

Replying to @pa@zusammenhalt.de
stefano
18h Public en

@pa@zusammenhalt.de there's a gateway (that can be self-hosted) so the mesh nodes can connect to that gateway and it will bridge the connections.