From c3fff5264697bb9d107ba2f1300905753ff2f4b7 Mon Sep 17 00:00:00 2001 From: Vladimir Gavrilov <105977161+0xA50C1A1@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:01:28 +0300 Subject: Add HLS support (#2502) --- src/lib/protocols/http.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib/protocols/http.c') diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index c57ed8441..bf365c46f 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -489,6 +489,15 @@ static void ndpi_http_parse_subprotocol(struct ndpi_detection_module_struct *ndp ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_OCSP, master_protocol, NDPI_CONFIDENCE_DPI); } + /* HTTP Live Streaming */ + if (packet->content_line.len > 28 && + (strncmp((const char *)packet->content_line.ptr, "application/vnd.apple.mpegurl", 29) == 0 || + strncmp((const char *)packet->content_line.ptr, "application/x-mpegURL", 21) == 0 || + strncmp((const char *)packet->content_line.ptr, "application/x-mpegurl", 21) == 0)) { + NDPI_LOG_DBG2(ndpi_struct, "Found HLS\n"); + ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_HLS, master_protocol, NDPI_CONFIDENCE_DPI); + } + if((flow->http.method == NDPI_HTTP_METHOD_RPC_CONNECT) || (flow->http.method == NDPI_HTTP_METHOD_RPC_IN_DATA) || (flow->http.method == NDPI_HTTP_METHOD_RPC_OUT_DATA)) { -- cgit v1.2.3