mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 08:14:07 +00:00
fix: parse_ipnet enabled for local-fake-dns (#1558)
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ pub fn parse_server_url(v: &str) -> Result<ServerConfig, String> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "local-tun")]
|
||||
#[cfg(any(feature = "local-tun", feature = "local-fake-dns"))]
|
||||
pub fn parse_ipnet(v: &str) -> Result<IpNet, String> {
|
||||
match v.parse::<IpNet>() {
|
||||
Err(..) => Err("should be a CIDR address like 10.1.2.3/24".to_owned()),
|
||||
|
||||
Reference in New Issue
Block a user