Commit Graph

53 Commits

Author SHA1 Message Date
rofl0r
821249f22a add new --fat-binary-m2 option
this enables arm64e in the proxychains4 binary additionally to the
injected library, which already did so with the -m1 option.

closes #569
2024-06-13 12:21:16 +00:00
rofl0r
199d03d8b4 configure: add a check for whether libc headers are usable
closes #486
2022-12-10 19:19:53 +00:00
rofl0r
060801d8c8 fat-binary-m1: use arm64e for dylib, but not for executable
according to research done by @malash, the proxychains4 binary
itself isn't allowed to use system-internal arm64e mode; but
it's possible to add it as a 3rd architecture to the shared
library (.dylib), and then even inject it into system binaries
like /usr/bin/curl, which didn't work since the introduction
of SIP.

therefore, we now create the dylib with all 3 archs, but the
launcher only with arm64 and x86_64.

closes #453
2022-07-21 23:04:03 +00:00
rofl0r
09142579c5 use -Wno-unknown-pragmas if available
this heavily reduces compiler warning spam in build logs.
2022-06-11 11:00:34 +00:00
rofl0r
916d2d7da1 fix --fat-binary-m1 option
even though the preload library was built correctly, the LDFLAGS set
weren't passed to the main proxychains4 binary, resulting in link
errors against the fat object files.

closes #452
2022-05-31 23:53:23 +00:00
rofl0r
4b531806b2 configure: add --fat-binary-m1 for arm64e/x86_64 (M1) fat binary
addresses #451
closes #383
2022-05-19 09:12:10 +00:00
rofl0r
07c15a02f6 add configure check for non-POSIX compliant getnameinfo signature
- glibc < 2.14 uses "unsigned" instead of "int" for flags
- openbsd and freebsd use "size_t" instead of socklen_t for servlen
  and nodelen, while still using socklen_t for salen.

closes #430
2022-01-25 15:42:55 +00:00
rofl0r
4a963b2feb only use -ldl if available (netbsd compilation fix)
fixes #416
2021-12-17 13:37:58 +00:00
rofl0r
e20c08fe47 configure: detect OSX >= 12 and use new dyld hooking method
closes #409
2021-12-14 14:38:55 +00:00
rofl0r
7de7dd0de1 configure: fix regression in detecting linker options
introduced in 83bfa0b61d, the check_link_silent
option always returned the result from the rm -f command rather than
the result from the compiler.

