improved steam detection
This commit is contained in:
@@ -7379,6 +7379,12 @@ static ndpi_network host_protocol_list[] = {
|
|||||||
*/
|
*/
|
||||||
{ 0xC01EFC00 /* 192.30.252.0/22 */, 22, NDPI_SERVICE_GITHUB },
|
{ 0xC01EFC00 /* 192.30.252.0/22 */, 22, NDPI_SERVICE_GITHUB },
|
||||||
|
|
||||||
|
/*
|
||||||
|
Steam
|
||||||
|
162.254.192.0/21
|
||||||
|
*/
|
||||||
|
{ 0xA2FEC000 /* 162.254.192.0/21 */, 21, NDPI_PROTOCOL_STEAM },
|
||||||
|
|
||||||
{ 0x0, 0, 0 }
|
{ 0x0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7579,6 +7585,8 @@ ndpi_protocol_match host_match[] = {
|
|||||||
{ ".1kxun.", "1kxun", NDPI_SERVICE_1KXUN, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
{ ".1kxun.", "1kxun", NDPI_SERVICE_1KXUN, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||||
{ "tcad.wedolook.com", "1kxun", NDPI_SERVICE_1KXUN, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
{ "tcad.wedolook.com", "1kxun", NDPI_SERVICE_1KXUN, NDPI_PROTOCOL_CATEGORY_MEDIA, NDPI_PROTOCOL_FUN },
|
||||||
|
|
||||||
|
{ ".steampowered.com", "Steam", NDPI_PROTOCOL_STEAM, NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_FUN },
|
||||||
|
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -805,8 +805,16 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
|||||||
packet->http_method.ptr = packet->line[0].ptr;
|
packet->http_method.ptr = packet->line[0].ptr;
|
||||||
packet->http_method.len = filename_start - 1;
|
packet->http_method.len = filename_start - 1;
|
||||||
|
|
||||||
/* Check for additional field introduced by Facebook */
|
/* Check for additional field introduced by Steam */
|
||||||
int x = 1;
|
int x = 1;
|
||||||
|
if((memcmp(packet->line[x].ptr, "x-steam-sid", 11)) == 0) {
|
||||||
|
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_STEAM);
|
||||||
|
check_content_type_and_change_protocol(ndpi_struct, flow);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check for additional field introduced by Facebook */
|
||||||
|
x = 1;
|
||||||
while(packet->line[x].len != 0) {
|
while(packet->line[x].len != 0) {
|
||||||
if((memcmp(packet->line[x].ptr, "X-FB-SIM-HNI", 12)) == 0) {
|
if((memcmp(packet->line[x].ptr, "X-FB-SIM-HNI", 12)) == 0) {
|
||||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_SERVICE_FACEBOOK);
|
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_SERVICE_FACEBOOK);
|
||||||
|
|||||||
Reference in New Issue
Block a user