A server-side implementation of NetherNet, the WebRTC DataChannel transport used by Minecraft: Bedrock Edition, in PHP.
It is built on ext-webrtc, which provides bindings for libdatachannel.
- PHP 8.1 or newer (64-bit) with IPv6 support
ext-webrtcext-encodingext-openssl,ext-hash,ext-json,ext-sockets
NetherNetServer: the entry point. Accepts clients, owns their sessions, and is driven by callingtick().ServerEventListener: implemented by you to receive session open/close events and incoming packets.- Signaling:
HttpSignaling(online play) andLanSignaling(LAN discovery), registered withaddSignaling(). - Identity:
ServerIdentityandSelfSignedIdentityProviderfor the server's identity, andPeerIdentityfor verified clients. - Address blocking:
blockAddress()andunblockAddress().
examples/server.php is a complete echo server showing how to set everything up and run the tick loop.