proxychains-ng/src
rofl0r af5c6f0c6a replace hostent lookup with better performing in-memory copy.
the central dns resolver function proxy_gethostbyname() used
to iterate over the gethostent() db (/etc/hosts) on each dns
request.
since this is not threadsafe, we synchronized access to it
previously using mutexes. the parsing of this file is slow,
and blocking all threads to do it even moreso.
since gethostent_r() is only available on a few platforms,
i decided to read the hostent db once and then use a quick
in-memory lookup on further usage.

+ some further refactoring.
2012-11-08 01:18:19 +01:00
..
allocator_thread.c replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
allocator_thread.h preliminary first fork-safe version 2012-11-07 21:31:11 +01:00
common.c move stringfromipv4 into common.c 2012-11-07 22:00:03 +01:00
common.h move stringfromipv4 into common.c 2012-11-07 22:00:03 +01:00
core.c replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
core.h move stringfromipv4 into common.c 2012-11-07 22:00:03 +01:00
debug.h failed attempt to use shared memory for the ip <-> dns mapping 2012-11-07 16:49:14 +01:00
hash.c replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
hash.h replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
hostentdb.c replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
hostentdb.h replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
ip_type.c preliminary first fork-safe version 2012-11-07 21:31:11 +01:00
ip_type.h preliminary first fork-safe version 2012-11-07 21:31:11 +01:00
libproxychains.c replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
main.c main.c: fixed forgotten initialization for second loop using i 2012-11-04 06:14:33 +01:00
mutex.h preliminary first fork-safe version 2012-11-07 21:31:11 +01:00
proxychains remove gnu autocrap 2011-09-02 20:32:04 +02:00
proxychains.conf add some default localnets (commented) to config 2012-08-16 16:44:51 +02:00
proxyresolv remove gnu autocrap 2011-09-02 20:32:04 +02:00
shm.c preliminary first fork-safe version 2012-11-07 21:31:11 +01:00
shm.h use mutexes also to protect the pipe communication 2012-11-07 21:31:18 +01:00
stringdump.c replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00
stringdump.h replace hostent lookup with better performing in-memory copy. 2012-11-08 01:18:19 +01:00