Support custom STUN servers configuration (#1212)

* Support custom STUN servers

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
fanyang
2025-08-13 10:35:59 +08:00
committed by GitHub
parent a511abb613
commit 35ff9b82fc
11 changed files with 93 additions and 45 deletions
+2 -4
View File
@@ -35,7 +35,7 @@ fn format_win_error(error: u32) -> String {
null_mut(),
error,
0,
buffer.as_mut_ptr() as *mut u16,
buffer.as_mut_ptr(),
size,
null_mut(),
);
@@ -43,9 +43,7 @@ fn format_win_error(error: u32) -> String {
let str_end = buffer.iter().position(|&b| b == 0).unwrap_or(buffer.len());
format!(
"{} (code: {})",
String::from_utf16_lossy(&buffer[..str_end])
.trim()
.to_string(),
String::from_utf16_lossy(&buffer[..str_end]).trim(),
error
)
}