paullouisageneau / libdatachannel

C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
https://libdatachannel.org/
Mozilla Public License 2.0
1.8k stars 362 forks source link

Question: What care must be taken when using this webrtc stack in a docker container? #931

Open themightyoarfish opened 1 year ago

themightyoarfish commented 1 year ago

I have an application which works fine when everything runs locally, or even when the server is remote and the client (browser) local. It's based on the SFU example and forwards rtp data to whatever receivers (browsers) are connected.

Locally, when the client connects, it gets the "server"'s offer and the setup dutifully proceeds

Server got peer SDP: {"id":"127.0.0.1-1dc53f58-9d3d-40e2-a2cb-ba82097e5538","sdp":{"type":"answer","sdp":"v=0\r\no=mozilla...THIS_IS_SDPARTA-99.0 6532382530334643839 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=sendrecv\r\na=fingerprint:sha-256 C0:8C:1A:99:9B:7D:0E:17:C8:76:0C:74:88:FF:0D:AF:99:DF:38:2B:9A:84:5B:7E:C0:98:92:33:EC:A3:EB:FA\r\na=group:BUNDLE video\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 0.0.0.0\r\na=recvonly\r\na=fmtp:96 max-fs=12288;max-fr=60\r\na=ice-pwd:a35578e2b114f46e389f147afd2b80c3\r\na=ice-ufrag:d4d97dad\r\na=mid:video\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-mux\r\na=rtpmap:96 VP9/90000\r\na=setup:active\r\na=ssrc:3530259587 cname:{d50322e0-ec5a-4339-adc2-281cd2b9da0f}\r\n"},"method":"answer"}
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:1145: STUN message integrity check succeeded
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2159: Obtained a new remote reflexive candidate, priority=1853817087
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2181: Adding new candidate pair, priority=7962083765675622399
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2374: Updating ordered candidate pairs
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2211: Registering STUN entry 0 for candidate pair checking
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2229: Candidate pair has priority
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1177: STUN message is a request or indication, looking for remote address
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2462: STUN entry 0 pair matching incoming address
2023-07-18 18:39:24.489 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1180: Found STUN entry matching remote address
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1236: Received STUN Binding request
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1475: Sending STUN Binding response
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:103: Writing STUN message, class=0x100, method=0x1
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:127: Writing XOR mapped address
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:440: Writing IPv4 address
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x20, length=8
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8022, length=8
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8, length=20
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8028, length=4
2023-07-18 18:39:24.490 VERB  [1981964] [rtc::PeerConnection::setRemoteDescription@152] Setting remote description: v=0
o=mozilla...THIS_IS_SDPARTA-99.0 6532382530334643839 0 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE video
a=group:LS video
a=msid-semantic:WMS *
a=setup:active
a=ice-ufrag:d4d97dad
a=ice-pwd:a35578e2b114f46e389f147afd2b80c3
a=ice-options:trickle
a=fingerprint:sha-256 C0:8C:1A:99:9B:7D:0E:17:C8:76:0C:74:88:FF:0D:AF:99:DF:38:2B:9A:84:5B:7E:C0:98:92:33:EC:A3:EB:FA
a=sendrecv
a=group:BUNDLE video
a=msid-semantic:WMS *
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=mid:video
a=recvonly
a=ssrc:3530259587 cname:{d50322e0-ec5a-4339-adc2-281cd2b9da0f}
a=rtcp-mux
a=rtpmap:96 VP9/90000
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 goog-remb
a=fmtp:96 max-fs=12288;max-fr=60

2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:413: Sending datagram, size=76
2023-07-18 18:39:24.490 VERB  [1981964] [rtc::impl::PeerConnection::validateRemoteDescription@814] Remote description looks valid
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:198: No more datagrams to receive
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:736: Bookkeeping...
2023-07-18 18:39:24.490 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:301: Entering poll on 3 sockets for 2702 ms
2023-07-18 18:39:24.490 VERB  [1981964] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:450: Setting remote SDP description: v=0
o=mozilla...THIS_IS_SDPARTA-99.0 6532382530334643839 0 IN IP4 127.0.0.1
s=-
t=0 0
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=mid:data
a=sendrecv
a=msid-semantic:WMS *
a=setup:active
a=ice-ufrag:d4d97dad
a=ice-pwd:a35578e2b114f46e389f147afd2b80c3
a=ice-options:trickle
a=fingerprint:sha-256 C0:8C:1A:99:9B:7D:0E:17:C8:76:0C:74:88:FF:0D:AF:99:DF:38:2B:9A:84:5B:7E:C0:98:92:33:EC:A3:EB:FA
a=sendrecv
a=group:BUNDLE video
a=msid-semantic:WMS *

2023-07-18 18:39:24.491 VERB  [1981964] [rtc::impl::IceTransport::LogCallback@362] juice: ice.c:119: Parsed remote description: ufrag="d4d97dad", pwd="a35578e2b114f46e389f147afd2b80c3", candidates=0
2023-07-18 18:39:24.491 VERB  [1981964] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:494: Unfreezing 1 existing candidate pairs
2023-07-18 18:39:24.491 VERB  [1981964] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:498: Adding 0 candidates from remote description
2023-07-18 18:39:24.491 VERB  [1981964] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:380: Interrupting connections thread
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:303: Leaving poll
2023-07-18 18:39:24.491 INFO  [1981964] [rtc::impl::PeerConnection::changeSignalingState@1196] Changed signaling state to stable
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:736: Bookkeeping...
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:758: STUN entry 0: Sending request to 192.168.94.215:64948 (5 retransmissions left)
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1475: Sending STUN Binding request
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:103: Writing STUN message, class=0x0, method=0x1
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x24, length=4
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x802A, length=8
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8022, length=8
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x6, length=13
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8, length=20
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8028, length=4
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:413: Sending datagram, size=104
2023-07-18 18:39:24.491 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:301: Entering poll on 3 sockets for 499 ms
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:303: Leaving poll
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:672: Received datagram, size=64
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:686: Received STUN datagram from 192.168.94.215:64948
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:528: Reading STUN message, class=0x100, method=0x1
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x20, length=8
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:648: Reading XOR mapped address
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:1036: Reading IPv4 address
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x8, length=20
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:711: Reading message integrity
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x8028, length=4
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:729: Reading fingerprint
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:745: STUN fingerprint check succeeded
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:545: Finished reading STUN attributes
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1154: STUN message is from the remote peer
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:1145: STUN message integrity check succeeded
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2159: Obtained a new remote reflexive candidate, priority=0
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2181: Adding new candidate pair, priority=4244635647
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2374: Updating ordered candidate pairs
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2211: Registering STUN entry 1 for candidate pair checking
2023-07-18 18:39:24.492 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2229: Candidate pair has priority
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2242: Unfreezing the new candidate pair
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1170: STUN message is a response, looking for transaction ID
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2400: STUN entry 0 matching incoming transaction ID
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1328: Received STUN Binding success response from peer
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1345: Response has mapped address
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2125: Gathered reflexive candidate: a=candidate:2 1 UDP 1853882111 192.168.94.215 59003 typ prflx
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1380: Candidate pair check succeeded
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:198: No more datagrams to receive
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:736: Bookkeeping...
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:758: STUN entry 1: Sending request to 192.168.94.215:64948 (5 retransmissions left)
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1475: Sending STUN Binding request
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:103: Writing STUN message, class=0x0, method=0x1
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x24, length=4
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x802A, length=8
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8022, length=8
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x6, length=13
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8, length=20
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8028, length=4
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:413: Sending datagram, size=104
2023-07-18 18:39:24.493 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:896: Cancelling check for lower-priority pair
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:910: STUN entry 1: Cancelled
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:928: New selected pair
2023-07-18 18:39:24.494 INFO  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1053: Changing state to connected
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::PeerConnection::initDtlsTransport@205] Starting DTLS transport
2023-07-18 18:39:24.494 INFO  [1981963] [rtc::impl::PeerConnection::initDtlsTransport@246] This connection requires media support
2023-07-18 18:39:24.494 DEBUG [1981963] [rtc::impl::DtlsTransport::DtlsTransport@713] Initializing DTLS transport (OpenSSL)
2023-07-18 18:39:24.494 DEBUG [1981963] [rtc::impl::DtlsSrtpTransport::DtlsSrtpTransport@57] Initializing DTLS-SRTP transport
2023-07-18 18:39:24.494 DEBUG [1981963] [rtc::impl::DtlsTransport::start@810] Starting DTLS transport
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::Transport::registerIncoming@27] Registering incoming callback
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::DtlsTransport::start@816] DTLS MTU set to 1232
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1010: Requesting pair nomination (controlling)
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:301: Entering poll on 3 sockets for 0 ms
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:303: Leaving poll
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:672: Received datagram, size=64
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:686: Received STUN datagram from 192.168.94.215:64948
2023-07-18 18:39:24.494 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:528: Reading STUN message, class=0x100, method=0x1
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x20, length=8
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:648: Reading XOR mapped address
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:1036: Reading IPv4 address
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x8, length=20
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:711: Reading message integrity
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x8028, length=4
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:729: Reading fingerprint
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:745: STUN fingerprint check succeeded
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:545: Finished reading STUN attributes
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1154: STUN message is from the remote peer
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:1145: STUN message integrity check succeeded
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2140: A remote candidate exists for the remote address
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1170: STUN message is a response, looking for transaction ID
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2400: STUN entry 1 matching incoming transaction ID
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1328: Received STUN Binding success response from peer
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1345: Response has mapped address
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2100: A local candidate exists for the mapped address
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1380: Candidate pair check succeeded
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:198: No more datagrams to receive
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:736: Bookkeeping...
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:758: STUN entry 0: Sending request to 192.168.94.215:64948 (5 retransmissions left)
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1475: Sending STUN Binding request
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:103: Writing STUN message, class=0x0, method=0x1
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x24, length=4
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x25, length=0
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x802A, length=8
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8022, length=8
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x6, length=13
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8, length=20
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:406: Writing STUN attribute type 0x8028, length=4
2023-07-18 18:39:24.495 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:413: Sending datagram, size=108
2023-07-18 18:39:24.497 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:301: Entering poll on 3 sockets for 498 ms
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:303: Leaving poll
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:672: Received datagram, size=64
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:686: Received STUN datagram from 192.168.94.215:64948
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:528: Reading STUN message, class=0x100, method=0x1
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x20, length=8
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:648: Reading XOR mapped address
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:1036: Reading IPv4 address
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x8, length=20
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:711: Reading message integrity
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:622: Reading attribute 0x8028, length=4
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:729: Reading fingerprint
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:745: STUN fingerprint check succeeded
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:545: Finished reading STUN attributes
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1154: STUN message is from the remote peer
2023-07-18 18:39:24.498 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:1145: STUN message integrity check succeeded
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2140: A remote candidate exists for the remote address
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1170: STUN message is a response, looking for transaction ID
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2400: STUN entry 0 matching incoming transaction ID
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1328: Received STUN Binding success response from peer
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1345: Response has mapped address
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2100: A local candidate exists for the mapped address
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1396: Got a nominated pair (controlling)
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:672: Received datagram, size=189
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:485: Not a STUN message: magic number invalid
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:705: Received non-STUN datagram from 192.168.94.215:64948
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2462: STUN entry 0 pair matching incoming address
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:722: Received application datagram
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::RecvCallback@335] Incoming size=189
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::DtlsTransport::incoming@853] Incoming size=189
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:198: No more datagrams to receive
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:736: Bookkeeping...
2023-07-18 18:39:24.499 INFO  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:1053: Changing state to completed
2023-07-18 18:39:24.499 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:301: Entering poll on 3 sockets for 2693 ms
2023-07-18 18:39:24.500 VERB  [1981951] [rtc::impl::IceTransport::send@263] Send size=718
2023-07-18 18:39:24.500 VERB  [1981951] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:406: Setting Differentiated Services field to 0x28
2023-07-18 18:39:24.500 VERB  [1981951] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:413: Sending datagram, size=718
2023-07-18 18:39:24.500 VERB  [1981951] [rtc::impl::DtlsTransport::handleTimeout@963] DTLS retransmit timeout is 999ms
2023-07-18 18:39:24.502 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:303: Leaving poll
2023-07-18 18:39:24.502 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:672: Received datagram, size=627
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: stun.c:485: Not a STUN message: magic number invalid
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:705: Received non-STUN datagram from 192.168.94.215:64948
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:2429: STUN selected entry matching incoming address
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:722: Received application datagram
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::RecvCallback@335] Incoming size=627
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::DtlsTransport::incoming@853] Incoming size=627
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:190: Receiving datagram
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:198: No more datagrams to receive
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: agent.c:736: Bookkeeping...
2023-07-18 18:39:24.503 VERB  [1981963] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:301: Entering poll on 3 sockets for 2690 ms
2023-07-18 18:39:24.503 VERB  [1981950] [rtc::impl::PeerConnection::checkFingerprint@412] Valid fingerprint "C0:8C:1A:99:9B:7D:0E:17:C8:76:0C:74:88:FF:0D:AF:99:DF:38:2B:9A:84:5B:7E:C0:98:92:33:EC:A3:EB:FA"
2023-07-18 18:39:24.503 VERB  [1981950] [rtc::impl::PeerConnection::checkFingerprint@412] Valid fingerprint "C0:8C:1A:99:9B:7D:0E:17:C8:76:0C:74:88:FF:0D:AF:99:DF:38:2B:9A:84:5B:7E:C0:98:92:33:EC:A3:EB:FA"
2023-07-18 18:39:24.504 VERB  [1981950] [rtc::impl::IceTransport::send@263] Send size=75
2023-07-18 18:39:24.504 VERB  [1981950] [rtc::impl::IceTransport::LogCallback@362] juice: conn_poll.c:413: Sending datagram, size=75
2023-07-18 18:39:24.504 INFO  [1981950] [rtc::impl::DtlsTransport::doRecv@914] DTLS handshake finished
2023-07-18 18:39:24.504 INFO  [1981950] [rtc::impl::DtlsSrtpTransport::postHandshake@301] Deriving SRTP keying material (OpenSSL)
2023-07-18 18:39:24.504 DEBUG [1981950] [rtc::impl::DtlsSrtpTransport::postHandshake@306] srtp profile used is: SRTP_AEAD_AES_256_GCM
2023-07-18 18:39:24.504 INFO  [1981950] [rtc::impl::PeerConnection::changeState@1165] Changed state to connected
…

