ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.79k stars 5.28k forks source link

Support set the ice-ufrag and ice-pwd for connectivity check. v5.0.191 v6.0.91 #3837

Closed winlinvip closed 8 months ago

winlinvip commented 8 months ago

Checking the HTTPS API or UDP connectivity for WHIP tests can be difficult. For example, if the UDP port isn't available but the API is fine, OBS only says it can't connect to the server. It's hard to see the HTTPS API response or check if the UDP port is available.

This feature lets you set the ice username and password in SRS. You can then send a STUN request using nc and see the response, making it easier to check UDP port connectivity.

  1. Use curl to test the WHIP API, including ice-frag and ice-pwd queries.
  2. Use nc to send a STUN binding request to test UDP connectivity.
  3. If both the API and UDP are working, you should get a STUN response.

Troubleshooting Connection Failures in OBS WHIP, see https://github.com/ossrs/srs/issues/2843


Co-authored-by: john hondaxiao@tencent.com

winlinvip commented 8 months ago

We need to combine 5 and 6.

TRANS_BY_GPT4

winlinvip commented 8 months ago

There's another related improvement. When accessing the WHIP API using HTTP GET, the error messages are not clear enough. You can refer to this link for more details: https://github.com/ossrs/srs/issues/3838

TRANS_BY_GPT4