rofl0r / rofl0r/proxychains-ng

➜ proxychains-ng git:(master) ✗ ./proxychains4 curl www.google.com [1] 39827 killed ./proxychains4 curl www.google.com

Open
#520 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
10.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

➜  er git clone https://github.com/rofl0r/proxychains-ng.git
正克隆到 'proxychains-ng'...
remote: Enumerating objects: 1582, done.
remote: Counting objects: 100% (162/162), done.
remote: Compressing objects: 100% (81/81), done.
remote: Total 1582 (delta 99), reused 94 (delta 75), pack-reused 1420
接收对象中: 100% (1582/1582), 731.60 KiB | 665.00 KiB/s, 完成.
处理 delta 中: 100% (1040/1040), 完成.
➜  er cd proxychains-ng
➜  proxychains-ng git:(master) CFLAGS="-arch arm64e" LDFLAGS="-arch arm64e" ./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary-m1 --hookmethod=dyld
checking whether C compiler works ... yes
checking whether libc headers are complete ... yes
checking whether C compiler understands -Wno-unknown-pragmas ... yes
checking whether getnameinfo() servlen argument is POSIX compliant (socklen_t) ... yes
checking whether we have GNU-style getservbyname_r() ... no
checking whether we have pipe2() and O_CLOEXEC ... no
checking whether we have SOCK_CLOEXEC ... no
checking whether we have clock_gettime ... yes
checking whether $CC defines __APPLE__ ... yes
checking whether $CC defines __x86_64__ ... no
checking whether $CC defines __FreeBSD__ ... no
checking whether $CC defines __OpenBSD__ ... no
checking whether $CC defines __sun ... no
checking whether $CC defines __HAIKU__ ... no
checking whether we can use -Wl,--no-as-needed ... no
checking what's the option to use in linker to set library name ... -install_name
checking checking whether we can use -ldl ... yes
checking checking whether we can use -lpthread ... yes
using Monterey style DYLD hooking
Configuring a fat binary for arm64[e] and x86_64
Done, now run make && make install
➜  proxychains-ng git:(master) make
printf '#define VERSION "%s"\n' "$(sh tools/version.sh)" > src/version.h
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/version.o src/version.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/core.o src/core.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/common.o src/common.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/libproxychains.o src/libproxychains.c
src/libproxychains.c:919:2: warning: incompatible function pointer types assigning to 'freeaddrinfo_t' (aka 'int (*)(struct addrinfo *)') from 'void (*)(struct addrinfo *)' [-Wincompatible-function-pointer-types]
        SETUP_SYM(freeaddrinfo);
        ^~~~~~~~~~~~~~~~~~~~~~~
src/libproxychains.c:906:57: note: expanded from macro 'SETUP_SYM'
#define SETUP_SYM(X) do { if (! true_ ## X ) true_ ## X = &X; } while(0)
                                                        ^ ~~