fixes #400
2021-10-01 08:58:19 +00:00
Fabrice Fontaine
83bfa0b61d configure: fix check_link_silent and check_compile
Replace -o /dev/null by -o "$tmpc".out in check_link_silent and
check_compile otherwise test will fail with some bugged binutils
(https://sourceware.org/bugzilla/show_bug.cgi?id=19526) since version
4.13 and
35a674bdbc:

checking what's the option to use in linker to set library name ...
cannot find an option to set library name
package/pkg-generic.mk:249: recipe for target '/home/buildroot/autobuild/instance-2/output-1/build/proxychains-ng-4.14/.stamp_configured' failed

Fixes:
 - http://autobuild.buildroot.org/results/9320d9b2c69882e23bbe7b30057eb8bee0c9d2e5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-07-23 20:18:34 +01:00
rofl0r
092d7042e0 initialize rand seed with nano-second granularity
in scenarios where one is to spin up several processes with the same
proxy list in random mode, all processes started in the same second
would pick the same proxy due to using the same srand() seed.

closes #380
2021-05-14 14:10:14 +00:00
rofl0r
6af2686a52 configure: check for -pthread vs -lpthread (#379) 2021-04-30 16:15:30 +01:00
rofl0r
fa9644dc27 configure: check first whether C compiler works
closes #353
2020-12-18 12:33:49 +00:00
rofl0r
583343a2ef configure: fix typo in fail() 2020-10-29 12:06:00 +00:00
rofl0r
0069fcd53e configure: add missing function fail() 2020-10-29 11:58:22 +00:00
rofl0r
7fe8139496 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 22:14:39 +01:00
Ethan F
0ee5db605b
Add Haiku support (#340) 2020-08-17 09:31:04 +01:00
Tom Li
db5cd6b699 configure: define HAVE_PIPE2 if we have pipe2() and O_CLOEXEC.
This commit adds a new run for pipe2() and O_CLOEXEC. If a program
can be executed, define HAVE_PIPE2.

Signed-off-by: Tom Li <tomli@tomli.me>
2018-12-25 18:03:39 +00:00
rofl0r
a6959ee715 configure: force check_compile() to link an executable
by using -c (which just creates an object file), we don't catch implicit
function declarations as an error (see discussion of #274).
2018-12-25 18:01:26 +00:00
rofl0r
49bf4ba772 replace getservbyname_r ifdef hacks with configure check
this should make it work automatically on any new platform without
having to add yet another ifdef hack.
should fix issues with android (#265).
additionally the code for the systems lacking GNU-compatible getservbyname_r()
is now guarded with a mutex, which prevents possible races, therefore
resolving the ancient "TODO" item.
2018-12-02 13:48:43 +00:00
rofl0r
bb30d867fe configure: prevent bug overwriting config.mak on OpenBSD
the command writing the openbsd line was using >> before the call
which was meant to initialize config.mak using >.

closes #228
2018-04-12 07:13:26 +01:00
WHR
35a674bdbc configure: Solaris detection, ld 'soname' option auto detection; other Solaris related fixes 2018-01-11 00:45:40 +08:00
rofl0r
b299193d13 configure: remove bogus uname platform checks
calling uname in a configure script is entirely bogus, as it will return
wrong results in crosscompilation scenarios. the only sensible way to
detect the target platform's peculiarities is to test the preprocessor
for macros defining the target.
2018-01-09 13:50:11 +00:00
rofl0r
2f3d33dd47 remove usage of s6_addr16 and s6_addr32
it turns out that those macros are not portable at all. rather than
adding workarounds to make it work for every single platform, just
use plain s6_addr instead.
2018-01-09 13:30:02 +00:00
rofl0r
cb70ab5f8f configure: use quotes for echo calls 2016-12-24 12:48:41 +00:00
Jatin Rungta
c91e6a09ef Fix configure so the right CC gets picked up
unlike one would expect, setting `CC?=gcc -m32` in config.mak did not actually
lead to `gcc -m32` being used as compiler when running make, even though CC
was not declared anywhere else.
it appears as if the CC variable is implicitly defined by GNU make, so using
the ?= assignment (meaning "assign only if not already assigned") did not have
an effect.
when this configure script and Makefile here were written, they were modeled
after the interface provided by GNU autoconf (so there are no surprises for the
user). the assumption was that environment variables passed during configure
are usually stored and used for the compile, but can be overridden when running
make by exporting the variables again.
in reality though they can not be overridden by environment when running make,
as tests showed.
because of that, the other user-supplied variables will now be hard-assigned as
well.

closes #152

commit message by @rofl0r.
2016-12-24 12:36:42 +00:00
rofl0r
c883cd4940 configure: make buildsystem-set CPPFLAGS non-overridable
we temporarily store all buildsystem-set conditionals into
OUR_CPPFLAGS and write it into config.mak as an addition to eventually
user-supplied CPPFLAGS. this should prevent crucial things we set from
being overwritten by a user that has CPPFLAGS exported.

fixes #142
2016-10-16 11:28:05 +00:00
rofl0r
260578d00e configure: do not use mktemp
apparently mktemp on OSX 10.9.5 requires a parameter.
instead of playing whack-a-mole with apple we now use the portable
code from musl's configure script which should work everywhere.

adresses #142
2016-10-08 21:02:13 +01:00
rofl0r
058adbcac2 configure: whitespace cleanup in help text 2016-02-04 12:56:00 +00:00
rofl0r
b64c89e0e4 add check for broken OpenBSD fclose()
http://marc.info/?l=openbsd-bugs&m=145280872431093&w=2

closes #95
2016-02-04 12:49:49 +00:00
rofl0r
1294d0a004 configure: check for availability of s6_addr16
this should fix the build of the recently added ipv6 code on MacOS X,
OpenBSD and eventually FreeBSD.

closes #83
closes #85

thanks to @cam13 and @vonnyfly for reporting/testing.
2015-10-01 14:14:23 +01:00
rofl0r
53c6c2ca9b configure: respect user LDFLAGS without breaking link order 2015-06-04 21:11:08 +01:00
rofl0r
c9c51d6705 Revert "Fix LDFLAGS"
This reverts commit e79e05a228.

This commit broke link order for a number of people.
2015-06-04 21:04:30 +01:00
rofl0r
9ab7dbeb3b fix for CVE-2015-3887
closes #60
2015-05-21 13:46:22 +01:00
rofl0r
ba61b48fd7 fix compilation with openbsd
closes #52
2015-04-08 11:09:48 +01:00
Till Maas
e79e05a228 Fix LDFLAGS
- Use user-supplied LDFLAGS
- Use LDFLAGS for linking proxychains4
2015-03-15 11:46:31 +01:00
rofl0r
840b361897 configure: hint that gmake should be used on BSD 2014-07-22 14:56:49 +02:00
rofl0r
6143266edd use musl's install.sh rather than doing workarounds for BSD install 2014-07-22 14:32:27 +02:00
Nikki McCavee
e2af2f2bd7 Add option to build for i386 architecture on x64 Intel Macs
closes #26
closes #27
2014-01-02 14:25:38 +01:00
rofl0r
5f433adfed fine-tune configure for BSD 2013-01-06 19:18:04 +01:00
rofl0r
5526afb56d FreeBSD support 2012-12-25 19:08:05 +01:00
rofl0r
ab4fb353b6 fix for mac build error
closes #6
2012-12-18 09:42:17 +01:00
rofl0r
eb0db7221a configure: add --help text 2012-07-08 00:35:59 +02:00
rofl0r
03b49f529e fix bogus use of ! in configure 2012-01-30 18:35:03 +01:00
rofl0r
0ee539f31c added support for --sysconfdir 2012-01-30 18:26:38 +01:00
rofl0r
c36db11ebc complete mac support 2012-01-27 20:48:24 +01:00
rofl0r
9c83402d37 detect MAC in configure 2012-01-27 20:21:06 +01:00
rofl0r
e5f3422b16 prevent configure-generated config to always overwrite CFLAGS in env 2012-01-24 07:29:04 +01:00
rofl0r
8f3bc0934a do not override our CFLAGS when none are passed 2011-11-06 17:52:32 +01:00