Download Latest Version v10.2.2 - Dependency fixes source code.tar.gz (216.9 kB)
Email in envelope

Get an email when there's a new version of Earthstar

Home / v10.2.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2023-05-16 1.1 kB
v10.2.0_ LAN peer discovery and sync source code.tar.gz 2023-05-16 216.8 kB
v10.2.0_ LAN peer discovery and sync source code.zip 2023-05-16 318.3 kB
Totals: 3 Items   536.2 kB 0

This is a feature release adding APIs to automatically discover and sync with peers on the local network. Automatically find and sync with friends at a café, or with your own devices at home.

:::ts
// Start a new discovery service, and advertise ourselves as "My Computer".
const discoveryLan = new DiscoveryLAN({ name: "My Computer" });

// Wait for new discovery service events...
for await (const discoveryEvent of peer.discover(discoveryLan)) {
  if (discoveryEvent.kind === "PEER DISCOVERED") {
    // We'll sync with everyone we find!
    discoveryEvent.sync();
  }
}

Discovery is powered by dns_sd, and sync itself is powered by a new fully encrypted TCP transport driver.

  • (Feature) Added Peer.discover, a new method for automatically discovering other peers. How it does that it left to the DiscoveryService you provide it.
  • (Feature) Added DiscoveryLAN, a discovery service for finding and advertising yourself to other peers on the local network. Works for both Node and Deno, requires --unstable on Deno.
Source: README.md, updated 2023-05-16