mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-21 00:20:53 +00:00
Use nix crate instead of interacting with libc directly, drop privileges
This commit is contained in:
parent
3dc7fde5e9
commit
15703a4823
6 changed files with 232 additions and 127 deletions
|
@ -35,6 +35,12 @@ pub enum Error {
|
|||
|
||||
#[error("&String {0}")]
|
||||
RefString(String),
|
||||
|
||||
#[error("nix::errno::Errno {0:?}")]
|
||||
OSError(#[from] nix::errno::Errno),
|
||||
|
||||
#[error("std::num::ParseIntError {0:?}")]
|
||||
IntParseError(#[from] std::num::ParseIntError),
|
||||
}
|
||||
|
||||
impl From<&str> for Error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue