mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-24 09:45:35 +08:00
feat(connection): add sniffHost support, #246
This commit is contained in:
parent
78360c8314
commit
2b16de18b0
@ -115,6 +115,7 @@ export enum CONNECTIONS_TABLE_ACCESSOR_KEY {
|
|||||||
Type = 'type',
|
Type = 'type',
|
||||||
Process = 'process',
|
Process = 'process',
|
||||||
Host = 'host',
|
Host = 'host',
|
||||||
|
SniffHost = 'sniffHost',
|
||||||
Rule = 'rules',
|
Rule = 'rules',
|
||||||
Chains = 'chains',
|
Chains = 'chains',
|
||||||
DlSpeed = 'dlSpeed',
|
DlSpeed = 'dlSpeed',
|
||||||
@ -139,8 +140,6 @@ export const CONNECTIONS_TABLE_INITIAL_COLUMN_VISIBILITY = {
|
|||||||
[CONNECTIONS_TABLE_ACCESSOR_KEY.ID]: false,
|
[CONNECTIONS_TABLE_ACCESSOR_KEY.ID]: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LOGS_TABLE_MAX_ROWS = 1000
|
|
||||||
|
|
||||||
export enum TAILWINDCSS_SIZE {
|
export enum TAILWINDCSS_SIZE {
|
||||||
XS = 'xs',
|
XS = 'xs',
|
||||||
SM = 'sm',
|
SM = 'sm',
|
||||||
@ -163,6 +162,7 @@ export enum LOG_LEVEL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const LOGS_TABLE_MAX_ROWS_LIST = [200, 300, 500, 800, 1000]
|
export const LOGS_TABLE_MAX_ROWS_LIST = [200, 300, 500, 800, 1000]
|
||||||
|
export const DEFAULT_LOGS_TABLE_MAX_ROWS = LOGS_TABLE_MAX_ROWS_LIST[0]
|
||||||
|
|
||||||
export enum MODAL {
|
export enum MODAL {
|
||||||
PROXIES_SETTINGS = 'proxies-settings',
|
PROXIES_SETTINGS = 'proxies-settings',
|
||||||
|
@ -24,6 +24,7 @@ export default {
|
|||||||
name: 'Name',
|
name: 'Name',
|
||||||
process: 'Process',
|
process: 'Process',
|
||||||
host: 'Host',
|
host: 'Host',
|
||||||
|
sniffHost: 'Sniff Host',
|
||||||
chains: 'Chains',
|
chains: 'Chains',
|
||||||
connectTime: 'Time',
|
connectTime: 'Time',
|
||||||
dlSpeed: 'DL Speed',
|
dlSpeed: 'DL Speed',
|
||||||
|
@ -24,6 +24,7 @@ export default {
|
|||||||
name: '名字',
|
name: '名字',
|
||||||
process: '进程',
|
process: '进程',
|
||||||
host: '主机',
|
host: '主机',
|
||||||
|
sniffHost: '嗅探域名',
|
||||||
chains: '链路',
|
chains: '链路',
|
||||||
connectTime: '连接时间',
|
connectTime: '连接时间',
|
||||||
dlSpeed: '下载速度',
|
dlSpeed: '下载速度',
|
||||||
|
@ -154,6 +154,11 @@ export default () => {
|
|||||||
: original.metadata.destinationIP
|
: original.metadata.destinationIP
|
||||||
}:${original.metadata.destinationPort}`,
|
}:${original.metadata.destinationPort}`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
header: () => t('sniffHost'),
|
||||||
|
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.SniffHost,
|
||||||
|
accessorFn: (original) => original.metadata.sniffHost || '-',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
header: () => t('rules'),
|
header: () => t('rules'),
|
||||||
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Rule,
|
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Rule,
|
||||||
|
@ -3,6 +3,7 @@ import { createSignal } from 'solid-js'
|
|||||||
import {
|
import {
|
||||||
CONNECTIONS_TABLE_INITIAL_COLUMN_ORDER,
|
CONNECTIONS_TABLE_INITIAL_COLUMN_ORDER,
|
||||||
CONNECTIONS_TABLE_INITIAL_COLUMN_VISIBILITY,
|
CONNECTIONS_TABLE_INITIAL_COLUMN_VISIBILITY,
|
||||||
|
DEFAULT_LOGS_TABLE_MAX_ROWS,
|
||||||
LATENCY_QUALITY_MAP_HTTP,
|
LATENCY_QUALITY_MAP_HTTP,
|
||||||
LATENCY_QUALITY_MAP_HTTPS,
|
LATENCY_QUALITY_MAP_HTTPS,
|
||||||
LOG_LEVEL,
|
LOG_LEVEL,
|
||||||
@ -95,10 +96,13 @@ export const [logLevel, setLogLevel] = makePersisted(
|
|||||||
createSignal<LOG_LEVEL>(LOG_LEVEL.Info),
|
createSignal<LOG_LEVEL>(LOG_LEVEL.Info),
|
||||||
{ name: 'logLevel', storage: localStorage },
|
{ name: 'logLevel', storage: localStorage },
|
||||||
)
|
)
|
||||||
export const [logMaxRows, setLogMaxRows] = makePersisted(createSignal(300), {
|
export const [logMaxRows, setLogMaxRows] = makePersisted(
|
||||||
|
createSignal(DEFAULT_LOGS_TABLE_MAX_ROWS),
|
||||||
|
{
|
||||||
name: 'logMaxRows',
|
name: 'logMaxRows',
|
||||||
storage: localStorage,
|
storage: localStorage,
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
|
||||||
export const tableSizeClassName = (size: TAILWINDCSS_SIZE) => {
|
export const tableSizeClassName = (size: TAILWINDCSS_SIZE) => {
|
||||||
let className = 'table-xs'
|
let className = 'table-xs'
|
||||||
|
Loading…
Reference in New Issue
Block a user