| Commit message (Collapse) | Author | Age |
| |
|
|\
| |
| | |
QUIC: extract User Agent information
|
| |
| |
| |
| | |
Prepare the code to handle UA information from flows other than HTTP
|
|/
|
|
| |
https://github.com/veggiedefender/browsertunnel
|
|
|
|
| |
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support QUIC payload and header decryption, it is necessary to choose an
external crypto library to handle the low-level crypto stuff. Since we will
use some Wireshark code, it is quite natural to choose the same library used
by Wireshark itself: libgcrypt.
More precisely, we will use libgcrypt and libgpg-error.
Both libraries have LGPL license, so there should be no issue from this point
of view.
These libraries are not required to build nDPI, and their usage is optional:
nDPI will keep working (and compiling) even if they are not available.
However, without them, QUIC sub-classification is next to impossible.
The configure flag "--disable-gcrypt" forces the build system to ignore these
libraries.
libgpg-error is only used for debug to have meaningful error messages and its
usage is trivial.
The same cannot be said for libgcrypt because its initialization is a significant
issue.
The rest of this commit message try explaining how libgcrypt is
initialized.
According to the documentation
https://gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html
https://gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html#Multi_002dThreading
libgcrypt must be initialized before using it, but such initialization should
be performed by the actual application and not by any library.
Forcing the users to proper initialize libgcrypt in their own code seems
unreasonable: most people using nDPI might be complete unaware of any crypto
stuff and update each and every one application linking to nDPI with specific
libgcrypt code should be out of question, anyway.
Fortunately, it seems a workaround exists to initialize libgcrypt in a library
https://lists.gnupg.org/pipermail/gcrypt-devel/2003-August/000458.html
Therefore, we could provide a wrapper to this initialization stuff in a nDPI
function. Unfortunately nDPI API lacks a global init function that must be
called only once, before any other functions. We could add it, but that would
be a major API break.
AFAIK, ndpi_init_detection_module() might be called multiple times, for example
to create multiple independent dpi engines in the same program.
The proposed solution is to (optionally) initialize libgcrypt in
ndpi_init_detection_module() anyway:
* if the actual application doesn't directly use libgcrypt and only calls
ndpi_init_detection_module() once, everything is formally correct and it
should work out of the box [by far the most common user case];
* if the actual application already uses libgcrypt directly, it already
performs the required initialization. In this case the ndpi_prefs.ndpi_dont_init_libgcrypt
flag should be passed to ndpi_init_detection_module() to avoid further
initializations.
The only scenario not supported by this solution is when the application is
unaware of libgcrypt and calls ndpi_init_detection_module() multiple times
concurrently. But this scenario should be uncommon.
A completely different option should be to switch to another crypto library,
with a huge impact on the QUIC dissector code.
Bottom line: crypto is hard, using libgcrypt is complex and the proposed
initialization, even if not perfect, should cover the most frequent user
cases and should work, for the time being.
If anyone has some suggestions...
|
|
|
|
| |
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
| |
|
| |
|
|
|
|
| |
Fix a memory leak and an issue (re)-introduced in configure script
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
add improved boundary check and check malloc return is NULL
|
| | |
|
|/
|
|
|
|
|
|
|
| |
the version string buffer.
* added also GREASE supported tls versions as specified in
https://tools.ietf.org/html/draft-davidben-tls-grease-01#page-4
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|
|
|
| |
Added -b flag in ndpiReader to test bins
|
|\
| |
| | |
Fix/build
|
| |
| |
| |
| | |
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|/ |
|
|
|
|
|
|
|
| |
This leak is clearly happening because of missing/disabled code in "bins"
handling.
This is a trivial workaround useful until such code is completed.
In this way tavis-ci will stop complaining
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|
|
|
| |
bins manipulation
|
|\
| |
| | |
Log
|
| | |
|
| |
| |
| |
| |
| | |
Make it clear that such option is general, not about extcap
functionality
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Create an helper to avoid similar errors in the future
Fixes: 1a62f4c7
|
| | |
|
| |
| |
| |
| | |
Fixes:a58c838c4
|
|/
|
|
| |
They should take idle/expired flows into account, too
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
selftest.
* make ./tests/vagrind_test.sh directory agnostic
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|
|
|
| |
Packet bins are not printed wehn empty
|
|
|
|
| |
Added packet lenght distribution bins
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/* Memory lifecycle */
int ndpi_hll_init(struct ndpi_hll *hll, u_int8_t bits);
void ndpi_hll_destroy(struct ndpi_hll *hll);
/* Add values */
void ndpi_hll_add(struct ndpi_hll *hll, const char *data, size_t data_len);
void ndpi_hll_add_number(struct ndpi_hll *hll, u_int32_t value) ;
/* Get cardinality estimation */
double ndpi_hll_count(struct ndpi_hll *hll);
|
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|