mirror of
https://github.com/ossrs/srs.git
synced 2025-11-24 11:54:21 +08:00
This PR adds comprehensive IPv6 support to SRS for all major protocols, enabling dual-stack (IPv4/IPv6) operation across the entire streaming server. Key Features: * RTMP/RTMPS: IPv6 support for streaming ingestion and playback * HTTP/HTTPS: IPv6 support for HTTP-FLV streaming and API endpoints * WebRTC: IPv6 support for UDP/TCP media transport (WHIP/WHEP) * SRT: IPv6 support for low-latency streaming * RTSP: IPv6 support for standards-based streaming For config, see `conf/console.ipv46.conf` for example. Publish RTMP or RTMPS via IPv6: ```bash ffmpeg -re -i ./doc/source.flv -c copy -f flv 'rtmp://[::1]:1935/live/livestream' ffmpeg -re -i ./doc/source.flv -c copy -f flv 'rtmps://[::1]:1443/live/livestream' ``` Play RTMP or RTMPS stream via IPv6 by ffplay: ```bash ffplay 'rtmp://[::1]:1935/live/livestream' ffplay 'rtmps://[::1]:1443/live/livestream' ``` Play by IPv6 via HTTP streaming: * HTTP-FLV: [http://[::1]:8080/live/livestream.flv](http://[::1]:8080/players/srs_player.html) * HTTPS-FLV: [https://[::1]:8088/live/livestream.flv](https://[::1]:8088/players/srs_player.html) To access HTTP API via IPv6: * HTTP API: `curl 'http://[::1]:1985/api/v1/versions'` * HTTPS API: `curl -k 'https://[::1]:1990/api/v1/versions'` ```json { "code": 0, "data": { "major": 7, "minor": 0, "revision": 66, "version": "7.0.66" } } ``` Using HTTP API, publish by IPv6 WHIP via [HTTP](http://[::1]:8080/players/whip.html), and play by [WHEP](http://[::1]:8080/players/whep.html) * WHIP: `http://[::1]:1985/rtc/v1/whip/?app=live&stream=livestream` * WHEP: `http://[::1]:1985/rtc/v1/whep/?app=live&stream=livestream` Using HTTPS API, publish by IPv6 WHIP via [WHIP](https://[::1]:8088/players/whip.html), and play by [WHEP](https://[::1]:8088/players/whep.html) * WHIP: `https://[::1]:1990/rtc/v1/whip/?app=live&stream=livestream` * WHEP: `https://[::1]:1990/rtc/v1/whep/?app=live&stream=livestream` Publish SRT stream by FFmpeg via IPv6: ```bash ffmpeg -re -i ./doc/source.flv -c copy -pes_payload_size 0 -f mpegts \ 'srt://[::1]:10080?streamid=#!::r=live/livestream,m=publish' ``` Play SRT stream by ffplay via IPv6: ```bash ffplay 'srt://[::1]:10080?streamid=#!::r=live/livestream,m=request' ``` Play RTSP stream by ffplay via IPv6: ```bash ffplay -rtsp_transport tcp -i 'rtsp://[::1]:8554/live/livestream' ``` --------- Co-authored-by: OSSRS-AI <winlinam@gmail.com>