Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rofl0r/proxychains-ng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2012-11-08 04:18:19 +0400
committerrofl0r <retnyg@gmx.net>2012-11-08 04:18:19 +0400
commitaf5c6f0c6a7cddd46b801b7b59af7a5e9383c645 (patch)
tree2642116bd4a66a62c1a203031242bd4d788d10c9 /Makefile
parentc698d48c03f1ba486cdd4a44e4107acc23991e77 (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bdaab44..481d904 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,9 @@ sysconfdir=$(prefix)/etc
SRCS = $(sort $(wildcard src/*.c))
OBJS = $(SRCS:.c=.o)
-LOBJS = src/core.o src/common.o src/libproxychains.o src/shm.o src/allocator_thread.o src/ip_type.o
+LOBJS = src/core.o src/common.o src/libproxychains.o src/shm.o \
+ src/allocator_thread.o src/ip_type.o src/stringdump.o \
+ src/hostentdb.o src/hash.o
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
LDFLAGS = -shared -fPIC -Wl,--no-as-needed -ldl -lpthread