节点信息组件添加隧道协议字段 (#931)

This commit is contained in:
Mg Pig
2025-06-04 09:22:58 +08:00
committed by GitHub
parent 4608bca998
commit e592e9f29a
3 changed files with 8 additions and 1 deletions

View File

@@ -106,6 +106,10 @@ function ipFormat(info: PeerRoutePair) {
return ip ? `${IPv4.fromNumber(ip.address.addr)}/${ip.network_length}` : ''
}
function tunnelProto(info: PeerRoutePair) {
return [...new Set(info.peer?.conns.map(c => c.tunnel?.tunnel_type))].join(',')
}
const myNodeInfo = computed(() => {
if (!props.curNetworkInst)
return {} as NodeInfo
@@ -408,6 +412,7 @@ function showEventLogs() {
</template>
</Column>
<Column :field="routeCost" :header="t('route_cost')" />
<Column :field="tunnelProto" :header="t('tunnel_proto')" />
<Column :field="latencyMs" :header="t('latency')" />
<Column :field="txBytes" :header="t('upload_bytes')" />
<Column :field="rxBytes" :header="t('download_bytes')" />

View File

@@ -64,6 +64,7 @@ event_log: 事件日志
peer_info: 节点信息
hostname: 主机名
route_cost: 路由
tunnel_proto: 协议
latency: 延迟
upload_bytes: 上传
download_bytes: 下载

View File

@@ -62,6 +62,7 @@ show_event_log: Show Event Log
event_log: Event Log
peer_info: Peer Info
route_cost: Route Cost
tunnel_proto: Protocol
hostname: Hostname
latency: Latency
upload_bytes: Upload