refine TunToProxy struct

This commit is contained in:
ssrlive 2023-03-24 09:27:31 +08:00
parent 7dec7f59f1
commit ad388f897a
5 changed files with 41 additions and 40 deletions

View file

@ -15,6 +15,22 @@ impl From<std::io::Error> for Error {
}
}
impl From<std::net::AddrParseError> for Error {
fn from(err: std::net::AddrParseError) -> Self {
Self {
message: err.to_string(),
}
}
}
impl From<smoltcp::iface::RouteTableFull> for Error {
fn from(err: smoltcp::iface::RouteTableFull) -> Self {
Self {
message: format!("{err:?}"),
}
}
}
impl From<&str> for Error {
fn from(err: &str) -> Self {
Self {