Soner Tari
3147723774
Add attribs, enclose debug params between debug macros, and improve documentation
6 years ago
Soner Tari
dcaaa49f90
Improve documentation and use better names
6 years ago
Soner Tari
79ad5e86cc
Fix expired conn handling, signal 6 crash: Do not lock conn thr mutex twice while freeing expired conns
...
Fix passthrough mode: Do not SSL_free() srvdst ssl anymore and do not add conn to thr conns list twice
6 years ago
Soner Tari
844e68116a
Move userauth from thrmgr thread to conn handling threads, and do not enable r/w callbacks until userauth succeeds
...
Lock conn thread instead of thrmgr thread while adding conns (giant thrmgr lock versus conn thread level locks), so add conn thread mutex and remove thrmgr mutex
Offload thrmgr thread by moving many conn related setup to conn handling threads
Fix signal 6 crash caused by calling pxy_thrmgr_timer_cb() while failed conn is being freed, so use conn thread mutexes and defer adding conn to thr conn list until conn setup succeeds
Other fixes, improvements, and clean-up
6 years ago
Soner Tari
7b11eb15fa
Update copyright year to 2019
6 years ago
Soner Tari
4f4b41d5ad
Add user and proto validation info to connection logs
6 years ago
Soner Tari
1f451aa04d
Change user db table name to users, change mac column name to ether
...
Clean up
6 years ago
Soner Tari
cde3fbca3f
Redirect user to login page and redirect again to orig target after successful authentication, currently supported only on OpenBSD
...
Get ethernet address and compare with the one in userdb, on each conn setup
Create user_auth options
Rename and clean-up
6 years ago
Soner Tari
fb25c45c66
Clean-up
6 years ago
Soner Tari
304207e9e9
Add initial user database support using sqlite3
6 years ago
Soner Tari
3f148cf3b9
Move thrmgr->conn_count inc for conn id back to conn acceptcb, because acceptcb runs on thrmgr thread which is single threaded, so there is no multithreading issues there
6 years ago
Soner Tari
360b951ade
Prevent possible multithreading issues, which would not cause crashes but incorrect conn ids and memory leaks due to broken thread conn linked lists
6 years ago
Soner Tari
12ecc96648
Assume co-ownership of refactored and new pxy and proto source files by adding copyright line below the original copyright line
6 years ago
Soner Tari
5351e78740
Combine term and enomem handling code and improve
6 years ago
Soner Tari
c085cafe0f
Rename srv_dst to srvdst
...
Clean up
6 years ago
Soner Tari
a314be6e94
Add conn context and is_child fields to proxy context struct to get rid of extra function params and to simplify conditionals
...
Remove redundant parent/conn pointer vars
Use conn instead of parent amap
6 years ago
Soner Tari
6f023e5990
Avoid comparison between signed and unsigned integer, reported by @janusloo on Linux DietPi 4.14.22-v7+ #1096 SMP Mon Feb 26 19:14:22 GMT 2018 armv7l GNU/Linux, I don't see such warnings on 64-bit OpenBSD or Linux though, even with -Wsign-compare
7 years ago
Soner Tari
0fee063e0c
Use %zu for size_t, and avoid comparison between signed and unsigned integer, reported by @janusloo
7 years ago
Soner Tari
f6a63c33b1
Fix time_t portability, see https://www.openbsd.org/papers/eurobsdcon_2013_time_t/mgp00029.html
7 years ago
Soner Tari
9d435e180c
Update with SSLsplit 0.5.2 and develop branch changes as of 270218
7 years ago
Soner Tari
4c8831bd90
Update with SSLsplit 0.5.1 changes, fix LibreSSL version issues
...
Add VerifyPeer and AllowWrongHost options
7 years ago
Soner Tari
3ae89131dc
Use different syslog facilities for error, conn, and stats logs, so they can be filtered into separate log files in syslog.conf
7 years ago
Soner Tari
b064ffa668
Use llu int as unique conn id, much simpler than uuid
7 years ago
Soner Tari
137f017cb5
Fix EXPIRED message bug, other fixes and improvements
7 years ago
Soner Tari
a1c5d05143
Add support for log priority to error logs, so syslogd prints the correct prio for error logs now
7 years ago
Soner Tari
9ec58f821b
Changes needed while adding SSL proxy support to WUI
...
Separate mail/mails to pop3/pop3s/smtp/smpts for statistics
Write connect logs to syslog too, for statistics
Fix log lines for statistics, remove fds from err logs
7 years ago
Soner Tari
7748e3ec1b
Add conf file support, with -f command line option, supports a subset of all possible options
7 years ago
Soner Tari
1a6eab50a5
Tidy and clean logs up
...
Add DEBUG_PROXY directive around all log_dbg_level_printf() and related lines
Log stats to syslog, similar to error logs, so that it is simpler to rotate and parse
-O w/o -g is failing bufferevent_socket_connect for parent dst, so either enable -O w/ -g, or disable -O w/o -g (-O2 is failing too)
Refactoring
7 years ago
Soner Tari
9e637dd2cc
Clean-up
7 years ago
Soner Tari
5a136b7ce7
Add extra stats
...
Rearrange, clean-up
7 years ago
Soner Tari
2411f79582
Add plain or ssl info to SSLproxy specific header line
...
Fix child eof bug
Flickr keeps redirecting to https with 301 unless we remove the Via line of squid, so apparently flickr assumes the existence of Via header field or squid keyword a sign of plain http, even if we are using https
Also do not send the loopback address to the Internet
Other fixes
7 years ago
Soner Tari
67ddee1585
Import sslsplit-devel changes
...
Add stats logs, initial
Add SSLproxy_SrcAddr header field
Clean-up
7 years ago
Soner Tari
378c8c03ef
Fix/improve logging, clean-up
7 years ago
Soner Tari
1b9a192947
Remove recursion while freeing children, parent frees children in a loop now
...
Improve, simplify, clean-up
7 years ago
Soner Tari
ae35623c15
Remove meta ctx completely
...
Fix issues
7 years ago
Soner Tari
09e1c858b9
Refactoring to remove mctx
7 years ago
Soner Tari
133584361f
Rename and clean-up
7 years ago
Soner Tari
496a4f090d
Refactoring: Simplify, reduce, rearrange, rename, and clean-up
...
Get rid of now unnecessary child info struct and functions
7 years ago
Soner Tari
d7094d7138
Refactoring: Simplify, reduce, rearrange, rename, and clean-up
...
Got rid of now unnecessary pxy_conn_is_ready_to_free*() functions
Got rid of now unnecessary duplicate child and parent free functions: pxy_*_conn_free()
Fix error handling
7 years ago
Soner Tari
1a446cd243
Refactoring: Create child ctx
...
Rearrange, clean-up
7 years ago
Soner Tari
fc60db0e74
Disable the workaround for dst connection issues, NULL r/w cbs
...
Reduce the conn timeout to 30s again
7 years ago
Soner Tari
85875be00f
Sometimes dst write cb fires but not event cb, especially if the listener cb is not finished yet, so the conn stalls. This is a workaround for this error condition, nothing else seems to work.
...
Clean-up
7 years ago
Soner Tari
590a693998
Rearrange and clean-up
7 years ago
Soner Tari
e8332f11cf
Make conn termination more similar to orig sslsplit code
...
Free child info struct of a deleted child
Rename, rearrange, and clean-up
7 years ago
Soner Tari
d6e1ed2cef
Fix a potential issue which could forward a packet without any SSL proxy address
...
Rename, rearrange, and clean-up
7 years ago
Soner Tari
e3266cc811
Fix closing fd2 when uninit, i.e. fd2=0, which was freeing stdin
...
Clean-up and improvements
7 years ago
Soner Tari
8ad3b5db25
Defer all e2 setup until after parent is connected
...
Clean-up and improvements
7 years ago
Soner Tari
4d88906d24
Clean up and improve
7 years ago
Soner Tari
4f6b207e57
Improve conn termination: Close children asap if there is no parent, close parent asap if there is no child
7 years ago
Soner Tari
ad1f95e465
Remove conn mutexes: Use thrmgr mutex during attach/detatch only, do eveything in the same thread, do not touch the other threads
...
Flex, fix, and improve conn termination: Make it more similar to orig sslsplit code
Fix issues, and clean-up
7 years ago