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 <rofl0r@users.noreply.github.com>2020-09-24 00:00:29 +0300
committerrofl0r <rofl0r@users.noreply.github.com>2020-09-24 00:14:39 +0300
commit7fe813949644b115b0127279517dc7c0ee2d63b9 (patch)
treeef5c1bacd92ddd8f1eeb56601fc9700070d6cedd /Makefile
parent1e00b9ac1ee473b13c01010b32fc40dca8f0fb9b (diff)
experimental new feature: proxy_dns_daemon
since many users complain about issues with modern, ultracomplex clusterfuck software such as chromium, nodejs, etc, i've reconsidered one of my original ideas how to implement remote dns lookup support. instead of having a background thread serving requests via a pipe, the user manually starts a background daemon process before running proxychains, and the two processes then communicate via UDP. this requires much less hacks (like hooking of close() to prevent pipes from getting closed) and doesn't need to call any async-signal unsafe code like malloc(). this means it should be much more compatible than the previous method, however it's not as practical and slightly slower. it's recommended that the proxychains4-daemon runs on localhost, and if you use proxychains-ng a lot you might want to set ip up as a service that starts on boot. a single proxychains4-daemon should theoretically be able to serve many parallel proxychains4 instances, but this has not yet been tested so far. it's also possible to run the daemon on other computers, even over internet, but currently there is no error-checking/ timeout code at all; that means the UDP connection needs to be very stable. the library code used for the daemon sources are from my projects libulz[0] and htab[1], and the server code is loosely based on microsocks[2]. their licenses are all compatible with the GPL. if not otherwise mentioned, they're released for this purpose under the standard proxychains-ng license (see COPYING). [0]: https://github.com/rofl0r/libulz [1]: https://github.com/rofl0r/htab [2]: https://github.com/rofl0r/microsocks
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 17 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 31ba8db..d124ac9 100644
--- a/Makefile
+++ b/Makefile
@@ -13,13 +13,18 @@ includedir = $(prefix)/include
libdir = $(prefix)/lib
sysconfdir=$(prefix)/etc
-SRCS = $(sort $(wildcard src/*.c))
-OBJS = $(SRCS:.c=.o)
+OBJS = src/common.o src/main.o
+
+DOBJS = src/daemon/hsearch.o \
+ src/daemon/sblist.o src/daemon/sblist_delete.o \
+ src/daemon/daemon.o src/daemon/udpserver.o
+
LOBJS = src/nameinfo.o src/version.o \
src/core.o src/common.o src/libproxychains.o \
- src/allocator_thread.o \
+ src/allocator_thread.o src/rdns.o \
src/hostsreader.o src/hash.o src/debug.o
+
GENH = src/version.h
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
@@ -41,7 +46,8 @@ LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
SHARED_LIBS = $(LDSO_PATHNAME)
ALL_LIBS = $(SHARED_LIBS)
PXCHAINS = proxychains4
-ALL_TOOLS = $(PXCHAINS)
+PXCHAINS_D = proxychains4-daemon
+ALL_TOOLS = $(PXCHAINS) $(PXCHAINS_D)
ALL_CONFIGS = src/proxychains.conf
-include config.mak
@@ -70,7 +76,7 @@ install-config: $(ALL_CONFIGS:src/%=$(DESTDIR)$(sysconfdir)/%)
clean:
rm -f $(ALL_LIBS)
rm -f $(ALL_TOOLS)
- rm -f $(OBJS)
+ rm -f $(OBJS) $(LOBJS) $(DOBJS)
rm -f $(GENH)
src/version.h: $(wildcard VERSION .git)
@@ -83,10 +89,13 @@ src/version.o: src/version.h
$(LDSO_PATHNAME): $(LOBJS)
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \
- -shared -o $@ $(LOBJS) $(SOCKET_LIBS)
+ -shared -o $@ $^ $(SOCKET_LIBS)
+
+$(PXCHAINS): $(OBJS)
+ $(CC) $^ $(USER_LDFLAGS) $(LIBDL) -o $@
-$(ALL_TOOLS): $(OBJS)
- $(CC) src/main.o src/common.o $(USER_LDFLAGS) $(LIBDL) -o $(PXCHAINS)
+$(PXCHAINS_D): $(DOBJS)
+ $(CC) $^ $(USER_LDFLAGS) -o $@
.PHONY: all clean install install-config install-libs install-tools