2011-09-03 23:45:16 +00:00
|
|
|
#
|
|
|
|
# Makefile for proxychains (requires GNU make), stolen from musl
|
|
|
|
#
|
|
|
|
# Use config.mak to override any of the following variables.
|
|
|
|
# Do not make changes here.
|
|
|
|
#
|
|
|
|
|
|
|
|
exec_prefix = /usr/local
|
|
|
|
bindir = $(exec_prefix)/bin
|
|
|
|
|
|
|
|
prefix = /usr/local/
|
|
|
|
includedir = $(prefix)/include
|
|
|
|
libdir = $(prefix)/lib
|
2022-03-30 06:16:06 +00:00
|
|
|
sysconfdir = $(prefix)/etc
|
2023-12-02 21:28:35 +00:00
|
|
|
zshcompletiondir = $(prefix)/share/zsh/site-functions
|
2011-09-03 23:45:16 +00:00
|
|
|
|
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
2020-09-23 21:00:29 +00:00
|
|
|
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
|
|
|
|
|
2021-12-12 17:51:25 +00:00
|
|
|
LOBJS = src/version.o \
|
2015-06-06 10:41:36 +00:00
|
|
|
src/core.o src/common.o src/libproxychains.o \
|
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
2020-09-23 21:00:29 +00:00
|
|
|
src/allocator_thread.o src/rdns.o \
|
2014-11-14 11:33:58 +00:00
|
|
|
src/hostsreader.o src/hash.o src/debug.o
|
2011-09-03 23:45:16 +00:00
|
|
|
|
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
2020-09-23 21:00:29 +00:00
|
|
|
|
2014-07-22 12:10:08 +00:00
|
|
|
GENH = src/version.h
|
|
|
|
|
2012-11-07 20:28:09 +00:00
|
|
|
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
|
2012-12-16 01:39:28 +00:00
|
|
|
NO_AS_NEEDED = -Wl,--no-as-needed
|
2021-04-30 15:15:30 +00:00
|
|
|
LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) $(PTHREAD)
|
2011-09-03 23:45:16 +00:00
|
|
|
INC =
|
2012-01-24 06:29:34 +00:00
|
|
|
PIC = -fPIC
|
2011-09-03 23:45:16 +00:00
|
|
|
AR = $(CROSS_COMPILE)ar
|
|
|
|
RANLIB = $(CROSS_COMPILE)ranlib
|
2018-01-10 16:41:57 +00:00
|
|
|
SOCKET_LIBS =
|
2011-09-03 23:45:16 +00:00
|
|
|
|
2012-01-27 19:30:44 +00:00
|
|
|
LDSO_SUFFIX = so
|
2012-01-27 19:48:24 +00:00
|
|
|
LD_SET_SONAME = -Wl,-soname=
|
2014-07-22 12:32:27 +00:00
|
|
|
INSTALL = ./tools/install.sh
|
2012-01-27 19:30:44 +00:00
|
|
|
|
|
|
|
LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
|
2011-11-06 13:07:38 +00:00
|
|
|
|
|
|
|
SHARED_LIBS = $(LDSO_PATHNAME)
|
2011-09-03 23:45:16 +00:00
|
|
|
ALL_LIBS = $(SHARED_LIBS)
|
2011-11-06 13:07:38 +00:00
|
|
|
PXCHAINS = proxychains4
|
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
2020-09-23 21:00:29 +00:00
|
|
|
PXCHAINS_D = proxychains4-daemon
|
|
|
|
ALL_TOOLS = $(PXCHAINS) $(PXCHAINS_D)
|
2014-07-22 12:32:27 +00:00
|
|
|
ALL_CONFIGS = src/proxychains.conf
|
2022-09-19 08:42:49 +00:00
|
|
|
ZSH_COMPLETION = completions/zsh/_proxychains4
|
2011-09-03 23:45:16 +00:00
|
|
|
|
2013-01-06 18:26:01 +00:00
|
|
|
-include config.mak
|
2011-09-03 23:45:16 +00:00
|
|
|
|
2016-12-24 12:49:14 +00:00
|
|
|
CFLAGS+=$(USER_CFLAGS) $(MAC_CFLAGS)
|
2012-01-30 17:29:35 +00:00
|
|
|
CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DDLL_NAME=\"$(LDSO_PATHNAME)\"
|
2011-09-03 23:45:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: $(ALL_LIBS) $(ALL_TOOLS)
|
|
|
|
|
2014-07-22 12:32:27 +00:00
|
|
|
install: install-libs install-tools
|
2012-07-16 00:29:04 +00:00
|
|
|
|
2014-07-22 12:32:27 +00:00
|
|
|
$(DESTDIR)$(bindir)/%: %
|
|
|
|
$(INSTALL) -D -m 755 $< $@
|
|
|
|
|
|
|
|
$(DESTDIR)$(libdir)/%: %
|
|
|
|
$(INSTALL) -D -m 644 $< $@
|
|
|
|
|
2014-07-22 15:21:11 +00:00
|
|
|
$(DESTDIR)$(sysconfdir)/%: src/%
|
2014-07-22 12:32:27 +00:00
|
|
|
$(INSTALL) -D -m 644 $< $@
|
|
|
|
|
2022-09-19 08:42:49 +00:00
|
|
|
$(DESTDIR)$(zshcompletiondir)/%: completions/zsh/%
|
2022-03-30 06:16:06 +00:00
|
|
|
$(INSTALL) -D -m 644 $< $@
|
|
|
|
|
2014-07-22 12:32:27 +00:00
|
|
|
install-libs: $(ALL_LIBS:%=$(DESTDIR)$(libdir)/%)
|
|
|
|
install-tools: $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%)
|
|
|
|
install-config: $(ALL_CONFIGS:src/%=$(DESTDIR)$(sysconfdir)/%)
|
2022-09-19 08:42:49 +00:00
|
|
|
install-zsh-completion: $(ZSH_COMPLETION:completions/zsh/%=$(DESTDIR)$(zshcompletiondir)/%)
|
2011-09-03 23:45:16 +00:00
|
|
|
|
|
|
|
clean:
|
2012-01-24 06:29:34 +00:00
|
|
|
rm -f $(ALL_LIBS)
|
|
|
|
rm -f $(ALL_TOOLS)
|
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
2020-09-23 21:00:29 +00:00
|
|
|
rm -f $(OBJS) $(LOBJS) $(DOBJS)
|
2014-07-22 12:10:08 +00:00
|
|
|
rm -f $(GENH)
|
|
|
|
|
|
|
|
src/version.h: $(wildcard VERSION .git)
|
|
|
|
printf '#define VERSION "%s"\n' "$$(sh tools/version.sh)" > $@
|
|
|
|
|
|
|
|
src/version.o: src/version.h
|
2011-09-03 23:45:16 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
2014-02-02 08:49:21 +00:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $<
|
2011-09-03 23:45:16 +00:00
|
|
|
|
2011-11-06 13:07:38 +00:00
|
|
|
$(LDSO_PATHNAME): $(LOBJS)
|
2022-05-31 23:53:23 +00:00
|
|
|
$(CC) $(LDFLAGS) $(FAT_LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) \
|
|
|
|
$(USER_LDFLAGS) -shared -o $@ $^ $(SOCKET_LIBS)
|
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
2020-09-23 21:00:29 +00:00
|
|
|
|
|
|
|
$(PXCHAINS): $(OBJS)
|
2022-07-21 23:00:15 +00:00
|
|
|
$(CC) $^ $(FAT_BIN_LDFLAGS) $(USER_LDFLAGS) $(LIBDL) -o $@
|
2011-09-03 23:45:16 +00:00
|
|
|
|
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
2020-09-23 21:00:29 +00:00
|
|
|
$(PXCHAINS_D): $(DOBJS)
|
2022-07-21 23:00:15 +00:00
|
|
|
$(CC) $^ $(FAT_BIN_LDFLAGS) $(USER_LDFLAGS) -o $@
|
2011-09-03 23:45:16 +00:00
|
|
|
|
|
|
|
|
2022-03-30 06:16:06 +00:00
|
|
|
.PHONY: all clean install install-config install-libs install-tools install-zsh-completion
|