Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
712b764a9b | ||
|
|
019f9d30e8 | ||
|
|
26b68876f4 | ||
|
|
a494f56ce8 | ||
|
|
a433822d0a |
+1
-1
@@ -5,7 +5,7 @@ jdk:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- NDK_VERSION=r12b
|
- NDK_VERSION=r14
|
||||||
- NDK_CCACHE=ccache
|
- NDK_CCACHE=ccache
|
||||||
- GOROOT_BOOTSTRAP=$GOROOT
|
- GOROOT_BOOTSTRAP=$GOROOT
|
||||||
- ANDROID_NDK_HOME=$HOME/.android/android-ndk-${NDK_VERSION}
|
- ANDROID_NDK_HOME=$HOME/.android/android-ndk-${NDK_VERSION}
|
||||||
|
|||||||
@@ -12,15 +12,17 @@ A [shadowsocks](http://shadowsocks.org) client for Android, written in Scala.
|
|||||||
|
|
||||||
* JDK 1.8
|
* JDK 1.8
|
||||||
* SBT 0.13.0+
|
* SBT 0.13.0+
|
||||||
|
* Go 1.4+
|
||||||
* Android SDK
|
* Android SDK
|
||||||
- Build Tools 25+
|
- Build Tools 25+
|
||||||
- Android Support Repository and Google Repository (see `build.sbt` for version)
|
- Android Support Repository and Google Repository (see `build.sbt` for version)
|
||||||
* Android NDK r12b+
|
* Android NDK r14+
|
||||||
|
|
||||||
### BUILD
|
### BUILD
|
||||||
|
|
||||||
* Set environment variable `ANDROID_HOME` to `/path/to/android-sdk`
|
* Set environment variable `ANDROID_HOME` to `/path/to/android-sdk`
|
||||||
* Set environment variable `ANDROID_NDK_HOME` to `/path/to/android-ndk`
|
* (optional) Set environment variable `ANDROID_NDK_HOME` to `/path/to/android-ndk` (default: `$ANDROID_HOME/ndk-bundle`)
|
||||||
|
* Set environment variable `GOROOT_BOOTSTRAP` to `/path/to/go`
|
||||||
* Create your key following the instructions at https://developer.android.com/studio/publish/app-signing.html
|
* Create your key following the instructions at https://developer.android.com/studio/publish/app-signing.html
|
||||||
* Create `mobile/local.properties` from `mobile/local.properties.example` with your own key information
|
* Create `mobile/local.properties` from `mobile/local.properties.example` with your own key information
|
||||||
* Invoke the building like this
|
* Invoke the building like this
|
||||||
@@ -29,7 +31,7 @@ A [shadowsocks](http://shadowsocks.org) client for Android, written in Scala.
|
|||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
# Build the App
|
# Build the App
|
||||||
sbt clean android:package-release
|
sbt clean go-build android:package-release
|
||||||
```
|
```
|
||||||
|
|
||||||
### TRANSLATE
|
### TRANSLATE
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@ enablePlugins(AndroidApp)
|
|||||||
android.useSupportVectors
|
android.useSupportVectors
|
||||||
|
|
||||||
name := "shadowsocks"
|
name := "shadowsocks"
|
||||||
version := "4.1.1"
|
version := "4.1.2"
|
||||||
versionCode := Some(181)
|
versionCode := Some(182)
|
||||||
|
|
||||||
proguardOptions ++=
|
proguardOptions ++=
|
||||||
"-keep class com.github.shadowsocks.JniHelper { *; }" ::
|
"-keep class com.github.shadowsocks.JniHelper { *; }" ::
|
||||||
|
|||||||
@@ -97,7 +97,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 -I$(LOCAL_PATH)/libevent \
|
LOCAL_CFLAGS := -O2 -D_EVENT_HAVE_ARC4RANDOM -I$(LOCAL_PATH)/libevent \
|
||||||
-I$(LOCAL_PATH)/libevent/include \
|
-I$(LOCAL_PATH)/libevent/include \
|
||||||
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_ABI := armeabi-v7a x86
|
APP_ABI := armeabi-v7a arm64-v8a x86
|
||||||
APP_PLATFORM := android-19
|
APP_PLATFORM := android-19
|
||||||
APP_STL := stlport_static
|
APP_STL := stlport_static
|
||||||
NDK_TOOLCHAIN_VERSION := clang
|
NDK_TOOLCHAIN_VERSION := clang
|
||||||
|
|||||||
@@ -342,13 +342,11 @@ trait BaseService extends Service {
|
|||||||
.put("Name", name)
|
.put("Name", name)
|
||||||
.put("Address", address + ":53")
|
.put("Address", address + ":53")
|
||||||
.put("Timeout", 6)
|
.put("Timeout", 6)
|
||||||
|
.put("EDNSClientSubnet", new JSONObject().put("Policy", "disable"))
|
||||||
if (edns) dns
|
if (edns) dns
|
||||||
.put("Protocol", "tcp")
|
.put("Protocol", "tcp")
|
||||||
.put("Socks5Address", "127.0.0.1:" + profile.localPort)
|
.put("Socks5Address", "127.0.0.1:" + profile.localPort)
|
||||||
.put("EDNSClientSubnet", new JSONObject().put("Policy", "disable"))
|
else dns.put("Protocol", "udp")
|
||||||
else dns
|
|
||||||
.put("Protocol", "udp")
|
|
||||||
.put("EDNSClientSubnet", new JSONObject().put("Policy", "disable"))
|
|
||||||
dns
|
dns
|
||||||
}
|
}
|
||||||
profile.route match {
|
profile.route match {
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ object Parser {
|
|||||||
val TAG = "ShadowParser"
|
val TAG = "ShadowParser"
|
||||||
private val pattern = "(?i)ss://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]".r
|
private val pattern = "(?i)ss://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]".r
|
||||||
private val userInfoPattern = "^(.+?):(.*)$".r
|
private val userInfoPattern = "^(.+?):(.*)$".r
|
||||||
private val legacyPattern = "^((.+?):(.*)@(.+?):(\\d+?))$".r
|
private val legacyPattern = "^(.+?):(.*)@(.+?):(\\d+?)$".r
|
||||||
|
|
||||||
def findAll(data: CharSequence): Iterator[Profile] =
|
def findAll(data: CharSequence): Iterator[Profile] =
|
||||||
pattern.findAllMatchIn(if (data == null) "" else data).map(m => {
|
pattern.findAllMatchIn(if (data == null) "" else data).map(m => {
|
||||||
val uri = Uri.parse(m.matched)
|
val uri = Uri.parse(m.matched)
|
||||||
uri.getUserInfo match {
|
uri.getUserInfo match {
|
||||||
case null => new String(Base64.decode(uri.getHost, Base64.NO_PADDING), "UTF-8") match {
|
case null => val str = new String(Base64.decode(uri.getHost, Base64.NO_PADDING), "UTF-8"); str match {
|
||||||
case legacyPattern(_, method, password, host, port) => // legacy uri
|
case legacyPattern(method, password, host, port) => // legacy uri
|
||||||
val profile = new Profile
|
val profile = new Profile
|
||||||
profile.method = method.toLowerCase
|
profile.method = method.toLowerCase
|
||||||
profile.password = password
|
profile.password = password
|
||||||
|
|||||||
+1
-1
Submodule mobile/src/overture updated: 5cb3f8c9e1...862ce347e1
Reference in New Issue
Block a user