Commit Graph

12 Commits (master)

Author SHA1 Message Date
Soner Tari 1408e85513 Close fds only once, thanks to @disaykin 1 year ago
Soner Tari fc7d57469d Fix double free, thanks to @disaykin
Bug found by Svace static analyzer
1 year ago
Soner Tari 521a1cc3a0 Handle return value of gmtime(), thanks to @disaykin 1 year ago
Soner Tari 7f201c59de Fix double free, thanks to @disaykin 1 year ago
Soner Tari 11884271fd Add negation prefix ! to log actions
Now filtering rules can disable log actions too. This is possible thanks
to the newly added precedence field of rules. Log actions of filtering
rules at higher precedence can modify logging now. In other words, more
specific rules can change the log actions of more general rules.
HTTP filtering rules can only disable logging.
3 years ago
Soner Tari 357e6050db Do not init content logging for the connection if its log action is disabled
So now, we don't create any content log file if that log action is
disabled.
Also, improve documentation.
3 years ago
Soner Tari f0c2ca6819 Add Match action and connect|content|pcap|mirror log actions in filtering rules
- Match action is added to be used with log actions only, the other
filter actions can specify log actions too
- Log actions do not configure any loggers. Global loggers for
respective log actions should have been configured for those log actions
to have any effect.
- If no filter rules are defined for a proxyspec, all log actions are
enabled. Otherwise, all log actions are disabled, and filtering rules
should enable them specifically.
- Fix max number of tokens in proxyspec and filter parsers
- Fix issues with rejecting unknown args in filter rule parser
- Do not use filter_rules field of proxyspec after config finished, it
is used for filter configuration and freed afterwards
3 years ago
Soner Tari 1d75bfb17f Fix a possible sync issue between thr load and conn children list on error
Refactor and rename functions, struct fields, and vars
Simplify if conditions and fix/improve logs
Clean up
4 years ago
Soner Tari 03453fc76b Refactor to free the buf asap 4 years ago
Soner Tari 0bfe5584e4 Simplify logs printed by *_main and *_main_va macros
Since the *_main and *_main_va macros always pass 0 as fd, and the other
macros fd > 0, we can simplify the main macros.
4 years ago
Soner Tari 3af16b3228 Improve verbose debug logs using common header fields to better identify connections
Create function macros for fine* debug logs
Fix a few memory leaks when DEBUG_PROXY enabled
Add main.mk to MKFS list
Put a few function params within DEBUG_PROXY directives
Check retval of a snprintf() call
Fix segfault with -w/-W options if no ssl proxyspec specified, also fixed in sslsplit develop: https://github.com/droe/sslsplit/issues/271
Various clean-up
4 years ago
Soner Tari 8eab8d1da8 Restructure source tree, create src and tests folders, move files accordingly
Remove docker
4 years ago