mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 10:14:35 +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:
@@ -39,7 +39,7 @@ impl InterfaceControl {
|
||||
if matches!(e.kind(), io::ErrorKind::NotFound) {
|
||||
Ok(()) // 忽略不存在的值
|
||||
} else {
|
||||
Err(e.into())
|
||||
Err(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,10 +106,7 @@ impl InterfaceControl {
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
if !output.status.success() {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"Failed to flush DNS cache",
|
||||
));
|
||||
return Err(io::Error::other("Failed to flush DNS cache"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -122,10 +119,7 @@ impl InterfaceControl {
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
if !output.status.success() {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"Failed to register DNS",
|
||||
));
|
||||
return Err(io::Error::other("Failed to register DNS"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user