Files
srs/trunk/conf/console.ipv46.conf
Winlin 35e2808f0c Support IPv6 for all protocols: RTMP, HTTP/HTTPS, WebRTC, SRT, RTSP. v7.0.67 (#4457)
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>
2025-08-30 08:52:21 -04:00

84 lines
1.6 KiB
Plaintext

# no-daemon and write log to console config for srs.
# @see full.conf for detail config.
max_connections 1000;
daemon off;
srs_log_tank console;
# RTMP server configuration
rtmp {
listen 1935 [::]:1935;
}
rtmps {
enabled on;
listen 1443 [::]:1443;
}
http_api {
enabled on;
listen 1985 [::]:1985;
https {
enabled on;
listen 1990 [::]:1990;
}
}
http_server {
enabled on;
listen 8080 [::]:8080;
https {
enabled on;
listen 8088 [::]:8088;
}
}
rtc_server {
enabled on;
# @see https://ossrs.io/lts/en-us/docs/v7/doc/webrtc#config-candidate
candidate $CANDIDATE;
use_auto_detect_network_ip on;
#ip_family ipv4;
#ip_family ipv6;
ip_family all;
api_as_candidates off;
#protocol udp;
#protocol tcp;
protocol all;
# UDP port - IPv4 and IPv6
listen 8000 [::]:8000;
tcp {
enabled on;
listen 8000 [::]:8000;
}
}
srt_server {
enabled on;
listen 10080 [::]:10080;
}
rtsp_server {
enabled on;
listen 8554 [::]:8554;
}
vhost __defaultVhost__ {
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
rtsp {
enabled on;
rtmp_to_rtsp on;
}
rtc {
enabled on;
# @see https://ossrs.io/lts/en-us/docs/v7/doc/webrtc#rtmp-to-rtc
rtmp_to_rtc on;
# @see https://ossrs.io/lts/en-us/docs/v7/doc/webrtc#rtc-to-rtmp
rtc_to_rtmp on;
}
srt {
enabled on;
srt_to_rtmp on;
}
}