trystero

✨🤝✨ Build instant multiplayer webapps, no server required — Magic WebRTC matchmaking over BitTorrent, Nostr, MQTT, IPFS, Supabase, and Firebase

MIT License

Downloads
1.1K
Stars
1.2K
Committers
4

Bot releases are visible (Hide)

trystero - 0.20.0 Latest Release

Published by dmotz 3 months ago

Breaking changes

  • 🔐 Auto encrypted sessions - SDPs are now always encrypted by default with a key derived from the app ID and room name. The key can be reverse engineered using these parameters, but it's better than flooding relays with plaintext session descriptions. For extra security, use a custom password argument.

Improvements

  • makeAction() now has referential equality when called multiple times with the same name argument. This makes it better suited for reactive frameworks. Thanks to @rogersanick for suggesting it.
  • Room leave events should fire reliably in Firefox when a peer closes the window or refreshes. (#77)
trystero - 0.19.0

Published by dmotz 3 months ago

Improvements

  • Shared peering logic - This release streamlines and consolidates all the different code for interfacing with strategy relays into a single place. This means that peering strategies are now much simpler and it's significantly easier to write new ones (or in future releases, mix and match strategies with the same group of peers). Previously, duplicated logic existed between various strategy modules, but going forward any fixes for deadlocks, race conditions, etc. will benefit all strategies.
  • More reliable/faster room entrance/exit events - Joining, leaving, and re-joining rooms should be noticeably faster and more reliable due to the strategy logic overhaul.
  • Better support for SSR frameworks - While it isn't working on Node quite yet (but getting closer), you can now import Trystero in Node without causing problems, which avoids the need for workarounds for shared code in SSR frameworks.
  • 🪐 IPFS - The IPFS strategy had been broken but is now working again.

New features

  • ⚡️ Supabase strategy - A new connection strategy is now available using Supabase, an open-source BaaS built on Postgres.
  • Incorrect password handling - joinRoom() now accepts a third argument, a function that will be called if a user tries to join a room with a password that doesn't match other users (docs).
trystero - 0.18.0

Published by dmotz 8 months ago

New features

  • 🐦 Nostr strategy - A new connection strategy is now available using Nostr, a decentralized network protocol with many public relays.
  • Unified relay API - The BitTorrent, Nostr, and MQTT strategies now take relayUrls and relayRedundancy options, so there is shared terminology across strategies and a smaller configuration API. These strategies also expose a getRelaySockets() function that returns a map of URLs to WebSockets.
  • Bug fix: Action sender functions can now send empty strings
  • Torrent tracker failures are now logged with their URLs

Breaking changes

  • 🌊 BitTorrent strategy
    • trackerUrls has been renamed relayUrls
    • trackerRedundancy has been renamed relayRedundancy
    • getTrackers() has been renamed getRelaySockets()
  • 📡 MQTT strategy
    • brokerUrls has been renamed relayUrls
    • brokerRedundancy has been renamed relayRedundancy
trystero - 0.17.0

Published by dmotz 9 months ago

New features

  • 📡 MQTT strategy - A new connection strategy is now available using MQTT, an open protocol for IoT device communication. Thanks to @freehuntx for suggesting the approach.
trystero - 0.16.0

Published by dmotz 11 months ago

  • (🪐 IPFS) swarmAddresses in IPFS config has been replaced by libp2pConfig
trystero - 0.15.2

Published by dmotz 11 months ago

  • (🪐 IPFS) Overhauled IPFS strategy
  • (🔥 Firebase) Updated to firebase@^10.6.0
trystero - 0.15.1

Published by dmotz 11 months ago

  • (🔥 Firebase only) fixed getOccupants()
trystero - 0.15.0

Published by dmotz 11 months ago

  • joinRoom() and makeAction() are now idempotent when called with the same namespaces which allows you to use them as React hooks. See the readme for details. Thanks to @rogersanick for proposing a solution.
trystero - 0.14.0

Published by dmotz 11 months ago

  • The Firebase strategy now requires passing the full databaseURL as the appId to joinRoom() (either with or without the https:// prefix), e.g. 'trystero-demo.firebaseio.com, not just 'trystero-demo'. This allows support for other regions which use different url structures. Thanks to @matthewjumpsoffbuildings for diagnosing and proposing a fix.
trystero - 0.13.0

Published by dmotz about 1 year ago

New features

  • getTrackers() (🌊 BitTorrent only) Returns an object of BitTorrent tracker URL keys mapped to their WebSocket connections. This can be useful for determining the state of the user's connection to the trackers and handling any connection failures. (Thanks to @jeremyckahn for implementing)
trystero - 0.12.0

Published by dmotz over 1 year ago

Breaking changes

  • getPeers() now returns a map of peer IDs to underlying RTCPeerConnection objects, previously returned an array of IDs (credit to @jeremyckahn for implementing)