Leonid Plyushch
6 years ago
committed by
Fredrik Fornwall
4 changed files with 64 additions and 0 deletions
@ -0,0 +1,21 @@ |
|||
diff -uNr proxychains-ng-4.13/Makefile proxychains-ng-4.13.mod/Makefile
|
|||
--- proxychains-ng-4.13/Makefile 2018-06-25 02:26:05.000000000 +0300
|
|||
+++ proxychains-ng-4.13.mod/Makefile 2019-03-05 19:35:28.924332422 +0200
|
|||
@@ -8,7 +8,7 @@
|
|||
exec_prefix = /usr/local |
|||
bindir = $(exec_prefix)/bin |
|||
|
|||
-prefix = /usr/local/
|
|||
+prefix = @TERMUX_PREFIX@
|
|||
includedir = $(prefix)/include |
|||
libdir = $(prefix)/lib |
|||
sysconfdir=$(prefix)/etc |
|||
@@ -25,7 +25,7 @@
|
|||
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe |
|||
NO_AS_NEEDED = -Wl,--no-as-needed |
|||
LIBDL = -ldl |
|||
-LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
|
|||
+LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL)
|
|||
INC = |
|||
PIC = -fPIC |
|||
AR = $(CROSS_COMPILE)ar |
@ -0,0 +1,14 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://github.com/rofl0r/proxychains-ng |
|||
TERMUX_PKG_DESCRIPTION="A hook preloader that allows to redirect TCP traffic of existing dynamically linked programs through one or more SOCKS or HTTP proxies" |
|||
TERMUX_PKG_LICENSE="GPL-2.0" |
|||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr" |
|||
TERMUX_PKG_VERSION=4.14 |
|||
TERMUX_PKG_SRCURL=https://github.com/rofl0r/proxychains-ng/archive/v$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=ab31626af7177cc2669433bb244b99a8f98c08031498233bb3df3bcc9711a9cc |
|||
TERMUX_PKG_BUILD_IN_SRC=yes |
|||
|
|||
termux_step_post_make_install() { |
|||
# Remove conf file from previous build, otherwise nothing will be done and it won't be included in the package |
|||
rm -f "$TERMUX_PREFIX"/etc/proxychains.conf |
|||
make install-config |
|||
} |
@ -0,0 +1,16 @@ |
|||
diff -uNr proxychains-ng-4.13/src/hostsreader.c proxychains-ng-4.13.mod/src/hostsreader.c
|
|||
--- proxychains-ng-4.13/src/hostsreader.c 2018-06-25 02:26:05.000000000 +0300
|
|||
+++ proxychains-ng-4.13.mod/src/hostsreader.c 2019-03-05 19:34:06.360468021 +0200
|
|||
@@ -16,7 +16,11 @@
|
|||
}; |
|||
|
|||
int hostsreader_open(struct hostsreader *ctx) { |
|||
- if(!(ctx->f = fopen("/etc/hosts", "r"))) return 0;
|
|||
+ if(!(ctx->f = fopen("@TERMUX_PREFIX@/etc/hosts", "r"))) {
|
|||
+ if(!(ctx->f = fopen("/etc/hosts", "r"))) {
|
|||
+ return 0;
|
|||
+ }
|
|||
+ }
|
|||
return 1; |
|||
} |
|||
|
@ -0,0 +1,13 @@ |
|||
diff --git a/src/libproxychains.c b/src/libproxychains.c
|
|||
index 7373d55..20bf993 100644
|
|||
--- a/src/libproxychains.c
|
|||
+++ b/src/libproxychains.c
|
|||
@@ -332,7 +332,7 @@ static int is_v4inv6(const struct in6_addr *a) {
|
|||
return a->s6_addr32[0] == 0 && a->s6_addr32[1] == 0 && |
|||
a->s6_addr16[4] == 0 && a->s6_addr16[5] == 0xffff; |
|||
} |
|||
-int connect(int sock, const struct sockaddr *addr, unsigned int len) {
|
|||
+int connect(int sock, const struct sockaddr *addr, socklen_t len) {
|
|||
INIT(); |
|||
PFUNC(); |
|||
|
Loading…
Reference in new issue