Skip to content

Commit

Permalink
fix: search for quic
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephyruso committed Jan 8, 2025
1 parent aca0a70 commit 5ca4c50
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 1 addition & 7 deletions src/helper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down
7 changes: 7 additions & 0 deletions src/store/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export type ConnectionRawMessage = {
destinationPort: string
dnsMode: string
host: string
sniffHost: string
processPath: string
process: string
sourceIP: string
Expand Down

0 comments on commit 5ca4c50

Please sign in to comment.