diff options
author | Vladimir Gavrilov <105977161+0xA50C1A1@users.noreply.github.com> | 2024-07-16 13:01:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-16 12:01:28 +0200 |
commit | c3fff5264697bb9d107ba2f1300905753ff2f4b7 (patch) | |
tree | 83f4e569a56e6ecc87ddc3f59a2541bbf0ca9743 /src/lib/protocols/http.c | |
parent | 996cddbd184d98f006ac7320a1afd1db373036cd (diff) |
Add HLS support (#2502)
Diffstat (limited to 'src/lib/protocols/http.c')
-rw-r--r-- | src/lib/protocols/http.c | 9 |
1 files changed, 9 insertions, 0 deletions
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)) { |