diff --git a/vnt/src/port_mapping/mod.rs b/vnt/src/port_mapping/mod.rs index 52a71a5..33354cc 100644 --- a/vnt/src/port_mapping/mod.rs +++ b/vnt/src/port_mapping/mod.rs @@ -15,10 +15,10 @@ pub fn convert(vec: Vec) -> anyhow::Result"); + let mut split = udp_mapping.split("-"); let bind_addr = split.next().with_context(|| { format!( - "udp_mapping error {:?},eg: udp:127.0.0.1:80->10.26.0.10:8080", + "udp_mapping error {:?},eg: udp:127.0.0.1:80-10.26.0.10:8080", x ) })?; @@ -26,7 +26,7 @@ pub fn convert(vec: Vec) -> anyhow::Result10.26.0.10:8080", + "udp_mapping error {:?},eg: udp:127.0.0.1:80-10.26.0.10:8080", x ) })?; @@ -34,10 +34,10 @@ pub fn convert(vec: Vec) -> anyhow::Result"); + let mut split = tcp_mapping.split("-"); let bind_addr = split.next().with_context(|| { format!( - "tcp_mapping error {:?},eg: tcp:127.0.0.1:80->10.26.0.10:8080", + "tcp_mapping error {:?},eg: tcp:127.0.0.1:80-10.26.0.10:8080", x ) })?; @@ -45,7 +45,7 @@ pub fn convert(vec: Vec) -> anyhow::Result10.26.0.10:8080", + "tcp_mapping error {:?},eg: tcp:127.0.0.1:80-10.26.0.10:8080", x ) })?; @@ -53,7 +53,7 @@ pub fn convert(vec: Vec) -> anyhow::Result10.26.0.10:8080", + "port_mapping error {:?},eg: tcp:127.0.0.1:80-10.26.0.10:8080", x ))?; }