feat: show version & local node (#318)

*  feat: version

Add display version information, incompatible with lower versions

* 🎈 perf: unknown

Unknown when there is no version number displayed

*  feat: Display local nodes

Display local nodes, incompatible with lower versions
This commit is contained in:
m1m1sha
2024-09-11 15:58:13 +08:00
committed by GitHub
parent 4342be29d7
commit 6ea3adcef8
10 changed files with 110 additions and 16 deletions

View File

@@ -30,14 +30,7 @@ use crate::{
PeerId,
},
rpc::{HandshakeRequest, PeerConnInfo, PeerConnStats, TunnelInfo},
tunnel::packet_def::PacketType,
tunnel::{
filter::{StatsRecorderTunnelFilter, TunnelFilter, TunnelWithFilter},
mpsc::{MpscTunnel, MpscTunnelSender},
packet_def::ZCPacket,
stats::{Throughput, WindowLatency},
Tunnel, TunnelError, ZCPacketStream,
},
tunnel::{filter::{StatsRecorderTunnelFilter, TunnelFilter, TunnelWithFilter}, mpsc::{MpscTunnel, MpscTunnelSender}, packet_def::{PacketType, ZCPacket}, stats::{Throughput, WindowLatency}, Tunnel, TunnelError, ZCPacketStream},
};
use super::{peer_conn_ping::PeerConnPinger, PacketRecvChan};

View File

@@ -771,6 +771,7 @@ impl PeerManager {
.map(|x| x.to_string())
.collect(),
config: self.global_ctx.config.dump(),
version: env!("CARGO_PKG_VERSION").to_string(),
}
}
}

View File

@@ -163,6 +163,7 @@ impl Into<crate::rpc::Route> for RoutePeerInfo {
Some(stun_info)
},
inst_id: self.inst_id.to_string(),
version: env!("CARGO_PKG_VERSION").to_string(),
}
}
}