Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
nexdpi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
sysadmin
nexdpi
Commits
8bac206a
Commit
8bac206a
authored
Apr 24, 2021
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better log unmanaged
parent
60ee64dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
dpi
dpi
+10
-1
No files found.
dpi
View file @
8bac206a
...
...
@@ -31,6 +31,7 @@ templconf = """
"nostart": [],
"noapps": [],
"knownapps": ["DHCP", "DHCPV6", "DNScrypt", "DoH_DoT", "DNS", "Ookla", "ICMP", "ICMPV6", "IGMP", "LLMNR", "MDNS", "DoH_DoT", "Ookla", "WSD"],
"knowstarts": [],
"ipset": "system_triplet",
"timeout":"3600"
},
...
...
@@ -39,6 +40,7 @@ templconf = """
"nostart": [],
"noapps": [],
"knownapps": ["Steam", "Xbox", "Playstation"],
"knowstarts": ["TLS", "HTTP"],
"ipset": "streaming_triplet",
"timeout":"3600"
},
...
...
@@ -47,6 +49,7 @@ templconf = """
"nostart": ["DNS", "ICMP"],
"noapps": [],
"knownapps": [],
"knowstarts": [],
"ipset": "name_ipset",
"timeout":"3600"
}
...
...
@@ -185,6 +188,9 @@ class NexDPI():
cname
=
flow
.
application_category_name
aname
=
flow
.
application_name
sername
=
aname
.
split
(
"."
)[
-
1
:][
0
]
startname
=
False
if
aname
!=
sername
:
startname
=
aname
.
split
(
"."
)[:
-
1
][
0
]
ipv
=
flow
.
ip_version
log
.
debug
(
"RECEIVED: "
+
cname
+
" "
+
aname
+
" "
+
sername
+
"
\n\n
"
+
str
(
flow
))
...
...
@@ -216,7 +222,10 @@ class NexDPI():
sh
(
"ipset add "
+
ipset_list
+
" "
+
triplet
+
" timeout "
+
Cats
[
cname
][
'timeout'
]
+
" --exist > /dev/null 2>&1"
)
log
.
info
(
"ADD: "
+
ipset_list
+
" "
+
triplet
+
" "
+
self
.
fullname
)
if
sername
in
list
(
Cats
[
cname
][
'knownapps'
]):
continue
if
not
start
:
continue
elif
startname
in
list
(
Cats
[
name
][
'knowstarts'
]):
continue
if
self
.
fullname
and
not
self
.
fullname
in
UnknownMatch
:
log
.
warning
(
"UNKNOWN("
+
str
(
managed
)
+
"): "
+
self
.
fullname
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment