tinyproxy/src
rofl0r b6cb68734d implement detection and denial of endless connection loops
it is quite easy to bring down a proxy server by forcing it to make
connections to one of its own ports, because this will result in an endless
loop spawning more and more connections, until all available fds are exhausted.
since there's a potentially infinite number of potential DNS/ip addresses
resolving to the proxy, it is impossible to detect an endless loop by simply
looking at the destination ip address and port.

what *is* possible though is to record the ip/port tuples assigned to outgoing
connections, and then compare them against new incoming connections. if they
match, the sender was the proxy itself and therefore needs to reject that
connection.

fixes #199.
2018-12-31 22:33:54 +00:00
..
.gitignore Removed obsolete ignore rules 2008-06-19 21:33:20 +05:30
acl.c do hostname resolution only when it is absolutely necessary for ACL check 2018-12-31 22:31:40 +00:00
acl.h do hostname resolution only when it is absolutely necessary for ACL check 2018-12-31 22:31:40 +00:00
anonymous.c Move definition of "struct config_s" from main.h to conf.h 2009-12-07 22:33:27 +01:00
anonymous.h add const to the key argument of anonymous_insert(). 2009-08-05 00:15:04 +02:00
base64.c move base64 code into own file 2018-02-06 16:57:02 +00:00
base64.h move base64 code into own file 2018-02-06 16:57:02 +00:00
basicauth.c fix basicauth string comparison 2018-03-29 00:40:18 +01:00
basicauth.h basicauth.[ch]: refactor to make basicauth_string() reusable 2018-02-25 15:13:45 +00:00
buffer.c buffer: fix log message in read_buffer(). 2013-11-23 12:21:59 +01:00
buffer.h Convert tabs to spaces 2008-12-08 13:39:44 +00:00
child.c implement detection and denial of endless connection loops 2018-12-31 22:33:54 +00:00
child.h [BB#63] conf: Allow multiple Listen statements in the config. 2013-11-09 13:34:33 +01:00
common.h configure: do not check for standard POSIX headers 2016-12-21 21:01:37 +00:00
conf.c conf.c: merely warn on encountering recently obsoleted config items 2018-12-18 23:38:00 +00:00
conf.h simplify codebase by using one thread/conn, instead of preforked procs 2018-12-17 01:58:02 +00:00
connect-ports.c Remove unnecessary cast to (void **) 2010-01-25 21:36:18 +05:30
connect-ports.h Add free_connect_ports_list(). 2009-12-07 00:22:52 +01:00
conns.c do hostname resolution only when it is absolutely necessary for ACL check 2018-12-31 22:31:40 +00:00
conns.h do hostname resolution only when it is absolutely necessary for ACL check 2018-12-31 22:31:40 +00:00
daemon.c daemon.c: fix #if NDEBUG --> #ifdef NDEBUG 2009-11-10 17:59:40 +01:00
daemon.h Reformat code to GNU coding style 2008-12-01 15:01:11 +00:00
filter.c Move definition of "struct config_s" from main.h to conf.h 2009-12-07 22:33:27 +01:00
filter.h filter: add function filter_reload() 2009-10-25 23:33:37 +01:00
hashmap.c Move lookup_variable into hashmap.c / hashmap.h 2016-12-27 12:23:51 -05:00
hashmap.h Move lookup_variable into hashmap.c / hashmap.h 2016-12-27 12:23:51 -05:00
heap.c simplify codebase by using one thread/conn, instead of preforked procs 2018-12-17 01:58:02 +00:00
heap.h simplify codebase by using one thread/conn, instead of preforked procs 2018-12-17 01:58:02 +00:00
html-error.c do hostname resolution only when it is absolutely necessary for ACL check 2018-12-31 22:31:40 +00:00
html-error.h make message argument of indicate_http_error() const. 2009-08-07 08:48:51 +02:00
http-message.c Indent code to Tinyproxy coding style 2009-09-15 01:11:25 +05:30
http-message.h http_message_add_headers: make argument num_headers unsigned 2009-08-07 09:24:32 +02:00
log.c log.c: protect logging facility with a mutex 2018-12-18 23:49:01 +00:00
log.h make send_stored_logs static 2018-02-25 18:35:34 +00:00
loop.c implement detection and denial of endless connection loops 2018-12-31 22:33:54 +00:00
loop.h implement detection and denial of endless connection loops 2018-12-31 22:33:54 +00:00
main.c simplify codebase by using one thread/conn, instead of preforked procs 2018-12-17 01:58:02 +00:00
main.h main: remove global bool processed_config_file. 2009-12-23 00:27:32 +01:00
Makefile.am implement detection and denial of endless connection loops 2018-12-31 22:33:54 +00:00
network.c safe_write/read: take void* buffer for generic use 2017-12-04 11:33:01 +00:00
network.h safe_write/read: take void* buffer for generic use 2017-12-04 11:33:01 +00:00
reqs.c implement detection and denial of endless connection loops 2018-12-31 22:33:54 +00:00
reqs.h do hostname resolution only when it is absolutely necessary for ACL check 2018-12-31 22:31:40 +00:00
reverse-proxy.c Continue with forward proxy if ReverseOnly is not true and no mapping available (#35) 2016-09-10 19:22:45 +02:00
reverse-proxy.h Add free_reversepath_list(). 2009-12-07 00:22:46 +01:00
sblist.c simplify codebase by using one thread/conn, instead of preforked procs 2018-12-17 01:58:02 +00:00
sblist.h simplify codebase by using one thread/conn, instead of preforked procs 2018-12-17 01:58:02 +00:00
sock.c implement detection and denial of endless connection loops 2018-12-31 22:33:54 +00:00
sock.h do hostname resolution only when it is absolutely necessary for ACL check 2018-12-31 22:31:40 +00:00
stats.c simplify codebase by using one thread/conn, instead of preforked procs 2018-12-17 01:58:02 +00:00
stats.h Indent code to Tinyproxy coding style 2009-09-15 01:11:25 +05:30
text.c Indent code to Tinyproxy coding style 2009-09-15 01:11:25 +05:30
text.h Reformat code to GNU coding style 2008-12-01 15:01:11 +00:00
transparent-proxy.c fix possible memory leak 2018-02-25 14:56:50 +00:00
transparent-proxy.h [BB#95] Fix FilterURLs with transparent proxy support. 2010-12-01 22:25:44 +01:00
upstream.c upstream: Fix case of empty string domain. 2018-03-23 01:45:10 +01:00
upstream.h rename members of proxy_type enum to have a common prefix 2018-02-25 23:52:23 +00:00
utils.c Use correct format string for POSIX pid_t in pidfile_create() 2009-09-27 08:09:24 +05:30
utils.h Convert tabs to spaces 2008-12-08 13:39:44 +00:00
vector.c Make position into an enum 2009-11-17 01:52:23 +05:30
vector.h Indent code to Tinyproxy coding style 2009-09-15 01:11:25 +05:30