From ccfff7b1f681f30a3caa4f919a2883080197e9a3 Mon Sep 17 00:00:00 2001 From: lbl8603 <49143209+lbl8603@users.noreply.github.com> Date: Sat, 15 Jun 2024 20:49:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=82=E6=95=B0=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt/src/port_mapping/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 ))?; }