From 65673edcb4a2a9c1179c4d196d18b9f05d8bbd30 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 2 Sep 2022 22:39:19 +0800 Subject: [PATCH] TCP: Add config for WebRTC over TCP. --- trunk/conf/full.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 56afd5c27cc..e8ada55b28b 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -302,6 +302,17 @@ rtc_server { # The udp listen port, we will reuse it for connections. # default: 8000 listen 8000; + # For WebRTC over TCP directly, not TURN, see https://github.com/ossrs/srs/issues/2852 + # Some network does not support UDP, or not very well, so we use TCP like HTTP/80 port for firewall traversing. + tcp { + # Whether enable WebRTC over TCP. + # Default: off + enabled off; + # The TCP listen port for WebRTC. Highly recommend is some normally used ports, such as TCP/80, TCP/443, + # TCP/8000, TCP/8080 etc. However SRS default to TCP/8000 corresponding to UDP/8000. + # Default: 8000 + listen 8000; + } # The exposed candidate IPs, response in SDP candidate line. It can be: # * Retrieve server IP automatically, from all network interfaces. # $CANDIDATE Read the IP from ENV variable, use * if not set. @@ -315,6 +326,11 @@ rtc_server { # Note that browser might fail if no CANDIDATE specified. # Default: on use_auto_detect_network_ip on; + # The protocol for candidate to use, it can be: + # udp Generate UDP candidates. Note that UDP server is always enabled for WebRTC. + # tcp Generate TCP candidates. Fail if rtc_server.tcp(WebRTC over TCP) is disabled. + # all Generate UDP+TCP candidates. Ignore if rtc_server.tcp(WebRTC over TCP) is disabled. + protocol udp; # The IP family filter for auto discover candidate, it can be: # ipv4 Filter IP v4 candidates. # ipv6 Filter IP v6 candidates.