support turn relay config, and force_relay option

This commit is contained in:
lc
2025-11-16 04:04:25 +08:00
parent 483cf9d225
commit 0da5d379fc
3 changed files with 113 additions and 13 deletions

View File

@@ -134,7 +134,7 @@ pub async fn connect_tcp<
#[cfg(feature = "webrtc")]
if is_webrtc_endpoint(&target.to_string()) {
return Ok(Stream::WebRTC(
webrtc::WebRTCStream::new(&target.to_string(), ms_timeout).await?,
webrtc::WebRTCStream::new(&target.to_string(), false, ms_timeout).await?,
));
}
let target_str = check_ws(&target.to_string());