termux-packages/packages/proxychains-ng/hostreader.c.patch
Leonid Pliushch bd6813c490 move proxychains-ng from unstable packages
Can be used as replacement for 'torsocks' which is not working after Android 8.
2019-03-18 22:28:16 +02:00

17 lines
523 B
Diff

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;
}