src/libproxychains.c:90:14: warning: unused function 'load_sym' [-Wunused-function]
static void* load_sym(char* symname, void* proxyfunc, int is_mandatory) {
             ^
2 warnings generated.
src/libproxychains.c:919:2: warning: incompatible function pointer types assigning to 'freeaddrinfo_t' (aka 'int (*)(struct addrinfo *)') from 'void (*)(struct addrinfo *)' [-Wincompatible-function-pointer-types]
        SETUP_SYM(freeaddrinfo);
        ^~~~~~~~~~~~~~~~~~~~~~~
src/libproxychains.c:906:57: note: expanded from macro 'SETUP_SYM'
#define SETUP_SYM(X) do { if (! true_ ## X ) true_ ## X = &X; } while(0)
                                                        ^ ~~
src/libproxychains.c:90:14: warning: unused function 'load_sym' [-Wunused-function]
static void* load_sym(char* symname, void* proxyfunc, int is_mandatory) {
             ^
2 warnings generated.
src/libproxychains.c:919:2: warning: incompatible function pointer types assigning to 'freeaddrinfo_t' (aka 'int (*)(struct addrinfo *)') from 'void (*)(struct addrinfo *)' [-Wincompatible-function-pointer-types]
        SETUP_SYM(freeaddrinfo);
        ^~~~~~~~~~~~~~~~~~~~~~~
src/libproxychains.c:906:57: note: expanded from macro 'SETUP_SYM'
#define SETUP_SYM(X) do { if (! true_ ## X ) true_ ## X = &X; } while(0)
                                                        ^ ~~
src/libproxychains.c:90:14: warning: unused function 'load_sym' [-Wunused-function]
static void* load_sym(char* symname, void* proxyfunc, int is_mandatory) {
             ^
2 warnings generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/allocator_thread.o src/allocator_thread.c
src/allocator_thread.c:327:9: warning: 'PTHREAD_STACK_MIN' macro redefined [-Wmacro-redefined]
#define PTHREAD_STACK_MIN 64*1024
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/limits.h:115:9: note: previous definition is here
#define PTHREAD_STACK_MIN               16384
        ^
1 warning generated.
src/allocator_thread.c:327:9: warning: 'PTHREAD_STACK_MIN' macro redefined [-Wmacro-redefined]
#define PTHREAD_STACK_MIN 64*1024
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/limits.h:115:9: note: previous definition is here
#define PTHREAD_STACK_MIN               16384
        ^
1 warning generated.
src/allocator_thread.c:327:9: warning: 'PTHREAD_STACK_MIN' macro redefined [-Wmacro-redefined]
#define PTHREAD_STACK_MIN 64*1024
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/limits.h:117:9: note: previous definition is here
#define PTHREAD_STACK_MIN               8192
        ^
1 warning generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/rdns.o src/rdns.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/hostsreader.o src/hostsreader.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/hash.o src/hash.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/debug.o src/debug.c
cc -fPIC  -ldl -lpthread -arch arm64 -arch arm64e -arch x86_64 -Wl,-install_name,libproxychains4.dylib \
		-arch arm64e -shared -o libproxychains4.dylib src/version.o src/core.o src/common.o src/libproxychains.o src/allocator_thread.o src/rdns.o src/hostsreader.o src/hash.o src/debug.o
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/main.o src/main.c
cc src/common.o src/main.o -arch arm64 -arch x86_64 -arch arm64e -ldl -o proxychains4
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/daemon/hsearch.o src/daemon/hsearch.c
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/daemon/sblist.o src/daemon/sblist.c
In file included from src/daemon/sblist.c:3:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
1 warning generated.
In file included from src/daemon/sblist.c:3:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
1 warning generated.
In file included from src/daemon/sblist.c:3:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
1 warning generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/daemon/sblist_delete.o src/daemon/sblist_delete.c
In file included from src/daemon/sblist_delete.c:1:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
1 warning generated.
In file included from src/daemon/sblist_delete.c:1:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
1 warning generated.
In file included from src/daemon/sblist_delete.c:1:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
1 warning generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/daemon/daemon.o src/daemon/daemon.c
src/daemon/daemon.c:8:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
#define _GNU_SOURCE
        ^
<command line>:6:9: note: previous definition is here
#define _GNU_SOURCE 1
        ^
In file included from src/daemon/daemon.c:20:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
        ^
In file included from src/daemon/daemon.c:21:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
3 warnings generated.
src/daemon/daemon.c:8:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
#define _GNU_SOURCE
        ^
<command line>:6:9: note: previous definition is here
#define _GNU_SOURCE 1
        ^
In file included from src/daemon/daemon.c:20:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
        ^
In file included from src/daemon/daemon.c:21:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
3 warnings generated.
src/daemon/daemon.c:8:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
#define _GNU_SOURCE
        ^
<command line>:6:9: note: previous definition is here
#define _GNU_SOURCE 1
        ^
In file included from src/daemon/daemon.c:20:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
        ^
In file included from src/daemon/daemon.c:21:
src/daemon/sblist.h:90:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "sblist.c" "sblist_delete.c"
        ^
3 warnings generated.
cc -DSUPER_SECURE -Wno-unknown-pragmas -DGN_NODELEN_T=socklen_t -DGN_SERVLEN_T=socklen_t -DGN_FLAGS_T=int -DHAVE_CLOCK_GETTIME -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DMONTEREY_HOOKING -arch arm64e -DIS_MAC=1 -arch arm64 -arch arm64e -arch x86_64 -DLIB_DIR=\"/usr/local/lib\" -DSYSCONFDIR=\"/usr/local/etc\" -DDLL_NAME=\"libproxychains4.dylib\"  -fPIC -c -o src/daemon/udpserver.o src/daemon/udpserver.c
In file included from src/daemon/udpserver.c:1:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
        ^
1 warning generated.
In file included from src/daemon/udpserver.c:1:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
        ^
1 warning generated.
In file included from src/daemon/udpserver.c:1:
src/daemon/udpserver.h:11:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma RcB2 DEP "udpserver.c"
        ^
1 warning generated.
cc src/daemon/hsearch.o src/daemon/sblist.o src/daemon/sblist_delete.o src/daemon/daemon.o src/daemon/udpserver.o -arch arm64 -arch x86_64 -arch arm64e -o proxychains4-daemon
➜  proxychains-ng git:(master) ✗ file ./proxychains4
./proxychains4: Mach-O universal binary with 3 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64] [arm64e:Mach-O 64-bit executable arm64e]
./proxychains4 (for architecture x86_64):	Mach-O 64-bit executable x86_64
./proxychains4 (for architecture arm64):	Mach-O 64-bit executable arm64
./proxychains4 (for architecture arm64e):	Mach-O 64-bit executable arm64e
➜  proxychains-ng git:(master) ✗ ls
AUTHORS               Makefile              TODO                  completions           configure             proxychains4          src                   tools
COPYING               README                VERSION               config.mak            libproxychains4.dylib proxychains4-daemon   tests
➜  proxychains-ng git:(master) ✗ ./proxychains4 curl www.google.com
[1]    39827 killed     ./proxychains4 curl www.google.com

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported termination by running the shown arm64e/x86_64 configure and make commands, then ./proxychains4 curl www.google.com. Start with the Monterey DYLD hooking path and the files named in the build output, especially src/libproxychains.c; done means the command no longer ends with “killed” and proxychains4 remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.