diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-09-18 14:06:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 14:06:09 +0200 |
commit | 6925890383659b01cad4322d7051d2710bc9b723 (patch) | |
tree | 6093b08a184144a2e9489043d11f9b635ebe33c0 /src/lib/ndpi_main.c | |
parent | 70814002a98ec52deda2ff61ac03613916c3efeb (diff) |
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)
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 17d1cd36c..9f0b946a6 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -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 |