mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 02:09:06 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user