Add support for (un-encrypted) HTTP/2 (#2087)

Plaintext HTTP/2 is quite rare on the general "internet" but it is
used in some private networks (example: 5G core network)
This commit is contained in:
Ivan Nardi
2023-09-18 14:06:09 +02:00
committed by GitHub
parent 70814002a9
commit 6925890383
97 changed files with 205 additions and 91 deletions
+7
View File
@@ -2146,6 +2146,10 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
"OperaVPN", NDPI_PROTOCOL_CATEGORY_VPN,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_HTTP2,
"HTTP/2", NDPI_PROTOCOL_CATEGORY_WEB,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_main.c"
@@ -5209,6 +5213,9 @@ static int ndpi_callback_init(struct ndpi_detection_module_struct *ndpi_str) {
/* Service Location Protocol */
init_slp_dissector(ndpi_str, &a);
/* HTTP/2 */
init_http2_dissector(ndpi_str, &a);
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_main_init.c"
#endif