danog / php-rtc-ice
WebRTC ICE connectivity in PHP, ported to Amp v3 fibers and sockets. MadelineProto's PHP 8.2+ fork integrates the modular danog/php-rtc STUN, TURN, and mDNS stack.
Requires
- php: ^8.2
- amphp/amp: ^3.1.3
- amphp/dns: ^2.4.1
- amphp/socket: ^2.4.1
- danog/php-rtc-exception: ^1.1.5
- danog/php-rtc-mdns: ^1.1.7
- danog/php-rtc-stun: ^2.0
- danog/php-rtc-turn: ^2.0
- psr/log: ^3.0.2
- symfony/polyfill-php84: *
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.9.1
- mockery/mockery: ^1.6.15
- phpunit/phpunit: ^11.5 || ^12.0 || ^13.3.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-07 09:26:12 UTC
README
A PHP implementation of the Interactive Connectivity Establishment (ICE) protocol for WebRTC. This library helps establish peer-to-peer connectivity by handling candidate gathering, prioritization, connectivity checks, and consent freshness.
About this fork
This is the danog/php-rtc-ice fork used by MadelineProto. It targets PHP 8.2+ and replaces the ReactPHP implementation with Amp v3 DNS, sockets, fibers, and Revolt timers. Blocking connectivity checks run in separate fibers so socket receive loops remain live.
All internal Composer dependencies use their danog/php-rtc-* package names directly, so installing a component selects the maintained danog packages throughout the dependency graph.
Features
- STUN and TURN support (RFC 5389 / RFC 5766)
- Host, server-reflexive, relayed, and peer-reflexive candidates
- Candidate prioritization and pair selection
- ICE connectivity checks using STUN Binding Requests
- Consent freshness mechanism
- ICE Lite mode (optional)
- IPv4 and IPv6 support
Requirements
- PHP ≥ 8.2
Documentation
This package is part of the PHP WebRTC library. For complete documentation, examples, and API reference, visit:
Credits
Authors
-
Amin Yazdanpanah
- Website: aminyazdanpanah.com
- Email: github@aminyazdanpanah.com
-
Sana Moniri
- GtiHub: sanamoniri
Reporting Issues
Found a bug? Please report it on our issues.
License
BSD 3-Clause License. See LICENSE for details.