Commit Graph

18 Commits (v0.9.1)

Author SHA1 Message Date
Soner Tari dc34bc1ccf Add e2e tests for filtering rules
End-to-end tests now require testproxy v0.0.4, which supports the new
Reconnect command for the Pass filtering rule.

Split mode with the -n option also supports filtering rules, so the
Divert rule can enable the divert mode even with the -n option. This is
because the purpose of the -n option is to convert sslproxy into an
sslsplit, and we want to support filtering rules in sslsplit-like
sslproxy too.
3 years ago
Soner Tari 982880ccfe Restructure passsite filter data structure
Now we don't go over all of the passsite rules in a linked list trying
to apply passsite to the sni or common names of a conn. Instead, we now
have user+keyword, keyword, ip, and all lists. For example, if we find
the conn user in the user+keyword list and a passsite in that list
matches, we don't look into other lists.

This change is expected to improve the performance of passsite
processing considerably, because in the earlier implementation we had to
go over all of the passsite rules trying to match passsite.

And this solution uses a correct data structure, even if not the best.
For example, each user or keyword in passsite rules is strdup()'ed only
once.

Note that a better solution could use, say, a hash table for users,
instead of a linked list. But hash tables are not suitable for keywords
or sites, because we search for substring matches with them, not exact
matches.

Also, this fixes passsite rules without any filters defined, i.e. to be
applied to all connections.

Also, now e2e tests error exit if WITHOUT_USERAUTH is enabled. E2e tests
require UserAuth enabled.
3 years ago
Soner Tari 69753b250c Add split mode of operation similar to SSLsplit
The -n command line option enables split mode for all proxyspecs,
effectively making sslproxy behave like sslsplit.
Divert option can be set/unset globally and per-proxyspec.
Add e2e tests for split mode, and update make file for tests
accordingly.
Update documentation accordingly.
Improve code reuse, remove duplicate functions.

This change deserves a release of its own, hence v0.8.4.
3 years ago
Soner Tari fade72ec0d Move main.mk under Mk folder and improve make files 4 years ago
Soner Tari 2f89a27551 Use Testproxy v0.0.3 4 years ago
Soner Tari 1403c4eda1 Fix travis for ssl libs without tls13, add no_tls13 e2e tests 4 years ago
Soner Tari c2e93dbbc0 Remove NO_TLS10 test case
The problem with LibreSSL 2.7.4 was not that it didn't support tls10,
but that MEDIUM and HIGH cipher definitions were different from the
openssl version of testproxy, hence tests were failing due to no shared
ciphers
5 years ago
Soner Tari f1c2e9e881 Detect tls protos using output of sslproxy -V
But this is not going to work, because LibreSSL 2.7.4 says it supports
tls10, but SSL handshake fails if testproxy e2e tests for tls10 are
enabled.
5 years ago
Soner Tari 9ac5a93823 Fix testproxy e2e tests for older versions of openssl and libressl
OpenSSL 0.9.8zh and 1.0.0s do not support TLSv11.
LibreSSL 2.2.7 uses other cipher names too.
LibreSSL 2.7.4 (since 2.3.0) does not support TLSv10.
5 years ago
Soner Tari d4aca98834 Enable debug logs for testproxy 5 years ago
Soner Tari e2fc1086cf Try fix sudo env 5 years ago
Soner Tari 50c1c9477d Try with first travis machine, remove openssl from lp, revert trials 5 years ago
Soner Tari 8a1db3d469 Fix export 5 years ago
Soner Tari b1edd7e049 Export LD_LIBRARY_PATH before running lp 5 years ago
Soner Tari d1374e70bb Set testproxy log level to 4 5 years ago
Soner Tari 2723171e05 Add openssl to lp, fix xnu path, clean up 5 years ago
Soner Tari 155b83c045 Do not export vars to the shell, instead create a main.mk and include it when needed
Otherwise it is almost impossible to stop var redefinitions in
successive builds
5 years ago
Soner Tari cf0b3a38cf Create make file to automate testproxy e2e tests Move lp under testproxy 5 years ago