Skip to content
Amber-PMPublic

About

A standalone NetherNet (WebRTC) transport library for Minecraft: Bedrock Edition, written in PHP. Features secure signaling, peer authentication, reliable DataChannels, and bounded backpressure.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

NetherNet transport for PHP
The WebRTC transport used by Minecraft: Bedrock Edition

CI


NetherNet only handles the transport: signaling, identity, framing and connection lifecycle. Packets and gameplay belong to the server.

Requirements

  • PHP 8.1+ with OpenSSL
  • ext-rtc built for the running PHP (ZTS for Amber)

Usage

$transport = new Transport($config, $identityHandler, $listener,
	static fn() => new ExtRtcPeer($config, 20000, 20127, $bindAddress));
  • Port range 20000, 20127 gives each player its own UDP port.
  • One port for everyone with udpMux: true and begin === end. On Windows it needs an explicit bind address.
  • Behind port forwarding pass advertisedAddress: 'public ip'. The forwarded port must match the local one.
  • Connection::send() returning ACCEPTED means local admission, not delivery.
  • Connection::getStats() returns RTT and byte counters while open.

Development

composer check
php -d extension=/path/to/rtc.so vendor/bin/phpunit -c phpunit.rtc.xml.dist

Without ext-rtc use composer install --ignore-platform-req=ext-rtc for the fake backend tests. ExtWebRtcPeer remains as a legacy backend; never load ext-rtc and ext-webrtc together.

References

License

LGPL-3.0-only

About

A standalone NetherNet (WebRTC) transport library for Minecraft: Bedrock Edition, written in PHP. Features secure signaling, peer authentication, reliable DataChannels, and bounded backpressure.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages