Firefox不会初始化TLS会话

时间:2019-10-07 14:58:06

标签: firefox webrtc sdp

我想要的是:通过WebRTC与浏览器连接。

我所拥有的:在Chrome中有效,但在Firefox(v69)中无效。

我做什么:

发送报价sdp:

v=0
o=- 45635473 45635473 IN IP4 192.168.45.107
s=-
t=0 0
a=sendrecv
a=group:BUNDLE audio
a=msid-semantic:WMS *
m=audio 22790 UDP/TLS/RTP/SAVPF 8
c=IN IP4 192.168.100.249
a=candidate:2222216195 1 udp 2113937151 192.168.100.249 22790 typ host generation 0 network-cost 999
a=sendrecv
a=end-of-candidates
a=fingerprint:sha-256 12:60:3D:50:84:16:E7:CE:48:92:C2:69:FC:6B:7C:7F:5C:BA:38:9F:B4:01:C0:D9:7A:25:46:AA:78:1B:7A:C1
a=ice-options:trickle
a=ice-pwd:dqiAkA7gz+KCbmB8Fvqx/I6K
a=ice-ufrag:5555
a=mid:audio
a=ptime:20
a=rtcp:22790 IN IP4 192.168.100.249
a=rtcp-mux
a=rtpmap:8 PCMA/8000
a=setup:actpass
a=ssrc:305419896 cname:{9f920404-13ea-41d3-a713-dd7d5a2a3f8c}
a=ssrc:305419896 msid:{7c832778-1f71-4a78-ac13-2128307e7505} {105c1d78-bbf9-4ad4-a5fa-13e298818389}

获取答案sdp:

v=0
o=mozilla...THIS_IS_SDPARTA-70.0 4210281848269721021 0 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 57:EF:92:15:61:E1:88:F4:D8:6C:92:C0:83:E1:A6:1D:72:40:94:CC:FC:22:35:D6:A1:DE:90:66:87:2A:3B:36
a=group:BUNDLE audio
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 9 UDP/TLS/RTP/SAVPF 8
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:5982b9957048e05908f949e516627a62
a=ice-ufrag:56d206b1
a=mid:audio
a=msid:{6a68b1cb-a051-4183-be60-f4294b5aff3e} {954d21c7-c148-4083-b14b-e38bf53cebce}
a=rtcp-mux
a=rtpmap:8 PCMA/8000
a=setup:active
a=ssrc:1350429253 cname:{e4ad1fde-1111-4882-8b16-55155c461ba9}

在about:webrtc页面上,我有一些日志(这是其中的片段):

ICE-PEER(PC:1570470352934806 (id=105226698753 url=https://192.168.100.249/):default)/CAND-PAIR(xnNi): setting pair to state SUCCEEDED: xnNi|IP4:192.168.100.249:22790/UDP|IP4:192.168.100.249:22790/UDP(prflx|candidate:2222216195 1 udp 2113937151 192.168.100.249 22790 typ host generation 0 network-cost 999)

ICE-PEER(PC:1570470352934806 (id=105226698753 url=https://192.168.100.249/):default): no FROZEN/WAITING pairs for PC:1570470352934806 (id=105226698753 url=https://192.168.100.249/) transport-id=transport_0 - 56d206b1:5982b9957048e05908f949e516627a62

ICE(PC:1570470352934806 (id=105226698753 url=https://192.168.100.249/)): peer (PC:1570470352934806 (id=105226698753 url=https://192.168.100.249/):default) Trickle grace period is over; marking every component with only failed pairs as failed.

+++++++ END ++++++++

所以,我收到了STUN请求,但之后没有DTLS。

|           Remote candidate          |  ICE State  |  Nominated  |  Selected   |

|    192.168.100.249:22790/udp(host)  |  succeeded  |    false    |    false    |

2 个答案:

答案 0 :(得分:3)

当我最初查看您的ICE表时并没有发现它,但是在您上面的示例中,ICE尚未完成。您的状态为成功,但是NominatedSelected应该为true而不是false。 我的猜测是您的端点是ICE控制器,尚未发送use-candidate属性。因此,Firefox在可以通过选定的连接发送DTLS问候之前,仍会等待您的端点说出要使用的ICE候选对。

答案 1 :(得分:0)

SFU发送报价时,在SDP上添加a=ice-lite行将解决此问题。