diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-07-27 09:05:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 09:05:22 +0200 |
commit | bc91192acadda102169adacfed967f57f395f1bd (patch) | |
tree | cc2fb723b533c8dbfd86dc5b4e659841f1a2ce4e /src/lib/ndpi_main.c | |
parent | 3326fa258ec92e553e39fc8a1bfa3921dc81f15c (diff) |
ProtonVPN: split the ip list (#2060)
Use two separate lists:
* one for the ingress nodes, which triggers a ProtonVPN classification
* one for the egress nodes, which triggers the
`NDPI_ANONYMOUS_SUBSCRIBER` risk
Add a command line option (to `ndpiReader`) to easily test IP/port
matching.
Add another example of custom rule.
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index ac5371dfe..9b955e7a9 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -76,7 +76,8 @@ #include "inc_generated/ndpi_google_cloud_match.c.inc" #include "inc_generated/ndpi_crawlers_match.c.inc" #include "inc_generated/ndpi_icloud_private_relay_match.c.inc" -#include "inc_generated/ndpi_protonvpn_match.c.inc" +#include "inc_generated/ndpi_protonvpn_in_match.c.inc" +#include "inc_generated/ndpi_protonvpn_out_match.c.inc" #include "inc_generated/ndpi_asn_telegram.c.inc" #include "inc_generated/ndpi_asn_apple.c.inc" #include "inc_generated/ndpi_asn_twitter.c.inc" @@ -2923,11 +2924,12 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs if(!(prefs & ndpi_dont_init_risk_ptree)) { if((ndpi_str->ip_risk_ptree = ndpi_patricia_new(32 /* IPv4 */)) != NULL) { - if(!(prefs & ndpi_dont_load_icloud_private_relay_list)) { - ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->ip_risk_ptree, ndpi_anonymous_subscriber_protocol_list); + if(!(prefs & ndpi_dont_load_icloud_private_relay_list)) + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->ip_risk_ptree, ndpi_anonymous_subscriber_icloud_private_relay_protocol_list); + if(!(prefs & ndpi_dont_load_protonvpn_exit_nodes_list)) + ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->ip_risk_ptree, ndpi_anonymous_subscriber_protonvpn_protocol_list); if(!(prefs & ndpi_dont_load_crawlers_list)) ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->ip_risk_ptree, ndpi_http_crawler_bot_protocol_list); - } } } |