Kristian Ollikainen 6e82eff9e2 feat: Migrate from WebSocket to libp2p for peer-to-peer connectivity (#286)
## Description
Whew, some stuff is still not re-implemented, but it's working!

Rabbit's gonna explode with the amount of changes I reckon 😅



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a peer-to-peer relay system using libp2p with enhanced
stream forwarding, room state synchronization, and mDNS peer discovery.
- Added decentralized room and participant management, metrics
publishing, and safe, size-limited, concurrent message streaming with
robust framing and callback dispatching.
- Implemented asynchronous, callback-driven message handling over custom
libp2p streams replacing WebSocket signaling.
- **Improvements**
- Migrated signaling and stream protocols from WebSocket to libp2p,
improving reliability and scalability.
- Simplified configuration and environment variables, removing
deprecated flags and adding persistent data support.
- Enhanced logging, error handling, and connection management for better
observability and robustness.
- Refined RTP header extension registration and NAT IP handling for
improved WebRTC performance.
- **Bug Fixes**
- Improved ICE candidate buffering and SDP negotiation in WebRTC
connections.
  - Fixed NAT IP and UDP port range configuration issues.
- **Refactor**
- Modularized codebase, reorganized relay and server logic, and removed
deprecated WebSocket-based components.
- Streamlined message structures, removed obsolete enums and message
types, and simplified SafeMap concurrency.
- Replaced WebSocket signaling with libp2p stream protocols in server
and relay components.
- **Chores**
- Updated and cleaned dependencies across Go, Rust, and JavaScript
packages.
  - Added `.gitignore` for persistent data directory in relay package.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
Co-authored-by: Philipp Neumann <3daquawolf@gmail.com>
2025-06-06 16:48:49 +03:00
2025-01-29 04:16:27 +03:00
2025-01-29 04:16:27 +03:00
2024-08-20 15:12:00 +03:00
2024-10-27 05:12:05 +03:00

   

Nestri is an open-source, self-hosted Geforce Now alternative with Stadia's social features. Built and shaped by our gaming community.

Share the Nestri Repository on Social Media

   

Note

Nestri is more closer (in feature comparison) to Jellyfin/Plex than Moonlight. Our goal is to develop a comprehensive self-hosted cloud gaming solution for your home server.

Features

  • Save and share your game progress easily with friends
  • Simultaneously run multiple games on your GPU using Virtio-GPU Venus and/or Virgl
  • Play games using either your integrated GPU or dedicated GPU
  • Enjoy titles from your preferred Game Stores - Steam, Epic Games, Amazon Games, GOG.com
  • Experience Android gaming
  • Organize gaming sessions with friends and family through Nestri Parties
  • Stream directly to YouTube and Twitch straight from your setup
  • Family sharing capabilities
  • Support for Controller, Touchscreen, Keyboard, and Mouse devices

Possible Use Cases

  • Organize game nights or LAN parties with friends online or locally
  • For game developers, showcase your proof-of-concept multiplayer games for testing without installation
  • Create and manage your custom cloud-gaming platform using our robust API
  • Establish a game server for your family to enjoy gaming on the go

Goals

  • Provide a user-friendly setup - fire and forget
  • Deliver a simple and elegant interface for managing and playing your game library
  • Ensure a high-quality gaming experience out-of-the-box
  • Optimize for the best gaming performance right from the start

Non-Goals

  • Become a generic cloud-gaming service

Built With

  • Cloudflare Workers
  • Cloudflare Pages
  • Supabase
  • CrosVM (with Virtio-GPU Venus and Virgl support)
  • Docker
  • Qwik
  • Media-Over-Quic
  • AWS Route53

Known Issues

  • CrosVM is still under development and needs to be merged
  • Currently, the Intel dGPU, particularly the Arc A780, is the only tested and verified GPU

Donation

If you appreciate our work and wish to support the development of Nestri, consider making a donation here. Your contributions will help us improve the platform and enhance your gaming experience. Thank you for your support!

Demo

Nestri is still in development, but here is some footage from Behind-The-Scenes

Nestri - What will you play next?
Description
[Experimental] Open-source GeForce NOW alternative with Stadia's social features
Readme 180 MiB
Languages
TypeScript 73%
Go 11.9%
Rust 9.5%
Shell 2%
CSS 1.4%
Other 2.1%