Compare commits

...
23 Commits
Author SHA1 Message Date
Max Lv a10889bb5b fix a bug 2014-11-21 12:15:59 +08:00
Max Lv 800e85dc0d fix #146 2014-11-20 15:37:37 +08:00
Max Lv e778a313ba bump version 2014-11-20 09:22:12 +08:00
Max Lv a3519fbdc8 enable aarch64 and x86_64 build 2014-11-19 10:12:49 +08:00
Max Lv 486288a513 Merge pull request #152 from CzBiX/patch-1
Update pref_all.xml
2014-11-18 17:15:53 +08:00
Liu VRan 0111bd5471 Update pref_all.xml
set input type for port
2014-11-18 17:08:22 +08:00
Max Lv 66fe67ae21 fix build error 2014-11-18 10:24:15 +08:00
Max Lv 04a8b49abc update submodule 2014-11-18 09:16:10 +08:00
Max Lv 3561c7f317 update sdk plugin 2014-11-18 09:14:29 +08:00
Max Lv 694534be58 add missing file 2014-11-17 21:24:51 +08:00
Max Lv efb614030f disable NAT mode again 2014-11-17 20:56:17 +08:00
Max Lv 8f41ea291f bump version 2014-11-17 20:23:10 +08:00
Max Lv 27ba7d64f4 fix a very old bug in redsocks 2014-11-17 19:51:08 +08:00
Max Lv 8fb5d7f8c6 fix a bug in autostart 2014-11-17 14:48:57 +08:00
Max Lv 014692cb84 udpate default settings 2014-11-17 09:44:11 +08:00
Max Lv 948db260b6 bump version 2014-11-17 09:39:34 +08:00
Max Lv b7c3c7d269 enable NAT mode again 2014-11-17 09:15:01 +08:00
Max Lv 897b222aa8 refine some strings 2014-11-17 08:46:12 +08:00
Max Lv 9a724cd063 fix #148 2014-11-16 21:35:54 +08:00
Max Lv b15a4604f2 fix chn list 2014-11-15 12:28:17 +08:00
Max Lv 2e3a2c9544 bypass private IP on Lollipop 2014-11-13 20:33:02 +08:00
Max Lv d6ed052338 clean up 2014-11-13 18:15:39 +08:00
Max Lv 4b99f8e3d6 Fix a bug 2014-11-13 18:04:19 +08:00
2859 changed files with 1395 additions and 696 deletions
-1
View File
@@ -29,7 +29,6 @@ src/main/assets/armeabi
src/main/assets/armeabi-v7a src/main/assets/armeabi-v7a
src/main/assets/x86 src/main/assets/x86
src/main/assets/api-16/ src/main/assets/api-16/
src/main/jni
jni/Application.mk jni/Application.mk
obj obj
libs libs
+3 -3
View File
@@ -1,3 +1,3 @@
[submodule "jni/shadowsocks"] [submodule "src/main/jni/shadowsocks"]
path = jni/shadowsocks path = src/main/jni/shadowsocks
url = https://github.com/madeye/shadowsocks-libev.git url = https://github.com/madeye/shadowsocks-libev
-1
View File
@@ -17,7 +17,6 @@ install:
- echo "y" | android update sdk --filter tools,platform-tools,build-tools-21.0.1,android-21,extra-google-m2repository --no-ui --no-https -a - echo "y" | android update sdk --filter tools,platform-tools,build-tools-21.0.1,android-21,extra-google-m2repository --no-ui --no-https -a
- echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a - echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a
script: script:
- ./build-ndk.sh
- cp local.properties.travis local.properties - cp local.properties.travis local.properties
- sbt android:package-release - sbt android:package-release
- exit 0 - exit 0
+2 -7
View File
@@ -29,9 +29,6 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
```bash ```bash
git submodule update --init git submodule update --init
# Build native binaries
./build-ndk.sh
# Build the App # Build the App
sbt clean android:package-release sbt clean android:package-release
``` ```
@@ -40,7 +37,8 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
* Install Android SDK and NDK by run `brew install android-ndk android-sdk` * Install Android SDK and NDK by run `brew install android-ndk android-sdk`
* Add `export ANDROID_HOME=/usr/local/Cellar/android-sdk/$version` to your .bashrc , then reopen the shell to load it. * Add `export ANDROID_HOME=/usr/local/Cellar/android-sdk/$version` to your .bashrc , then reopen the shell to load it.
* Run `echo "y" | android update sdk --filter tools,platform-tools,build-tools-19.0.3,android-19,extra-google-m2repository,extra-android-m2repository --no-ui --no-https -a` * echo "y" | android update sdk --filter tools,platform-tools,build-tools-21.0.1,android-21,extra-google-m2repository --no-ui --no-https -a
* echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a
* Create your key following the instructions at http://developer.android.com/guide/publishing/app-signing.html#cert * Create your key following the instructions at http://developer.android.com/guide/publishing/app-signing.html#cert
* Put your key in ~/.keystore * Put your key in ~/.keystore
* Create `local.properties` from `local.properties.example` with your own key information . * Create `local.properties` from `local.properties.example` with your own key information .
@@ -49,9 +47,6 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
```bash ```bash
git submodule update --init git submodule update --init
# Build native binaries
./build-ndk.sh
# Build the apk # Build the apk
sbt clean android:package-release sbt clean android:package-release
``` ```
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
function try () {
"$@" || exit -1
}
# Build
try $ANDROID_NDK_HOME/ndk-build clean
try $ANDROID_NDK_HOME/ndk-build
# copy executables
rm -rf src/main/assets/armeabi-v7a
rm -rf src/main/assets/x86
mkdir -p src/main/assets/armeabi-v7a
mkdir -p src/main/assets/x86
for app in pdnsd redsocks iptables
do
try mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/
try mv libs/x86/$app src/main/assets/x86/
done
# copy libraries
rm -rf src/main/jni/armeabi-v7a
rm -rf src/main/jni/x86
mkdir -p src/main/jni/armeabi-v7a
mkdir -p src/main/jni/x86
try mv libs/armeabi-v7a/*.so src/main/jni/armeabi-v7a/
try mv libs/x86/*.so src/main/jni/x86/
+2
View File
@@ -10,6 +10,8 @@ name := "shadowsocks"
compileOrder in Compile := CompileOrder.JavaThenScala compileOrder in Compile := CompileOrder.JavaThenScala
ndkJavah in Android := List()
resolvers += "JRAF" at "http://JRAF.org/static/maven/2" resolvers += "JRAF" at "http://JRAF.org/static/maven/2"
resolvers += "madeye private releases" at "http://madeye-maven-repository.googlecode.com/git/" resolvers += "madeye private releases" at "http://madeye-maven-repository.googlecode.com/git/"
Submodule jni/shadowsocks deleted from 5cc77c066b
+1 -1
View File
@@ -1,5 +1,5 @@
resolvers += Resolver.url("scalasbt releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns) resolvers += Resolver.url("scalasbt releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.2.20") addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.3.10")
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0") addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
+2 -4
View File
@@ -1,14 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks" package="com.github.shadowsocks"
android:versionCode="77" android:versionCode="83"
android:versionName="2.3.2"> android:versionName="2.4.3">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/> <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-feature <uses-feature
android:name="android.hardware.touchscreen" android:name="android.hardware.touchscreen"
@@ -14,6 +14,7 @@ public class Config implements Parcelable {
public String profileName = "Untitled"; public String profileName = "Untitled";
public String proxy = "127.0.0.1"; public String proxy = "127.0.0.1";
public String sitekey = "null"; public String sitekey = "null";
public String route = "all";
public String encMethod = "rc4"; public String encMethod = "rc4";
public String proxiedAppString = ""; public String proxiedAppString = "";
@@ -33,7 +34,7 @@ public class Config implements Parcelable {
public Config(boolean isGlobalProxy, boolean isGFWList, boolean isBypassApps, public Config(boolean isGlobalProxy, boolean isGFWList, boolean isBypassApps,
boolean isTrafficStat, boolean isUdpDns, String profileName, String proxy, String sitekey, boolean isTrafficStat, boolean isUdpDns, String profileName, String proxy, String sitekey,
String encMethod, String proxiedAppString, int remotePort, int localPort) { String encMethod, String proxiedAppString, String route, int remotePort, int localPort) {
this.isGlobalProxy = isGlobalProxy; this.isGlobalProxy = isGlobalProxy;
this.isGFWList = isGFWList; this.isGFWList = isGFWList;
this.isBypassApps = isBypassApps; this.isBypassApps = isBypassApps;
@@ -44,6 +45,7 @@ public class Config implements Parcelable {
this.sitekey = sitekey; this.sitekey = sitekey;
this.encMethod = encMethod; this.encMethod = encMethod;
this.proxiedAppString = proxiedAppString; this.proxiedAppString = proxiedAppString;
this.route = route;
this.remotePort = remotePort; this.remotePort = remotePort;
this.localPort = localPort; this.localPort = localPort;
} }
@@ -63,6 +65,7 @@ public class Config implements Parcelable {
sitekey = in.readString(); sitekey = in.readString();
encMethod = in.readString(); encMethod = in.readString();
proxiedAppString = in.readString(); proxiedAppString = in.readString();
route = in.readString();
remotePort = in.readInt(); remotePort = in.readInt();
localPort = in.readInt(); localPort = in.readInt();
} }
@@ -82,6 +85,7 @@ public class Config implements Parcelable {
out.writeString(sitekey); out.writeString(sitekey);
out.writeString(encMethod); out.writeString(encMethod);
out.writeString(proxiedAppString); out.writeString(proxiedAppString);
out.writeString(route);
out.writeInt(remotePort); out.writeInt(remotePort);
out.writeInt(localPort); out.writeInt(localPort);
} }
@@ -44,10 +44,12 @@ public class Core {
java.lang.System.loadLibrary("ss-tunnel-jni"); java.lang.System.loadLibrary("ss-tunnel-jni");
java.lang.System.loadLibrary("tun2socks-jni"); java.lang.System.loadLibrary("tun2socks-jni");
java.lang.System.loadLibrary("pdnsd-jni"); java.lang.System.loadLibrary("pdnsd-jni");
java.lang.System.loadLibrary("redsocks-jni");
} }
public static native void sslocal(String[] cmd); public static native void sslocal(String[] cmd);
public static native void sstunnel(String[] cmd); public static native void sstunnel(String[] cmd);
public static native void tun2socks(String[] cmd); public static native void tun2socks(String[] cmd);
public static native void pdnsd(String[] cmd); public static native void pdnsd(String[] cmd);
public static native void redsocks(String[] cmd);
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package eu.chainfire.libsuperuser;
import android.os.Looper; import android.os.Looper;
import android.util.Log; import android.util.Log;
import com.github.shadowsocks.BuildConfig; import com.github.shadowsocks.BuildConfig;
/** /**
@@ -0,0 +1,59 @@
/*
* Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package eu.chainfire.libsuperuser;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
* <p>
* Base receiver to extend to catch notifications when overlays should be
* hidden.
* </p>
* <p>
* Tapjacking protection in SuperSU prevents some dialogs from receiving user
* input when overlays are present. For security reasons this notification is
* only sent to apps that have previously been granted root access, so even if
* your app does not <em>require</em> root, you still need to <em>request</em>
* it, and the user must grant it.
* </p>
* <p>
* Note that the word overlay as used here should be interpreted as "any view or
* window possibly obscuring SuperSU dialogs".
* </p>
*/
public abstract class HideOverlaysReceiver extends BroadcastReceiver {
public static final String ACTION_HIDE_OVERLAYS = "eu.chainfire.supersu.action.HIDE_OVERLAYS";
public static final String CATEGORY_HIDE_OVERLAYS = Intent.CATEGORY_INFO;
public static final String EXTRA_HIDE_OVERLAYS = "eu.chainfire.supersu.extra.HIDE";
@Override
public final void onReceive(Context context, Intent intent) {
if (intent.hasExtra(EXTRA_HIDE_OVERLAYS)) {
onHideOverlays(intent.getBooleanExtra(EXTRA_HIDE_OVERLAYS, false));
}
}
/**
* Called when overlays <em>should</em> be hidden or <em>may</em> be shown
* again.
*
* @param hide Should overlays be hidden?
*/
public abstract void onHideOverlays(boolean hide);
}
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2012-2013 Jorrit "Chainfire" Jongma * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
+12 -43
View File
@@ -37,7 +37,7 @@ LIBEVENT_SOURCES := \
LOCAL_MODULE := event LOCAL_MODULE := event
LOCAL_SRC_FILES := $(addprefix libevent/, $(LIBEVENT_SOURCES)) LOCAL_SRC_FILES := $(addprefix libevent/, $(LIBEVENT_SOURCES))
LOCAL_CFLAGS := -O2 -g -I$(LOCAL_PATH)/libevent \ LOCAL_CFLAGS := -O2 -I$(LOCAL_PATH)/libevent \
-I$(LOCAL_PATH)/libevent/include \ -I$(LOCAL_PATH)/libevent/include \
-I$(LOCAL_PATH)/openssl/include -I$(LOCAL_PATH)/openssl/include
@@ -120,27 +120,13 @@ REDSOCKS_SOURCES := base.c dnstc.c http-connect.c \
LOCAL_STATIC_LIBRARIES := libevent LOCAL_STATIC_LIBRARIES := libevent
LOCAL_MODULE := redsocks LOCAL_MODULE := redsocks-jni
LOCAL_SRC_FILES := $(addprefix redsocks/, $(REDSOCKS_SOURCES)) LOCAL_SRC_FILES := $(addprefix redsocks/, $(REDSOCKS_SOURCES)) main-jni.cpp
LOCAL_CFLAGS := -O2 -std=gnu99 -g -I$(LOCAL_PATH)/redsocks \ LOCAL_CFLAGS := -O2 -std=gnu99 -DREDSOCKS_JNI -I$(LOCAL_PATH)/redsocks \
-I$(LOCAL_PATH)/libevent/include \ -I$(LOCAL_PATH)/libevent/include \
-I$(LOCAL_PATH)/libevent -I$(LOCAL_PATH)/libevent
include $(BUILD_EXECUTABLE) include $(BUILD_SHARED_LIBRARY)
########################################################
## pdnsd
########################################################
include $(CLEAR_VARS)
PDNSD_SOURCES := $(wildcard $(LOCAL_PATH)/pdnsd/src/*.c)
LOCAL_MODULE := pdnsd
LOCAL_SRC_FILES := $(PDNSD_SOURCES:$(LOCAL_PATH)/%=%)
LOCAL_CFLAGS := -Wall -O2 -I$(LOCAL_PATH)/pdnsd
include $(BUILD_EXECUTABLE)
######################################################## ########################################################
## pdnsd library ## pdnsd library
@@ -183,23 +169,6 @@ include $(BUILD_SHARED_LIBRARY)
## shadowsocks tunnel ## shadowsocks tunnel
######################################################## ########################################################
# include $(CLEAR_VARS)
#
# SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c json.c jconf.c
#
# LOCAL_MODULE := ss-tunnel
# LOCAL_SRC_FILES := $(addprefix shadowsocks/src/, $(SHADOWSOCKS_SOURCES))
# LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DUDPRELAY_LOCAL -DUDPRELAY_TUNNEL \
# -DUSE_CRYPTO_OPENSSL -DANDROID -DHAVE_CONFIG_H \
# -I$(LOCAL_PATH)/libev/ \
# -I$(LOCAL_PATH)/openssl/include
#
# LOCAL_STATIC_LIBRARIES := libev libcrypto
#
# LOCAL_LDLIBS := -llog
#
# include $(BUILD_EXECUTABLE)
######################################################## ########################################################
## shadowsocks tunnel library ## shadowsocks tunnel library
######################################################## ########################################################
@@ -335,13 +304,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)
@@ -1,4 +1,4 @@
APP_ABI := armeabi-v7a x86 APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
APP_PLATFORM := android-16 APP_PLATFORM := android-16
APP_STL := stlport_static APP_STL := stlport_static
NDK_TOOLCHAIN_VERSION := 4.9 NDK_TOOLCHAIN_VERSION := 4.9

Some files were not shown because too many files have changed in this diff Show More