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
+1 -1
View File
@@ -117,7 +117,7 @@ pub fn utf8_or_gbk_to_string(s: &[u8]) -> String {
utf8_str
} else {
// 如果解码失败,则尝试使用GBK解码
if let Ok(gbk_str) = GBK.decode(&s, DecoderTrap::Strict) {
if let Ok(gbk_str) = GBK.decode(s, DecoderTrap::Strict) {
gbk_str
} else {
String::from_utf8_lossy(s).to_string()