From 63316ee23ea94490fcb56bfaabb7a5634b958fbe Mon Sep 17 00:00:00 2001 From: lubeilin <1791778603@qq.com> Date: Sun, 3 Mar 2024 19:23:43 +0800 Subject: [PATCH] =?UTF-8?q?[mio]=20=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt-cli/src/command/mod.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/vnt-cli/src/command/mod.rs b/vnt-cli/src/command/mod.rs index 230e50c..cb78f55 100644 --- a/vnt-cli/src/command/mod.rs +++ b/vnt-cli/src/command/mod.rs @@ -1,8 +1,9 @@ -use crate::command::entity::{DeviceItem, Info, RouteItem}; -use crate::console_out; use std::io; use vnt::core::Vnt; +use crate::command::entity::{DeviceItem, Info, RouteItem}; +use crate::console_out; + pub mod client; pub mod entity; pub mod server; @@ -61,7 +62,11 @@ pub fn command_route(vnt: &Vnt) -> Vec { } else { route.rt.to_string() }; - let interface = route.addr.to_string(); + let interface = if route.is_tcp { + format!("tcp@{}", route.addr) + } else { + route.addr.to_string() + }; let item = RouteItem { destination: destination.to_string(), next_hop,