Commit 70ed2189 authored by Max Lv's avatar Max Lv

add iptables back

parent aeee9c2f
...@@ -13,7 +13,7 @@ rm -rf src/main/assets/armeabi-v7a ...@@ -13,7 +13,7 @@ rm -rf src/main/assets/armeabi-v7a
rm -rf src/main/assets/x86 rm -rf src/main/assets/x86
mkdir -p src/main/assets/armeabi-v7a mkdir -p src/main/assets/armeabi-v7a
mkdir -p src/main/assets/x86 mkdir -p src/main/assets/x86
for app in pdnsd redsocks for app in pdnsd redsocks iptables
do do
try mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/ try mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/
try mv libs/x86/$app src/main/assets/x86/ try mv libs/x86/$app src/main/assets/x86/
......
...@@ -335,13 +335,13 @@ openssl_subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \ ...@@ -335,13 +335,13 @@ openssl_subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \
include $(openssl_subdirs) include $(openssl_subdirs)
# Iptables # Iptables
# LOCAL_PATH := $(ROOT_PATH) LOCAL_PATH := $(ROOT_PATH)
# iptables_subdirs := $(addprefix $(LOCAL_PATH)/iptables/,$(addsuffix /Android.mk, \ iptables_subdirs := $(addprefix $(LOCAL_PATH)/iptables/,$(addsuffix /Android.mk, \
# iptables \ iptables \
# extensions \ extensions \
# libiptc \ libiptc \
# )) ))
# include $(iptables_subdirs) include $(iptables_subdirs)
# Import cpufeatures # Import cpufeatures
$(call import-module,android/cpufeatures) $(call import-module,android/cpufeatures)
...@@ -123,7 +123,7 @@ object Shadowsocks { ...@@ -123,7 +123,7 @@ object Shadowsocks {
val FEATRUE_PREFS = Array(Key.isGFWList, Key.isGlobalProxy, Key.proxyedApps, Key.isTrafficStat, val FEATRUE_PREFS = Array(Key.isGFWList, Key.isGlobalProxy, Key.proxyedApps, Key.isTrafficStat,
Key.isUdpDns, Key.isAutoConnect) Key.isUdpDns, Key.isAutoConnect)
val EXECUTABLES = Array(Executable.PDNSD, Executable.REDSOCKS) val EXECUTABLES = Array(Executable.PDNSD, Executable.REDSOCKS, Executable.IPTABLES)
// Helper functions // Helper functions
def updateListPreference(pref: Preference, value: String) { def updateListPreference(pref: Preference, value: String) {
...@@ -496,7 +496,7 @@ class Shadowsocks ...@@ -496,7 +496,7 @@ class Shadowsocks
// Bind to the service // Bind to the service
spawn { spawn {
val isRoot = Console.isRoot val isRoot = Build.VERSION.SDK_INT != Build.VERSION_CODES.LOLLIPOP && Console.isRoot
handler.post(new Runnable { handler.post(new Runnable {
override def run() { override def run() {
status.edit.putBoolean(Key.isRoot, isRoot).commit() status.edit.putBoolean(Key.isRoot, isRoot).commit()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment