From 5ca4c50945e5cf2392563bae2c46508df45a8d31 Mon Sep 17 00:00:00 2001 From: Zephyruso <176294927+Zephyruso@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:12:42 +0800 Subject: [PATCH] fix: search for quic --- src/helper/index.ts | 8 +------- src/store/connections.ts | 7 +++++++ src/types/index.d.ts | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/helper/index.ts b/src/helper/index.ts index d4fe589c..3bbdcf79 100644 --- a/src/helper/index.ts +++ b/src/helper/index.ts @@ -110,13 +110,7 @@ export const getDestinationFromConnection = (connection: Connection) => { } export const getNetworkTypeFromConnection = (connection: Connection) => { - const network = connection.metadata.network.toLowerCase() - - if (connection.metadata.destinationPort === '443' && network === 'udp') { - return `${connection.metadata.type} | quic` - } - - return `${connection.metadata.type} | ${network}` + return `${connection.metadata.type} | ${connection.metadata.network}` } export const getToolTipForParams = ( diff --git a/src/store/connections.ts b/src/store/connections.ts index ee4015a7..204254ec 100644 --- a/src/store/connections.ts +++ b/src/store/connections.ts @@ -46,6 +46,13 @@ export const initConnections = () => { data.connections?.map((connection) => { const preConnection = activeConnections.value.find((c) => c.id === connection.id) + if ( + (connection.metadata.destinationPort === '443' || connection.metadata.sniffHost) && + connection.metadata.network === 'udp' + ) { + connection.metadata.network = 'quic' + } + if (!preConnection) { return { ...connection, diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 5321b159..0c037f74 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -99,6 +99,7 @@ export type ConnectionRawMessage = { destinationPort: string dnsMode: string host: string + sniffHost: string processPath: string process: string sourceIP: string