and I can send RTP data successfully.

But when server runs in docker (browser locally, obviously), I do not seem to get a connection established. When the signaling connects a new client, I never seem to enter the connected state on the server:

Server got peer SDP: {"id":"172.21.0.1-c4cf18bd-57ae-44d2-a605-7789428136ea","sdp":{"type":"answer","sdp":"v=0\r\no=- 8988972468065665999 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE vide
o\r\na=msid-semantic: WMS\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:TEhM\r\na=ice-pwd:8zDUNkOwMyr5th1JyreNbCV6\r\na=ice-options:trickle\r\na=fingerprint:sha-2
56 ED:12:40:B7:A5:3E:42:D6:FB:71:16:7B:10:48:A0:99:A5:62:9C:BC:AC:F5:A2:85:A5:56:E7:86:64:7F:D9:CF\r\na=setup:active\r\na=mid:video\r\na=recvonly\r\na=rtcp-mux\r\na=rtpmap:96 VP9/90000\r\na=rtcp-fb:96 goog-remb\r
\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=fmtp:96 profile-id=0\r\n"},"method":"answer"}
stream-server  | 2023-07-18 16:46:05.765 VERB  [28] [rtc::PeerConnection::setRemoteDescription@152] Setting remote description: v=0
stream-server  | o=- 8988972468065665999 0 IN IP4 127.0.0.1
stream-server  | s=-
stream-server  | t=0 0
stream-server  | a=group:BUNDLE video
stream-server  | a=group:LS video
stream-server  | a=msid-semantic:WMS *
stream-server  | a=setup:active
stream-server  | a=ice-ufrag:TEhM
stream-server  | a=ice-pwd:8zDUNkOwMyr5th1JyreNbCV6
stream-server  | a=ice-options:trickle
stream-server  | a=fingerprint:sha-256 ED:12:40:B7:A5:3E:42:D6:FB:71:16:7B:10:48:A0:99:A5:62:9C:BC:AC:F5:A2:85:A5:56:E7:86:64:7F:D9:CF
stream-server  | a=group:BUNDLE video
stream-server  | a=msid-semantic: WMS
stream-server  | m=video 9 UDP/TLS/RTP/SAVPF 96
stream-server  | c=IN IP4 0.0.0.0
stream-server  | a=mid:video
stream-server  | a=recvonly
stream-server  | a=rtcp:9 IN IP4 0.0.0.0
stream-server  | a=rtcp-mux
stream-server  | a=rtpmap:96 VP9/90000
stream-server  | a=rtcp-fb:96 goog-remb
stream-server  | a=rtcp-fb:96 nack
stream-server  | a=rtcp-fb:96 nack pli
stream-server  | a=fmtp:96 profile-id=0
stream-server  |
stream-server  | 2023-07-18 16:46:05.765 VERB  [28] [rtc::impl::PeerConnection::validateRemoteDescription@814] Remote description looks valid
stream-server  | 2023-07-18 16:46:05.765 VERB  [28] [rtc::impl::IceTransport::LogCallback@362] juice: Setting remote SDP description: v=0
stream-server  | o=- 8988972468065665999 0 IN IP4 127.0.0.1
stream-server  | s=-
stream-server  | t=0 0
stream-server  | m=application 9 UDP/DTLS/SCTP webrtc-datachannel
stream-server  | c=IN IP4 0.0.0.0
stream-server  | a=mid:data
stream-server  | a=sendrecv
stream-server  | a=msid-semantic:WMS *
stream-server  | a=setup:active
stream-server  | a=ice-ufrag:TEhM
stream-server  | a=ice-pwd:8zDUNkOwMyr5th1JyreNbCV6
stream-server  | a=ice-options:trickle
stream-server  | a=fingerprint:sha-256 ED:12:40:B7:A5:3E:42:D6:FB:71:16:7B:10:48:A0:99:A5:62:9C:BC:AC:F5:A2:85:A5:56:E7:86:64:7F:D9:CF
stream-server  | a=group:BUNDLE video
stream-server  | a=msid-semantic: WMS
stream-server  |
stream-server  | 2023-07-18 16:46:05.765 VERB  [28] [rtc::impl::IceTransport::LogCallback@362] juice: Parsed remote description: ufrag="TEhM", pwd="8zDUNkOwMyr5th1JyreNbCV6", candidates=0
stream-server  | 2023-07-18 16:46:05.765 INFO  [28] [rtc::impl::IceTransport::LogCallback@362] juice: Connectivity timer started
stream-server  | 2023-07-18 16:46:05.765 VERB  [28] [rtc::impl::IceTransport::LogCallback@362] juice: Unfreezing 0 existing candidate pairs
stream-server  | 2023-07-18 16:46:05.765 VERB  [28] [rtc::impl::IceTransport::LogCallback@362] juice: Adding 0 candidates from remote description
stream-server  | 2023-07-18 16:46:05.765 VERB  [28] [rtc::impl::IceTransport::LogCallback@362] juice: Interrupting connections thread
stream-server  | 2023-07-18 16:46:05.765 INFO  [28] [rtc::impl::PeerConnection::changeSignalingState@1197] Changed signaling state to stable
stream-server  |
stream-server  | 2023-07-18 16:46:05.765 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Leaving poll
stream-server  | 2023-07-18 16:46:05.765 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Bookkeeping...
stream-server  | 2023-07-18 16:46:05.765 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Entering poll on 3 sockets for 631 ms
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Leaving poll
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Bookkeeping...
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Requesting pair nomination (controlling)
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Entering poll on 3 sockets for 0 ms
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Leaving poll
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Bookkeeping...
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: STUN entry 0: Sending request to 172.21.0.2:59001 (6 retransmissions left)
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Sending STUN Binding request
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN message, class=0x0, method=0x1
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN attribute type 0x24, length=4
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN attribute type 0x25, length=0
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN attribute type 0x802A, length=8
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN attribute type 0x8022, length=8
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN attribute type 0x6, length=9
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN attribute type 0x8, length=20
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Writing STUN attribute type 0x8028, length=4
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Setting Differentiated Services field to 0x0
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Sending datagram, size=104
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Entering poll on 3 sockets for 0 ms
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Leaving poll
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Bookkeeping...
stream-server  | 2023-07-18 16:46:06.401 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Receiving datagram
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Received datagram, size=104
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Received STUN datagram from 172.21.0.2:59000
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading STUN message, class=0x0, method=0x1
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading attribute 0x24, length=4
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading priority
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Got priority: 1853882367
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading attribute 0x25, length=0
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Found use candidate flag
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading attribute 0x802A, length=8
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Found ICE controlling attribute
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading attribute 0x8022, length=8
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading software
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Remote agent is "libjuice"
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading attribute 0x6, length=9
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading username
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Got username: YBUE:BV/q
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading attribute 0x8, length=20
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading message integrity
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading attribute 0x8028, length=4
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Reading fingerprint
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: STUN fingerprint check succeeded
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Finished reading STUN attributes
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: STUN message is from the remote peer
stream-server  | 2023-07-18 16:46:06.402 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: STUN message integrity check succeeded
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: A remote candidate exists for the remote address
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: STUN message is a response, looking for transaction ID
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: STUN entry 0 matching incoming transaction ID
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Received STUN Binding success response from peer
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Response has mapped address
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: A local candidate exists for the mapped address
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Got a nominated pair (controlling)
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Receiving datagram
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: No more datagrams to receive
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Bookkeeping...
stream-server  | 2023-07-18 16:46:06.403 INFO  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Changing state to completed
stream-server  | 2023-07-18 16:46:06.403 VERB  [27] [rtc::impl::IceTransport::LogCallback@362] juice: Entering poll on 3 sockets for 4031 ms
…

and eventually, the state changes to failed due to timeout.

So I was wondering what ports would have to be forwarded from inside the container. So far I was mapping these ports

      - "3033:3033"
      - "3478:3478/tcp"
      - "3478:3478/udp"
      - "5349:5349"
      - "59000-59020:59000-59020/udp"

and set

  config.portRangeBegin = 59000;
  config.portRangeEnd = 59020;

though I'm not sure that's needed. Is there anything else I should be doing?

themightyoarfish commented 1 year ago

This is on macos, where docker host networking is not available, I will try this on Linux, but i believe this info would be valuable regardless.

paullouisageneau commented 1 year ago

Docker in the default bridge network mode introduces a NAT between the host address and the container private address. Since you typically run the host itself behind a NAT, if you run a browser on the host, it creates a cascading NAT scenario which may fail depending on the specific setup, and which a STUN server on the public Internet can't help solving as it can't see the host address.

There are multiple approaches to solve this issue:

Strangely, the log excerpt for the failure actually shows an ICE pair nomination, which would correspond to a successful connection.