Releases: dmotz/trystero
0.21.0-beta.1
This beta release introduces a new, homegrown way of handling RTCPeerConnection
instances behind the scenes. Trystero previously used simple-peer which is mostly unmaintained and showing its age. The new peer management code uses modern techniques, makes the build significantly lighter, and allows more flexibility for the project, like getting Trystero working in Node (see the new rtcPolyfill
option for details).
If you use Trystero in your projects, please test this new beta version and report any issues you find. If you encounter a problem, be sure to confirm the issue does not occur on the latest stable version (0.20.1) under the same network conditions (e.g. peer A on network 1 <-> peer B on network 2).
Try this release via npm i trystero@beta
.
0.20.1
0.20.0
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)
0.19.0
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).
0.18.0
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
andrelayRedundancy
options, so there is shared terminology across strategies and a smaller configuration API. These strategies also expose agetRelaySockets()
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 renamedrelayUrls
trackerRedundancy
has been renamedrelayRedundancy
getTrackers()
has been renamedgetRelaySockets()
- π‘ MQTT strategy
brokerUrls
has been renamedrelayUrls
brokerRedundancy
has been renamedrelayRedundancy
0.17.0
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.