Comstar is a simple, peer-to-peer UDP relay server designed to connect instances of xemu (the original Xbox emulator) across the internet. By utilizing the Hyperswarm DHT network, Comstar creates decentralized "lobbies" that allow players to connect without the need for complex router configurations, port forwarding, or dedicated VPNs.
It listens for local UDP packets generated by xemu, encapsulates them, and broadcasts them over a P2P swarm to all other peers in your lobby. When remote packets are received, they are forwarded back to your local xemu instance.
- Zero-Config Networking: Uses Hyperswarm for NAT traversal and peer discovery. No port forwarding required.
- Room Codes: Easily play with friends using generated, shareable room codes.
- [WIP] MAC Learning & Switching: Optionally behaves like a network switch, learning MAC addresses from packet headers to route traffic efficiently (rather than blindly flooding the network).
- Cross-Platform: Runs anywhere Node.js runs.
- Node.js (v16 or higher recommended)
- xemu emulator
- Clone or download this repository.
- Install the required dependencies:
npm installAlternatively, @yao/pkg packaged binaries will be provided in the Releases tab.
Comstar operates via a command-line interface. One player must host a lobby, and the other player(s) will join using the generated code.
To create a new lobby, use the host command:
node comstar.js hostThe console will clear and display your unique Room Code. Share this code with your friends.
You can also specify a custom topic to generate a static, reproducible room code:
node comstar.js host "my-secret-halo-lobby"To join an existing lobby, use the join command followed by the room code provided by the host:
node comstar.js join <Room_Code>You can append these options to either the host or join commands to customize the network binding and logging:
-p, --port <port>: The local UDP port Comstar listens on. (Default:1337)--host <host>: The local interface to bind to. (Default:127.0.0.1)-v, --verbose: Enables verbose debug output for troubleshooting packet routing.
Example:
node comstar.js join ABCDEFG -p 2000 -vOnce Comstar is running (either hosting or joined), you need to tell your xemu emulator to send its network traffic to Comstar.
- Open xemu.
- Go to Machine -> Settings -> Network.
- Under the Attached to dropdown, select UDP Tunnel.
- Configure the ports:
- Bind Address: Set this to any free port on
0.0.0.0(e.g.,0.0.0.0:1338). - Remote Address: Set this to whichever port Comstar is running on
127.0.0.1(e.g.,127.0.0.1:1337)
- Bind Address: Set this to any free port on
How it works: xemu will send outbound Xbox network traffic to 127.0.0.1:1337. Comstar captures this, routes it through the Hyperswarm DHT to your friends, and sends their inbound traffic back to your xemu client at 1338.
This software is released under the GNU General Public License v2.0 (or later). See the source headers for details. Copyright (C) 2026 Trenton "Raz" Robichaux.