mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-06 21:02:55 +08:00
Compare commits
3 Commits
457e682491
...
a9b631a05b
Author | SHA1 | Date | |
---|---|---|---|
|
a9b631a05b | ||
|
821249f22a | ||
|
3ab15aa05c |
12
configure
vendored
12
configure
vendored
@ -87,6 +87,7 @@ usage() {
|
|||||||
echo " to preload from current dir (possibly insecure, but handy)"
|
echo " to preload from current dir (possibly insecure, but handy)"
|
||||||
echo "--fat-binary : build for both i386 and x86_64 architectures on 64-bit Macs"
|
echo "--fat-binary : build for both i386 and x86_64 architectures on 64-bit Macs"
|
||||||
echo "--fat-binary-m1 : build for both arm64e and x86_64 architectures on M1 Macs"
|
echo "--fat-binary-m1 : build for both arm64e and x86_64 architectures on M1 Macs"
|
||||||
|
echo "--fat-binary-m2 : build for arm64, arm64e and x86_64 architectures on M2+ Macs"
|
||||||
echo "--hookmethod=dlsym|dyld hook method for osx. default: auto"
|
echo "--hookmethod=dlsym|dyld hook method for osx. default: auto"
|
||||||
echo " if OSX >= 12 is detected, dyld method will be used if auto."
|
echo " if OSX >= 12 is detected, dyld method will be used if auto."
|
||||||
echo "--help : show this text"
|
echo "--help : show this text"
|
||||||
@ -102,6 +103,7 @@ spliteq() {
|
|||||||
|
|
||||||
fat_binary=
|
fat_binary=
|
||||||
fat_binary_m1=
|
fat_binary_m1=
|
||||||
|
fat_binary_m2=
|
||||||
ignore_cve=no
|
ignore_cve=no
|
||||||
hookmethod=auto
|
hookmethod=auto
|
||||||
|
|
||||||
@ -118,6 +120,7 @@ parsearg() {
|
|||||||
--hookmethod=*) hookmethod=`spliteq $1`;;
|
--hookmethod=*) hookmethod=`spliteq $1`;;
|
||||||
--fat-binary) fat_binary=1;;
|
--fat-binary) fat_binary=1;;
|
||||||
--fat-binary-m1) fat_binary_m1=1;;
|
--fat-binary-m1) fat_binary_m1=1;;
|
||||||
|
--fat-binary-m2) fat_binary_m2=1;;
|
||||||
--help) usage;;
|
--help) usage;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -289,6 +292,12 @@ if ismac ; then
|
|||||||
echo "FAT_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak
|
echo "FAT_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak
|
||||||
echo "FAT_BIN_LDFLAGS=-arch arm64 -arch x86_64">>config.mak
|
echo "FAT_BIN_LDFLAGS=-arch arm64 -arch x86_64">>config.mak
|
||||||
fi
|
fi
|
||||||
|
if [ "$fat_binary_m2" = 1 ] ; then
|
||||||
|
echo "Configuring a fat binary for arm64[e] and x86_64"
|
||||||
|
echo "MAC_CFLAGS+=-arch arm64 -arch arm64e -arch x86_64">>config.mak
|
||||||
|
echo "FAT_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak
|
||||||
|
echo "FAT_BIN_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak
|
||||||
|
fi
|
||||||
elif isbsd ; then
|
elif isbsd ; then
|
||||||
echo LIBDL=>>config.mak
|
echo LIBDL=>>config.mak
|
||||||
echo "CFLAGS+=-DIS_BSD">>config.mak
|
echo "CFLAGS+=-DIS_BSD">>config.mak
|
||||||
@ -302,3 +311,6 @@ elif ishaiku ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Done, now run $make_cmd && $make_cmd install"
|
echo "Done, now run $make_cmd && $make_cmd install"
|
||||||
|
if [ "$fat_binary_m2" = 1 ] ; then
|
||||||
|
echo "Don't forget to run csrutil disable and sudo nvram boot-args=-arm64e_preview_abi"
|
||||||
|
fi
|
||||||
|
@ -745,6 +745,10 @@ HOOKFUNC(int, connect, int sock, const struct sockaddr *addr, unsigned int len)
|
|||||||
if((p_addr_in->s_addr ^ localnet_addr[i].in_addr.s_addr) & localnet_addr[i].in_mask.s_addr)
|
if((p_addr_in->s_addr ^ localnet_addr[i].in_addr.s_addr) & localnet_addr[i].in_mask.s_addr)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!v6 && dnat) {
|
||||||
|
memcpy(&((struct sockaddr_in *) addr)->sin_addr, p_addr_in, sizeof(*p_addr_in));
|
||||||
|
((struct sockaddr_in *) addr)->sin_port = htons(port);
|
||||||
|
}
|
||||||
PDEBUG("accessing localnet using true_connect\n");
|
PDEBUG("accessing localnet using true_connect\n");
|
||||||
return true_connect(sock, addr, len);
|
return true_connect(sock, addr, len);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user