Skip to content

Commit 0fc6da6

Browse files
authored
Merge pull request #17 from jilliss/dev
add new features
2 parents 61062a0 + 2590503 commit 0fc6da6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

frontend/src/utils/helper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ export const addToRuleSet = async (
462462
rules[0].process_path = [
463463
...new Set((rules[0].process_path || []).concat(payload.process_path)),
464464
]
465+
} else if (payload.domain_suffix) {
466+
rules[0].domain_suffix = [
467+
...new Set((rules[0].domain_suffix || []).concat(payload.domain_suffix)),
468+
]
465469
}
466470
})
467471
await Writefile(path, JSON.stringify({ version: 1, rules }, null, 2))

frontend/src/views/HomeView/components/ConnectionsController.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ const menu: Menu[] = [
184184
value: { domain: record.metadata.host } as any,
185185
description: record.metadata.host,
186186
})
187+
const domain_suffix = '.' + record.metadata.host.split('.').slice(1).join('.')
188+
options.push({
189+
label: t('kernel.rules.type.domain_suffix'),
190+
value: {
191+
domain_suffix: domain_suffix,
192+
} as any,
193+
description: domain_suffix,
194+
})
187195
}
188196
if (record.metadata.destinationIP) {
189197
options.push({

0 commit comments

Comments
 (0)