Commit Graph

3 Commits (master)

Author SHA1 Message Date
Soner Tari 3003d237c7 Reflect the license change of aho corasick library to LGPL
Laurent Farhi, @farhiongit, the developer of the Aho Corasick library
has changed the license of the library to the LGPL. Thanks Laurent.
3 years ago
Soner Tari 017f0f8631 Improve and clean up code and documentation 3 years ago
Soner Tari 9d2e523cd0 Use Aho-Corasick machines for substring matching
Now, the filter uses B-trees for exact string matching and Aho-Corasick
machines for substring matching. B-trees and AC machines are exported to
linked lists for debug logging only.

Also,
- Separate all_sites and all_ports filters from substring filters. They
are not related with substring filters actually, and ACM keywords cannot
be empty strings anyway. So now they should be handled separately too.
- Improve debug logging of filtering rules.
- Update unit tests accordingly, and improve.
- Fix pxyconn_filter(), keep searching for a match in substring filters
if exact match does not have a matching site rule.
- Increase common names max len and tokens. weather.gov has 73 tokens.
- Rename keyword to desc.
- Update documentation.
- Clean up.
3 years ago