commit 76b15ddf5830341c2410b1c3ee48baf4177935e5 Author: Nathan Freitas nathan@freitas.net Date: Sat Dec 28 09:10:05 2013 -0500
adding new iptables/xtables build from source --- .gitignore | 3 --- .gitmodules | 3 +++ external/Makefile | 26 +++++++++++++++++++------- external/iptables | 1 + 4 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/.gitignore b/.gitignore index 543565d..4824f92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ external/bin/ external/include/ -external/iptables.foo/ -external/iptables/ external/jtorctl-build-stamp external/lib/ external/libevent-build-stamp @@ -13,7 +11,6 @@ external/test.c external/test.h.gch external/tor-build-stamp external/translation/ -external/simple* bin gen native diff --git a/.gitmodules b/.gitmodules index b9a36f9..0e89bae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "external/openssl"] path = external/openssl url = git://git.openssl.org/openssl +[submodule "external/iptables"] + path = external/iptables + url = git://git.netfilter.org/iptables diff --git a/external/Makefile b/external/Makefile index 95f7f87..5c7f770 100644 --- a/external/Makefile +++ b/external/Makefile @@ -17,7 +17,7 @@ EXTERNAL_ROOT = $(CWD)
# Android NDK setup: NDK_BASE ?= /usr/local/android-ndk -NDK_PLATFORM_LEVEL ?= 8 +NDK_PLATFORM_LEVEL ?= 9 NDK_TOOLCHAIN_VERSION=4.6 NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-arm NDK_UNAME:=`uname -s | tr '[A-Z]' '[a-z]'` @@ -125,24 +125,34 @@ libevent-clean: # iptables
iptables/Makefile: + cp iptables-patch-1 iptables + cp iptables-patch-2 iptables + cp iptables-patch-3 iptables + -cd iptables && \ + patch -N -p1 --reject-file=- < iptables-patch-1 + -cd iptables && \ + patch -N -p1 --reject-file=- < iptables-patch-2 + -cd iptables && \ + patch -N -p1 --reject-file=- < iptables-patch-3 cd iptables && ./autogen.sh cp config.sub iptables cp config.guess iptables cd iptables && \ - CC="$(CC)" AR="$(AR)" RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) -DNO_SHARED_LIBS -DXTABLES_INTERNAL -DIPTABLES_VERSION="1.4.10" =-DXTABLES_VERSION="1.4.10" # -DIPT_LIB_DIR="$(IPT_LIBDIR)" -DXTABLES_LIBDIR -I$(EXTERNAL_ROOT)/include" LDFLAGS="$(LDFLAGS)" \ - ./configure \ - --host=$(HOST) \ - --disable-shared + CC="$(CC)" AR="$(AR)" RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) -I$(EXTERNAL_ROOT)/include" LDFLAGS="$(LDFLAGS)" \ + ./configure --host=$(HOST) --disable-shared --enable-static
iptables-build-stamp: iptables/Makefile $(MAKE) -C iptables touch iptables-build-stamp + cp iptables/iptables/xtables-multi bin/xtables
iptables: iptables-build-stamp
iptables-clean: -rm -f iptables-build-stamp - -cd iptables + -rm bin/xtables + -cd iptables && \ + git clean -fdx
#------------------------------------------------------------------------------# # tor @@ -273,15 +283,17 @@ jtorctl-clean: #in order to stop Android OS (older devices) from trying to compress/decompress it #this is related to a bug in compression of assets and resources > 1MB
-assets: tor privoxy jtorctl obfsproxy +assets: tor privoxy jtorctl obfsproxy iptables install -d ../libs/armeabi install -d ../libs install bin/privoxy ../libs/armeabi/libprivoxy.so install bin/obfsproxy ../libs/armeabi/libobfsproxy.so install bin/jtorctl.jar ../libs install bin/tor ../libs/armeabi/libtor.so + install bin/xtables ../libs/armeabi/libxtables.so
assets-clean: + -rm ../libs/armeabi/libxtables.so -rm ../libs/armeabi/libtor.so -rm ../libs/armeabi/libprivoxy.so -rm ../libs/armeabi/libobfsproxy.so diff --git a/external/iptables b/external/iptables new file mode 160000 index 0000000..99b85b7 --- /dev/null +++ b/external/iptables @@ -0,0 +1 @@ +Subproject commit 99b85b7837707bd6c6d578c9328e1321fceb8082