axolotl-pm / nethernet
A NetherNet (WebRTC) transport implementation written in PHP
0.3.1
2026-10-16 02:35 UTC
Requires
- php: ^8.1
- php-64bit: *
- php-ipv6: *
- ext-encoding: ~1.0.0
- ext-hash: *
- ext-json: *
- ext-openssl: *
- ext-sockets: *
- ext-webrtc: *
- pocketmine/log: ^0.4.0
Requires (Dev)
- phpstan/phpstan: 2.1.46
- phpstan/phpstan-phpunit: ^2.0.0
- phpstan/phpstan-strict-rules: ^2.0.0
- phpunit/phpunit: ^10.5.24
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-16 05:57:09 UTC
README
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.
Requirements
- PHP 8.1 or newer (64-bit) with IPv6 support
ext-webrtcext-encodingext-openssl,ext-hash,ext-json,ext-sockets
What's in the library?
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().
Usage
examples/server.php is a complete echo server showing how to set everything up and run the tick loop.