Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04e0cb02b5 | ||
|
|
1cec7299e8 | ||
|
|
e634083820 | ||
|
|
d8775d4420 | ||
|
|
41da705fc2 | ||
|
|
911eb3dab3 | ||
|
|
a31befef7f | ||
|
|
4d4d6ed1a0 | ||
|
|
a8222317d7 | ||
|
|
b3bab982a8 | ||
|
|
6fb7330e36 | ||
|
|
974c254460 | ||
|
|
c0aff7dda1 | ||
|
|
f6253d2eba | ||
|
|
cbb0345e5b | ||
|
|
128d47aba1 | ||
|
|
e3ad38318d | ||
|
|
77296cbd3e | ||
|
|
14745317d0 | ||
|
|
9e6948caf6 | ||
|
|
18302e1c40 | ||
|
|
340e9cfffa | ||
|
|
36faaad44d | ||
|
|
4c45c923be | ||
|
|
2181e664ef | ||
|
|
56e4f153ed | ||
|
|
2e3baa727d | ||
|
|
7491a667a5 | ||
|
|
1041dc370a | ||
|
|
d734e9fd4e | ||
|
|
0e85514c76 | ||
|
|
7e6cc4e846 | ||
|
|
4f3c7dd8fd | ||
|
|
923374a28b | ||
|
|
7d3f6096b7 | ||
|
|
c7c72c6543 | ||
|
|
b95bee968a | ||
|
|
99d97d1dbd | ||
|
|
b78c10e8cc | ||
|
|
91be4146f9 | ||
|
|
77a06cb519 | ||
|
|
6eb6c571ac | ||
|
|
01c5e8bb6f | ||
|
|
70e0b3991d | ||
|
|
0ffae32a44 | ||
|
|
c54745e241 | ||
|
|
e3cf54f703 | ||
|
|
d5be325ab5 | ||
|
|
a38c9920c3 | ||
|
|
1887c6ffb0 | ||
|
|
5ead55d67a | ||
|
|
a03ef5dfe9 | ||
|
|
f6bbaa7251 | ||
|
|
2798eddaa7 | ||
|
|
044f6f1fce | ||
|
|
0030c29b62 | ||
|
|
2c1c4b9b4f | ||
|
|
f2c260a438 | ||
|
|
d2d1796852 | ||
|
|
c7b242789d | ||
|
|
1c53181c9c | ||
|
|
bcbd860457 | ||
|
|
33d8139f57 | ||
|
|
5a8493e0b1 | ||
|
|
3c3e531718 | ||
|
|
1f6d6bbd14 | ||
|
|
c25433e2da | ||
|
|
0b68faf672 | ||
|
|
7978bcedbf | ||
|
|
eb3b01053e | ||
|
|
17bedaffcd | ||
|
|
49fbfcc2ac | ||
|
|
c2930bfe04 | ||
|
|
e7cc5ad0ba | ||
|
|
f81b16ead6 | ||
|
|
162fcb47bc | ||
|
|
67fab0392f | ||
|
|
bf89e202d1 | ||
|
|
050cc7a018 | ||
|
|
7e92e1ac0d | ||
|
|
1758f360c0 | ||
|
|
e32ac67794 | ||
|
|
5434193903 | ||
|
|
2efb6fb4c6 | ||
|
|
5d744066ac | ||
|
|
b897e4d044 | ||
|
|
5206b4c1f1 | ||
|
|
694be8abbe | ||
|
|
0a2d374de2 | ||
|
|
9dec28a022 | ||
|
|
5a6e45a2a7 | ||
|
|
6d536a901b | ||
|
|
57be4055d3 | ||
|
|
2d9102719e | ||
|
|
5e9f78d31a | ||
|
|
f4026e5a86 | ||
|
|
fb98b3e4a1 | ||
|
|
f629c432b0 | ||
|
|
4c15d27a99 | ||
|
|
341c85049b | ||
|
|
35d7611524 | ||
|
|
d10acf52ec | ||
|
|
0234acbf5f | ||
|
|
292c76b227 | ||
|
|
a67c29314e | ||
|
|
0fc9c6fb8a | ||
|
|
82a3e429d1 | ||
|
|
b4425e3b06 | ||
|
|
ac2b668a4b | ||
|
|
8374a8cdcc | ||
|
|
7feb049f4b | ||
|
|
5bc7c9f8cc | ||
|
|
115fbcb2fe | ||
|
|
69d2bc1ee5 | ||
|
|
af9e8c786d | ||
|
|
5ca3baac95 | ||
|
|
878c53ee30 | ||
|
|
eb7e608d0b | ||
|
|
ef6a9e7727 | ||
|
|
2edc14a695 | ||
|
|
bc94adef38 | ||
|
|
dd8031519c | ||
|
|
b0412b4f1f | ||
|
|
7e94e25d49 | ||
|
|
068906cd0f | ||
|
|
e24c2256af | ||
|
|
d78e823ce2 | ||
|
|
8e46be5900 | ||
|
|
2e73741825 | ||
|
|
022b6da9c9 | ||
|
|
622cef048c |
@@ -0,0 +1,48 @@
|
||||
### Troubleshooting
|
||||
|
||||
Cannot connect to server:
|
||||
|
||||
1. Stop battery saver if it's active;
|
||||
2. If an upgrade breaks anything, do a manual reset first by pressing Reset at the end of the list;
|
||||
3. Check your config;
|
||||
4. Wipe app data.
|
||||
|
||||
Crash: [Submit an issue](https://github.com/shadowsocks/shadowsocks-android/issues/new) with logcat attached, or submit a crash report to Google Play. Then, try wiping app data.
|
||||
|
||||
### UI tips
|
||||
|
||||
* Tap the number to enter the port you wish to use; (if the keyboard doesn't pop up automatically for some reason)
|
||||
* Use Tasker integration to create a desktop widget.
|
||||
|
||||
### Why is NAT mode deprecated?
|
||||
|
||||
1. Requiring ROOT permission;
|
||||
2. No IPv6 support;
|
||||
3. No UDP relay support.
|
||||
|
||||
### How to remove the exclamation mark when using VPN mode?
|
||||
|
||||
The exclamation mark in the Wi-Fi/cellular icon appears because the system fails to connect to portal server (defaults to `clients3.google.com`) without VPN connection. To remove it, follow the instructions in [this article](https://www.noisyfox.cn/45.html). (in Simplified Chinese)
|
||||
|
||||
### Why are MIUI, EMUI and other AOSPs in China not officially supported?
|
||||
|
||||
1. Broken VPNService implementation, especially for IPv6;
|
||||
2. Aggressive (or called broken) background service killing policy.
|
||||
|
||||
Fixes for MIUI: [#772](https://github.com/shadowsocks/shadowsocks-android/issues/772)
|
||||
|
||||
### How to pause Shadowsocks service?
|
||||
|
||||
* For Android 7.0+: Use quick switch tile in Quick Settings;
|
||||
* Use Tasker integration;
|
||||
* Add a profile with per-app proxy enabled for Shadowsocks only, bypass mode off.
|
||||
|
||||
### Why does Shadowsocks consume so much battery on Android 5.0+?
|
||||
|
||||
As Shadowsocks takes over the whole device network, any battery used by network activities from other apps are also counted as those from Shadowsocks. So, the battery usage of Shadowsocks equals to the sum of all the network activities of your device. Shadowsocks itself is a totally I/O bound application on modern Android devices, which is expected not to consume any notable battery.
|
||||
|
||||
So if you notice a significant increase in battery usage after you use Shadowsocks, it's most likely caused by other apps. For example, Google Play services can consume more battery after being able to connecting to Google, etc.
|
||||
|
||||
### It works fine under Wi-Fi but can't connect through cellular data?
|
||||
|
||||
Allow this app to consume background data in app settings.
|
||||
@@ -1,4 +1,4 @@
|
||||
Please read FAQ in wiki then answer these questions before submitting your issue. Thanks!
|
||||
Please read FAQ then answer these questions before submitting your issue. Thanks!
|
||||
|
||||
### Environment
|
||||
|
||||
@@ -25,11 +25,12 @@ _Put an `x` inside the [ ] that applies._
|
||||
* [ ] Bypass LAN & China
|
||||
* [ ] GFW List
|
||||
* [ ] China List
|
||||
* [ ] Custom rules
|
||||
* [ ] IPv6 route
|
||||
* [ ] Per-App Proxy
|
||||
* [ ] Bypass mode
|
||||
* [ ] UDP Forwarding
|
||||
* KCP Parameters: (leave blank if not enabled)
|
||||
* Plugin configuration (if applicable):
|
||||
* [ ] Auto Connect
|
||||
* [ ] TCP Fast Open
|
||||
* [ ] NAT mode
|
||||
|
||||
@@ -1,33 +1,11 @@
|
||||
classes
|
||||
bin
|
||||
gen
|
||||
target
|
||||
local.properties
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
tests/bin
|
||||
tests/gen
|
||||
tests/local.properties
|
||||
NUL
|
||||
gen_*
|
||||
*.class
|
||||
*.o
|
||||
local.sbt
|
||||
.deps
|
||||
/proguard-sbt.txt
|
||||
|
||||
#Intellij IDEA
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
out/
|
||||
.d
|
||||
|
||||
#NDK
|
||||
src/main/obj
|
||||
src/main/libs
|
||||
src/main/assets/armeabi-v7a/*
|
||||
src/main/assets/x86/*
|
||||
jni/Application.mk
|
||||
mobile/src/main/libs
|
||||
mobile/src/main/obj
|
||||
|
||||
@@ -1,35 +1,38 @@
|
||||
[submodule "src/main/jni/shadowsocks-libev"]
|
||||
path = src/main/jni/shadowsocks-libev
|
||||
[submodule "mobile/src/main/jni/shadowsocks-libev"]
|
||||
path = mobile/src/main/jni/shadowsocks-libev
|
||||
url = https://github.com/shadowsocks/shadowsocks-libev
|
||||
[submodule "src/main/jni/badvpn"]
|
||||
path = src/main/jni/badvpn
|
||||
[submodule "mobile/src/main/jni/badvpn"]
|
||||
path = mobile/src/main/jni/badvpn
|
||||
url = https://github.com/shadowsocks/badvpn.git
|
||||
branch = shadowsocks-android
|
||||
[submodule "src/main/jni/libancillary"]
|
||||
path = src/main/jni/libancillary
|
||||
[submodule "mobile/src/main/jni/libancillary"]
|
||||
path = mobile/src/main/jni/libancillary
|
||||
url = https://github.com/shadowsocks/libancillary.git
|
||||
branch = shadowsocks-android
|
||||
[submodule "src/main/jni/libevent"]
|
||||
path = src/main/jni/libevent
|
||||
[submodule "mobile/src/main/jni/libevent"]
|
||||
path = mobile/src/main/jni/libevent
|
||||
url = https://github.com/shadowsocks/libevent.git
|
||||
branch = shadowsocks-android
|
||||
[submodule "src/main/jni/redsocks"]
|
||||
path = src/main/jni/redsocks
|
||||
[submodule "mobile/src/main/jni/redsocks"]
|
||||
path = mobile/src/main/jni/redsocks
|
||||
url = https://github.com/shadowsocks/redsocks.git
|
||||
branch = shadowsocks-android
|
||||
[submodule "src/main/jni/pdnsd"]
|
||||
path = src/main/jni/pdnsd
|
||||
[submodule "mobile/src/main/jni/pdnsd"]
|
||||
path = mobile/src/main/jni/pdnsd
|
||||
url = https://github.com/shadowsocks/pdnsd.git
|
||||
branch = shadowsocks-android
|
||||
[submodule "kcptun/kcptun"]
|
||||
path = kcptun/kcptun
|
||||
url = https://github.com/shadowsocks/kcptun
|
||||
[submodule "kcptun/go"]
|
||||
path = kcptun/go
|
||||
url = https://github.com/shadowsocks/go
|
||||
[submodule "src/main/jni/mbedtls"]
|
||||
path = src/main/jni/mbedtls
|
||||
[submodule "mobile/src/main/jni/mbedtls"]
|
||||
path = mobile/src/main/jni/mbedtls
|
||||
url = https://github.com/ARMmbed/mbedtls
|
||||
[submodule "src/main/jni/pcre"]
|
||||
path = src/main/jni/pcre
|
||||
[submodule "mobile/src/main/jni/pcre"]
|
||||
path = mobile/src/main/jni/pcre
|
||||
url = https://android.googlesource.com/platform/external/pcre
|
||||
[submodule "mobile/src/main/jni/libsodium"]
|
||||
path = mobile/src/main/jni/libsodium
|
||||
url = https://github.com/shadowsocks/libsodium.git
|
||||
[submodule "mobile/src/main/jni/libev"]
|
||||
path = mobile/src/main/jni/libev
|
||||
url = https://github.com/shadowsocks/libev.git
|
||||
[submodule "mobile/src/main/jni/libudns"]
|
||||
path = mobile/src/main/jni/libudns
|
||||
url = https://github.com/shadowsocks/libudns.git
|
||||
|
||||
@@ -7,7 +7,6 @@ env:
|
||||
global:
|
||||
- NDK_VERSION=r12b
|
||||
- NDK_CCACHE=ccache
|
||||
- GOROOT_BOOTSTRAP=$GOROOT
|
||||
- ANDROID_NDK_HOME=$HOME/.android/android-ndk-${NDK_VERSION}
|
||||
- SBTPATH=$HOME/.sbt
|
||||
- PATH=${ANDROID_NDK_HOME}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}
|
||||
@@ -50,4 +49,4 @@ install:
|
||||
fi
|
||||
|
||||
script:
|
||||
- $SBTPATH/sbt native-build android:package-debug
|
||||
- $SBTPATH/sbt android:package
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Copyright (C) 2016 by Max Lv <max.c.lv@gmail.com>
|
||||
Copyright (C) 2016 by Mygod Studio <contact-shadowsocks-android@mygod.be>
|
||||
Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com>
|
||||
Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod.be>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -12,7 +12,6 @@ A [shadowsocks](http://shadowsocks.org) client for Android, written in Scala.
|
||||
|
||||
* JDK 1.8
|
||||
* SBT 0.13.0+
|
||||
* Go 1.4+
|
||||
* Android SDK
|
||||
- Build Tools 25+
|
||||
- Android Support Repository and Google Repository (see `build.sbt` for version)
|
||||
@@ -22,33 +21,45 @@ A [shadowsocks](http://shadowsocks.org) client for Android, written in Scala.
|
||||
|
||||
* Set environment variable `ANDROID_HOME` to `/path/to/android-sdk`
|
||||
* Set environment variable `ANDROID_NDK_HOME` to `/path/to/android-ndk`
|
||||
* 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 `local.properties` from `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
|
||||
|
||||
```bash
|
||||
git submodule update --init
|
||||
git submodule update --init --recursive
|
||||
|
||||
# Build the App
|
||||
sbt native-build clean android:package-release
|
||||
sbt clean android:package-release
|
||||
```
|
||||
|
||||
### TRANSLATE
|
||||
|
||||
Translators can go to [POEditor](https://poeditor.com/join/project/u5VHO9vhSf) to help translate shadowsocks-android. Guidelines:
|
||||
|
||||
* It's okay to leave some strings untranslated if you think it should use the same string as English (US).
|
||||
* `faq_url` should not be changed. If you'd like to translate FAQ, submit a pull request with the translated [`faq.md`](https://github.com/shadowsocks/shadowsocks-android/blob/master/.github/faq.md) (it should be named properly, e.g. `.github/faq.zh-CN.md`). Administrators will take care of the rest.
|
||||
* Do not add/edit/remove comments.
|
||||
|
||||
## OPEN SOURCE LICENSES
|
||||
|
||||
* shadowsocks-libev: [GPLv3](https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE)
|
||||
* tun2socks: [BSD](https://github.com/shadowsocks/badvpn/blob/shadowsocks-android/COPYING)
|
||||
* redsocks: [APL 2.0](https://github.com/shadowsocks/redsocks/blob/master/README)
|
||||
* OpenSSL: [OpenSSL](https://github.com/shadowsocks/openssl-android/blob/master/NOTICE)
|
||||
* pdnsd: [GPLv3](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/pdnsd/COPYING)
|
||||
* libev: [GPLv2](https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libev/LICENSE)
|
||||
* libevent: [BSD](https://github.com/shadowsocks/libevent/blob/master/LICENSE)
|
||||
* kcptun: [MIT](https://github.com/xtaci/kcptun)
|
||||
<ul>
|
||||
<li>redsocks: <a href="https://github.com/shadowsocks/redsocks/blob/shadowsocks-android/README">APL 2.0</a></li>
|
||||
<li>mbed TLS: <a href="https://github.com/ARMmbed/mbedtls/blob/development/LICENSE">APL 2.0</a></li>
|
||||
<li>libevent: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libevent/LICENSE">BSD</a></li>
|
||||
<li>tun2socks: <a href="https://github.com/shadowsocks/badvpn/blob/shadowsocks-android/COPYING">BSD</a></li>
|
||||
<li>pcre: <a href="https://android.googlesource.com/platform/external/pcre/+/master/dist2/LICENCE">BSD</a></li>
|
||||
<li>libancillary: <a href="https://github.com/shadowsocks/libancillary/blob/shadowsocks-android/COPYING">BSD</a></li>
|
||||
<li>shadowsocks-libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE">GPLv3</a></li>
|
||||
<li>pdnsd: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/pdnsd/COPYING">GPLv3</a></li>
|
||||
<li>libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/libev/LICENSE">GPLv2</a></li>
|
||||
<li>libsodium: <a href="https://github.com/jedisct1/libsodium/blob/master/LICENSE">ISC</a></li>
|
||||
<li>libudns: <a href="https://github.com/shadowsocks/libudns/blob/master/COPYING.LGPL">LGPL</a></li>
|
||||
</ul>
|
||||
|
||||
### LICENSE
|
||||
|
||||
Copyright (C) 2016 by Max Lv <<max.c.lv@gmail.com>>
|
||||
Copyright (C) 2016 by Mygod Studio <<contact-shadowsocks-android@mygod.be>>
|
||||
Copyright (C) 2017 by Max Lv <<max.c.lv@gmail.com>>
|
||||
Copyright (C) 2017 by Mygod Studio <<contact-shadowsocks-android@mygod.be>>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,65 +1,45 @@
|
||||
scalaVersion := "2.11.8"
|
||||
dexMaxHeap := "4g"
|
||||
lazy val commonSettings = Seq(
|
||||
scalaVersion := "2.11.8",
|
||||
dexMaxHeap := "4g",
|
||||
|
||||
enablePlugins(AndroidApp)
|
||||
android.useSupportVectors
|
||||
organization := "com.github.shadowsocks",
|
||||
|
||||
name := "shadowsocks"
|
||||
version := "3.4.0"
|
||||
versionCode := Some(172)
|
||||
platformTarget := "android-25",
|
||||
|
||||
platformTarget := "android-25"
|
||||
compileOrder := CompileOrder.JavaThenScala,
|
||||
javacOptions ++= "-source" :: "1.7" :: "-target" :: "1.7" :: Nil,
|
||||
scalacOptions ++= "-target:jvm-1.7" :: "-Xexperimental" :: Nil,
|
||||
ndkArgs := "-j" :: java.lang.Runtime.getRuntime.availableProcessors.toString :: Nil,
|
||||
|
||||
compileOrder := CompileOrder.JavaThenScala
|
||||
javacOptions ++= "-source" :: "1.7" :: "-target" :: "1.7" :: Nil
|
||||
scalacOptions ++= "-target:jvm-1.7" :: "-Xexperimental" :: Nil
|
||||
ndkJavah := Seq()
|
||||
ndkBuild := Seq()
|
||||
proguardVersion := "5.3.2",
|
||||
proguardCache := Seq(),
|
||||
|
||||
proguardVersion := "5.3.2"
|
||||
proguardCache := Seq()
|
||||
proguardOptions ++=
|
||||
"-keep class com.github.shadowsocks.System { *; }" ::
|
||||
"-dontwarn com.google.android.gms.internal.**" ::
|
||||
"-dontwarn com.j256.ormlite.**" ::
|
||||
"-dontwarn okio.**" ::
|
||||
"-dontwarn org.xbill.**" ::
|
||||
Nil
|
||||
shrinkResources := true,
|
||||
typedResources := false
|
||||
)
|
||||
|
||||
shrinkResources := true
|
||||
typedResources := false
|
||||
resConfigs := Seq("ja", "ru", "zh-rCN", "zh-rTW")
|
||||
val supportLibsVersion = "25.1.0"
|
||||
lazy val root = Project(id = "shadowsocks-android", base = file("."))
|
||||
.settings(commonSettings)
|
||||
.aggregate(plugin, mobile)
|
||||
|
||||
resolvers += Resolver.jcenterRepo
|
||||
libraryDependencies ++=
|
||||
"com.android.support" % "cardview-v7" % "25.1.0" ::
|
||||
"com.android.support" % "design" % "25.1.0" ::
|
||||
"com.android.support" % "gridlayout-v7" % "25.1.0" ::
|
||||
"com.android.support" % "preference-v14" % "25.1.0" ::
|
||||
"com.evernote" % "android-job" % "1.1.3" ::
|
||||
"com.github.jorgecastilloprz" % "fabprogresscircle" % "1.01" ::
|
||||
"com.google.android.gms" % "play-services-ads" % "10.0.1" ::
|
||||
"com.google.android.gms" % "play-services-analytics" % "10.0.1" ::
|
||||
"com.google.android.gms" % "play-services-gcm" % "10.0.1" ::
|
||||
"com.j256.ormlite" % "ormlite-android" % "5.0" ::
|
||||
"com.mikepenz" % "crossfader" % "1.5.0" ::
|
||||
"com.mikepenz" % "fastadapter" % "2.1.5" ::
|
||||
"com.mikepenz" % "iconics-core" % "2.8.2" ::
|
||||
"com.mikepenz" % "materialdrawer" % "5.8.1" ::
|
||||
"com.mikepenz" % "materialize" % "1.0.0" ::
|
||||
"com.squareup.okhttp3" % "okhttp" % "3.5.0" ::
|
||||
"com.twofortyfouram" % "android-plugin-api-for-locale" % "1.0.2" ::
|
||||
"dnsjava" % "dnsjava" % "2.1.7" ::
|
||||
"eu.chainfire" % "libsuperuser" % "1.0.0.201608240809" ::
|
||||
"com.google.zxing" % "android-integration" % "3.2.1" ::
|
||||
"net.glxn.qrgen" % "android" % "2.0" ::
|
||||
Nil
|
||||
install in Android := (install in (mobile, Android)).value
|
||||
run in Android := (run in (mobile, Android)).evaluated
|
||||
|
||||
lazy val nativeBuild = TaskKey[Unit]("native-build", "Build native executables")
|
||||
nativeBuild := {
|
||||
val logger = streams.value.log
|
||||
Process("./build.sh") ! logger match {
|
||||
case 0 => // Success!
|
||||
case n => sys.error(s"Native build script exit code: $n")
|
||||
}
|
||||
}
|
||||
lazy val plugin = project
|
||||
.settings(commonSettings)
|
||||
.settings(
|
||||
libraryDependencies += "com.android.support" % "preference-v14" % supportLibsVersion
|
||||
)
|
||||
|
||||
lazy val mobile = project
|
||||
.settings(commonSettings)
|
||||
.settings(
|
||||
libraryDependencies ++=
|
||||
"com.android.support" % "cardview-v7" % supportLibsVersion ::
|
||||
"com.android.support" % "customtabs" % supportLibsVersion ::
|
||||
"com.android.support" % "design" % supportLibsVersion ::
|
||||
"com.android.support" % "gridlayout-v7" % supportLibsVersion ::
|
||||
Nil
|
||||
)
|
||||
.dependsOn(plugin)
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
# Build native binaries
|
||||
pushd src/main
|
||||
try $ANDROID_NDK_HOME/ndk-build -j8
|
||||
|
||||
rm -rf assets/armeabi-v7a
|
||||
rm -rf assets/x86
|
||||
mkdir -p assets/armeabi-v7a
|
||||
mkdir -p assets/x86
|
||||
|
||||
#copy executables
|
||||
for app in pdnsd redsocks ss-local ss-tunnel tun2socks
|
||||
do
|
||||
echo $app
|
||||
try mv libs/armeabi-v7a/$app assets/armeabi-v7a/
|
||||
try mv libs/x86/$app assets/x86/
|
||||
done
|
||||
popd
|
||||
|
||||
# Build kcptun
|
||||
pushd kcptun
|
||||
try ./make.bash
|
||||
popd
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function try () {
|
||||
"$@" || exit -1
|
||||
}
|
||||
|
||||
[ -z "$ANDROID_NDK_HOME" ] && ANDROID_NDK_HOME=~/android-ndk-r12b
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DEPS=$DIR/.deps
|
||||
ANDROID_ARM_TOOLCHAIN=$DEPS/android-toolchain-16-arm
|
||||
ANDROID_X86_TOOLCHAIN=$DEPS/android-toolchain-16-x86
|
||||
|
||||
ANDROID_ARM_CC=$ANDROID_ARM_TOOLCHAIN/bin/arm-linux-androideabi-gcc
|
||||
ANDROID_ARM_STRIP=$ANDROID_ARM_TOOLCHAIN/bin/arm-linux-androideabi-strip
|
||||
|
||||
ANDROID_X86_CC=$ANDROID_X86_TOOLCHAIN/bin/i686-linux-android-gcc
|
||||
ANDROID_X86_STRIP=$ANDROID_X86_TOOLCHAIN/bin/i686-linux-android-strip
|
||||
|
||||
|
||||
if [ ! -d "$DEPS" ]; then
|
||||
mkdir -p $DEPS
|
||||
fi
|
||||
|
||||
if [ ! -d "$ANDROID_ARM_TOOLCHAIN" ]; then
|
||||
echo "Make standalone toolchain for ARM arch"
|
||||
$ANDROID_NDK_HOME/build/tools/make_standalone_toolchain.py --arch arm \
|
||||
--api 16 --install-dir $ANDROID_ARM_TOOLCHAIN
|
||||
fi
|
||||
|
||||
if [ ! -d "$ANDROID_X86_TOOLCHAIN" ]; then
|
||||
echo "Make standalone toolchain for X86 arch"
|
||||
$ANDROID_NDK_HOME/build/tools/make_standalone_toolchain.py --arch x86 \
|
||||
--api 16 --install-dir $ANDROID_X86_TOOLCHAIN
|
||||
fi
|
||||
|
||||
if [ ! -d "$DIR/go/bin" ]; then
|
||||
echo "Build the custom go"
|
||||
|
||||
pushd $DIR/go/src
|
||||
try ./make.bash
|
||||
popd
|
||||
fi
|
||||
|
||||
export GOROOT=$DIR/go
|
||||
export GOPATH=$DEPS/gopath
|
||||
export GOBIN=$GOPATH/bin
|
||||
mkdir -p $GOBIN
|
||||
export PATH=$GOROOT/bin:$PATH
|
||||
|
||||
pushd kcptun/client
|
||||
|
||||
echo "Get dependences for kcptun"
|
||||
go get -u github.com/xtaci/kcp-go
|
||||
go get -u github.com/xtaci/smux
|
||||
go get
|
||||
|
||||
echo "Cross compile kcptun for arm"
|
||||
try env CGO_ENABLED=1 CC=$ANDROID_ARM_CC GOOS=android GOARCH=arm GOARM=7 go build -ldflags="-s -w"
|
||||
try $ANDROID_ARM_STRIP client
|
||||
try mv client $DIR/../src/main/assets/armeabi-v7a/kcptun
|
||||
|
||||
echo "Cross compile kcptun for x86"
|
||||
try env CGO_ENABLED=1 CC=$ANDROID_X86_CC GOOS=android GOARCH=386 go build -ldflags="-s -w"
|
||||
try $ANDROID_X86_STRIP client
|
||||
try mv client $DIR/../src/main/assets/x86/kcptun
|
||||
popd
|
||||
|
||||
echo "Successfully build kcptun"
|
||||
@@ -0,0 +1,38 @@
|
||||
enablePlugins(AndroidApp)
|
||||
android.useSupportVectors
|
||||
|
||||
name := "shadowsocks"
|
||||
version := "4.0.0"
|
||||
versionCode := Some(175)
|
||||
|
||||
proguardOptions ++=
|
||||
"-keep class com.github.shadowsocks.System { *; }" ::
|
||||
"-dontwarn com.google.android.gms.internal.**" ::
|
||||
"-dontwarn com.j256.ormlite.**" ::
|
||||
"-dontwarn okio.**" ::
|
||||
"-dontwarn org.xbill.**" ::
|
||||
Nil
|
||||
|
||||
resConfigs := Seq("ja", "ru", "zh-rCN", "zh-rTW")
|
||||
|
||||
val playServicesVersion = "10.0.1"
|
||||
resolvers += Resolver.jcenterRepo
|
||||
libraryDependencies ++=
|
||||
"com.futuremind.recyclerfastscroll" % "fastscroll" % "0.2.5" ::
|
||||
"com.evernote" % "android-job" % "1.1.4" ::
|
||||
"com.github.jorgecastilloprz" % "fabprogresscircle" % "1.01" ::
|
||||
"com.google.android.gms" % "play-services-ads" % playServicesVersion ::
|
||||
"com.google.android.gms" % "play-services-analytics" % playServicesVersion ::
|
||||
"com.google.android.gms" % "play-services-gcm" % playServicesVersion ::
|
||||
"com.j256.ormlite" % "ormlite-android" % "5.0" ::
|
||||
"com.mikepenz" % "crossfader" % "1.5.0" ::
|
||||
"com.mikepenz" % "fastadapter" % "2.1.5" ::
|
||||
"com.mikepenz" % "iconics-core" % "2.8.2" ::
|
||||
"com.mikepenz" % "materialdrawer" % "5.8.1" ::
|
||||
"com.mikepenz" % "materialize" % "1.0.0" ::
|
||||
"com.squareup.okhttp3" % "okhttp" % "3.5.0" ::
|
||||
"com.twofortyfouram" % "android-plugin-api-for-locale" % "1.0.2" ::
|
||||
"dnsjava" % "dnsjava" % "2.1.7" ::
|
||||
"eu.chainfire" % "libsuperuser" % "1.0.0.201608240809" ::
|
||||
"net.glxn.qrgen" % "android" % "2.0" ::
|
||||
Nil
|
||||
@@ -2,14 +2,11 @@
|
||||
xmlns:tools="http://schemas.android.com/tools" package="com.github.shadowsocks">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen"
|
||||
android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.camera"
|
||||
android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.nfc"
|
||||
android:required="false"/>
|
||||
<uses-feature android:name="android.software.leanback"
|
||||
@@ -20,15 +17,10 @@
|
||||
android:targetSdkVersion="25"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:extractNativeLibs="false"
|
||||
android:name=".ShadowsocksApplication"
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:backupAgent=".ShadowsocksBackupAgent"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.Material"
|
||||
android:banner="@drawable/ic_start_connected">
|
||||
|
||||
<meta-data android:name="com.google.android.gms.version"
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.github.shadowsocks.aidl;
|
||||
|
||||
interface IShadowsocksServiceCallback {
|
||||
oneway void stateChanged(int state, String profileName, String msg);
|
||||
oneway void trafficUpdated(int profileId, long txRate, long rxRate, long txTotal, long rxTotal);
|
||||
// Traffic data has persisted to database, listener should refetch their data from database
|
||||
oneway void trafficPersisted(int profileId);
|
||||
}
|
||||
@@ -4780,6 +4780,7 @@
|
||||
^(.*\.)?googlezip\.net$
|
||||
^(.*\.)?gvt0\.com$
|
||||
^(.*\.)?gvt1\.com$
|
||||
^(.*\.)?gvt2\.com$
|
||||
^(.*\.)?gvt3\.com$
|
||||
^(.*\.)?html5rocks\.com$
|
||||
^(.*\.)?iam\.soy$
|
||||
@@ -4794,6 +4794,7 @@
|
||||
^(.*\.)?googlezip\.net$
|
||||
^(.*\.)?gvt0\.com$
|
||||
^(.*\.)?gvt1\.com$
|
||||
^(.*\.)?gvt2\.com$
|
||||
^(.*\.)?gvt3\.com$
|
||||
^(.*\.)?html5rocks\.com$
|
||||
^(.*\.)?iam\.soy$
|
||||
@@ -274,8 +274,8 @@ img {
|
||||
</head>
|
||||
<body>
|
||||
<p>A <a href="http://shadowsocks.org">Shadowsocks</a> client for Android, written in Scala.</p>
|
||||
<p>Copyright (C) 2016 by Max Lv <a href="mailto:max.c.lv@gmail.com">max.c.lv@gmail.com</a></p>
|
||||
<p>Copyright (C) 2016 by Mygod Studio <a href="contact-shadowsocks-android@mygod.be">contact-shadowsocks-android@mygod.be</a></p>
|
||||
<p>Copyright (C) 2017 by Max Lv <a href="mailto:max.c.lv@gmail.com">max.c.lv@gmail.com</a></p>
|
||||
<p>Copyright (C) 2017 by Mygod Studio <a href="contact-shadowsocks-android@mygod.be">contact-shadowsocks-android@mygod.be</a></p>
|
||||
<p>This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
@@ -289,14 +289,17 @@ along with this program. If not, see <a href="http://www.gnu.org/licenses/">http
|
||||
|
||||
<h3>Open Source Licenses</h3>
|
||||
<ul>
|
||||
<li>shadowsocks-libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE">GPLv3</a></li>
|
||||
<li>tun2socks: <a href="https://github.com/shadowsocks/badvpn/blob/shadowsocks-android/COPYING">BSD</a></li>
|
||||
<li>redsocks: <a href="https://github.com/shadowsocks/redsocks/blob/shadowsocks-android/README">APL 2.0</a></li>
|
||||
<li>OpenSSL: <a href="https://github.com/shadowsocks/openssl-android/blob/master/NOTICE">OpenSSL</a></li>
|
||||
<li>pdnsd: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/pdnsd/COPYING">GPLv3</a></li>
|
||||
<li>libev: <a href="https://github.com/shadowsocks/libevent/blob/shadowsocks-android/LICENSE">GPLv2</a></li>
|
||||
<li>mbed TLS: <a href="https://github.com/ARMmbed/mbedtls/blob/development/LICENSE">APL 2.0</a></li>
|
||||
<li>libevent: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/libevent/LICENSE">BSD</a></li>
|
||||
<li>kcptun: <a href="https://github.com/xtaci/kcptun/commits/master/LICENSE.md">MIT</a></li>
|
||||
<li>tun2socks: <a href="https://github.com/shadowsocks/badvpn/blob/shadowsocks-android/COPYING">BSD</a></li>
|
||||
<li>pcre: <a href="https://android.googlesource.com/platform/external/pcre/+/master/dist2/LICENCE">BSD</a></li>
|
||||
<li>libancillary: <a href="https://github.com/shadowsocks/libancillary/blob/shadowsocks-android/COPYING">BSD</a></li>
|
||||
<li>shadowsocks-libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/LICENSE">GPLv3</a></li>
|
||||
<li>pdnsd: <a href="https://github.com/shadowsocks/shadowsocks-android/blob/master/src/main/jni/pdnsd/COPYING">GPLv3</a></li>
|
||||
<li>libev: <a href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/libev/LICENSE">GPLv2</a></li>
|
||||
<li>libsodium: <a href="https://github.com/jedisct1/libsodium/blob/master/LICENSE">ISC</a></li>
|
||||
<li>libudns: <a href="https://github.com/shadowsocks/libudns/blob/master/COPYING.LGPL">LGPL</a></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@@ -44,7 +44,6 @@ public class System {
|
||||
}
|
||||
|
||||
public static native int exec(String cmd);
|
||||
public static native String getABI();
|
||||
public static native int sendfd(int fd, String path);
|
||||
public static native void jniclose(int fd);
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.github.shadowsocks.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* Commandline objects help handling command lines specifying processes to
|
||||
* execute.
|
||||
*
|
||||
* The class can be used to define a command line as nested elements or as a
|
||||
* helper to define a command line by an application.
|
||||
* <p>
|
||||
* <code>
|
||||
* <someelement><br>
|
||||
* <acommandline executable="/executable/to/run"><br>
|
||||
* <argument value="argument 1" /><br>
|
||||
* <argument line="argument_1 argument_2 argument_3" /><br>
|
||||
* <argument value="argument 4" /><br>
|
||||
* </acommandline><br>
|
||||
* </someelement><br>
|
||||
* </code>
|
||||
*
|
||||
* Based on: https://github.com/apache/ant/blob/588ce1f/src/main/org/apache/tools/ant/types/Commandline.java
|
||||
*
|
||||
* Adds support for escape character '\'.
|
||||
*
|
||||
* @author Mygod
|
||||
*/
|
||||
public final class Commandline {
|
||||
private Commandline() { }
|
||||
|
||||
/**
|
||||
* Quote the parts of the given array in way that makes them
|
||||
* usable as command line arguments.
|
||||
* @param args the list of arguments to quote.
|
||||
* @return empty string for null or no command, else every argument split
|
||||
* by spaces and quoted by quoting rules.
|
||||
*/
|
||||
public static String toString(Iterable<String> args) {
|
||||
// empty path return empty string
|
||||
if (args == null) {
|
||||
return "";
|
||||
}
|
||||
// path containing one or more elements
|
||||
final StringBuilder result = new StringBuilder();
|
||||
for (String arg : args) {
|
||||
if (result.length() > 0) result.append(' ');
|
||||
for (int j = 0; j < arg.length(); ++j) {
|
||||
char ch = arg.charAt(j);
|
||||
switch (ch) {
|
||||
case ' ': case '\\': case '"': case '\'': result.append('\\'); // intentionally no break
|
||||
default: result.append(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
/**
|
||||
* Quote the parts of the given array in way that makes them
|
||||
* usable as command line arguments.
|
||||
* @param args the list of arguments to quote.
|
||||
* @return empty string for null or no command, else every argument split
|
||||
* by spaces and quoted by quoting rules.
|
||||
*/
|
||||
public static String toString(String[] args) {
|
||||
return toString(Arrays.asList(args)); // thanks to Java, arrays aren't iterable
|
||||
}
|
||||
|
||||
/**
|
||||
* Crack a command line.
|
||||
* @param toProcess the command line to process.
|
||||
* @return the command line broken into strings.
|
||||
* An empty or null toProcess parameter results in a zero sized array.
|
||||
*/
|
||||
public static String[] translateCommandline(String toProcess) {
|
||||
if (toProcess == null || toProcess.length() == 0) {
|
||||
//no command? no string
|
||||
return new String[0];
|
||||
}
|
||||
// parse with a simple finite state machine
|
||||
|
||||
final int normal = 0;
|
||||
final int inQuote = 1;
|
||||
final int inDoubleQuote = 2;
|
||||
int state = normal;
|
||||
final StringTokenizer tok = new StringTokenizer(toProcess, "\\\"\' ", true);
|
||||
final ArrayList<String> result = new ArrayList<>();
|
||||
final StringBuilder current = new StringBuilder();
|
||||
boolean lastTokenHasBeenQuoted = false;
|
||||
boolean lastTokenIsSlash = false;
|
||||
|
||||
while (tok.hasMoreTokens()) {
|
||||
String nextTok = tok.nextToken();
|
||||
switch (state) {
|
||||
case inQuote:
|
||||
if ("\'".equals(nextTok)) {
|
||||
lastTokenHasBeenQuoted = true;
|
||||
state = normal;
|
||||
} else {
|
||||
current.append(nextTok);
|
||||
}
|
||||
break;
|
||||
case inDoubleQuote:
|
||||
if ("\"".equals(nextTok)) {
|
||||
if (lastTokenIsSlash) {
|
||||
current.append(nextTok);
|
||||
lastTokenIsSlash = false;
|
||||
} else {
|
||||
lastTokenHasBeenQuoted = true;
|
||||
state = normal;
|
||||
}
|
||||
} else if ("\\".equals(nextTok)) {
|
||||
if (lastTokenIsSlash) {
|
||||
current.append(nextTok);
|
||||
lastTokenIsSlash = false;
|
||||
} else lastTokenIsSlash = true;
|
||||
} else {
|
||||
if (lastTokenIsSlash) {
|
||||
current.append("\\"); // unescaped
|
||||
lastTokenIsSlash = false;
|
||||
}
|
||||
current.append(nextTok);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (lastTokenIsSlash) {
|
||||
current.append(nextTok);
|
||||
lastTokenIsSlash = false;
|
||||
} else if ("\\".equals(nextTok)) lastTokenIsSlash = true; else if ("\'".equals(nextTok)) {
|
||||
state = inQuote;
|
||||
} else if ("\"".equals(nextTok)) {
|
||||
state = inDoubleQuote;
|
||||
} else if (" ".equals(nextTok)) {
|
||||
if (lastTokenHasBeenQuoted || current.length() != 0) {
|
||||
result.add(current.toString());
|
||||
current.setLength(0);
|
||||
}
|
||||
} else {
|
||||
current.append(nextTok);
|
||||
}
|
||||
lastTokenHasBeenQuoted = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (lastTokenHasBeenQuoted || current.length() != 0) {
|
||||
result.add(current.toString());
|
||||
}
|
||||
if (state == inQuote || state == inDoubleQuote) {
|
||||
throw new IllegalArgumentException("unbalanced quotes in " + toProcess);
|
||||
}
|
||||
if (lastTokenIsSlash) throw new IllegalArgumentException("escape character following nothing in " + toProcess);
|
||||
return result.toArray(new String[result.size()]);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,8 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
ROOT_PATH := $(LOCAL_PATH)
|
||||
|
||||
BUILD_SHARED_EXECUTABLE := $(LOCAL_PATH)/build-shared-executable.mk
|
||||
|
||||
########################################################
|
||||
## libsodium
|
||||
########################################################
|
||||
@@ -82,7 +84,6 @@ SODIUM_SOURCE := \
|
||||
crypto_secretbox/crypto_secretbox.c \
|
||||
crypto_secretbox/crypto_secretbox_easy.c \
|
||||
crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c \
|
||||
crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c \
|
||||
crypto_shorthash/crypto_shorthash.c \
|
||||
crypto_shorthash/siphash24/shorthash_siphash24_api.c \
|
||||
crypto_shorthash/siphash24/ref/shorthash_siphash24.c \
|
||||
@@ -90,58 +91,10 @@ SODIUM_SOURCE := \
|
||||
crypto_sign/ed25519/ref10/base.h \
|
||||
crypto_sign/ed25519/ref10/base2.h \
|
||||
crypto_sign/ed25519/sign_ed25519_api.c \
|
||||
crypto_sign/ed25519/ref10/d.h \
|
||||
crypto_sign/ed25519/ref10/d2.h \
|
||||
crypto_sign/ed25519/ref10/fe.h \
|
||||
crypto_sign/ed25519/ref10/fe_0.c \
|
||||
crypto_sign/ed25519/ref10/fe_1.c \
|
||||
crypto_sign/ed25519/ref10/fe_add.c \
|
||||
crypto_sign/ed25519/ref10/fe_cmov.c \
|
||||
crypto_sign/ed25519/ref10/fe_copy.c \
|
||||
crypto_sign/ed25519/ref10/fe_frombytes.c \
|
||||
crypto_sign/ed25519/ref10/fe_invert.c \
|
||||
crypto_sign/ed25519/ref10/fe_isnegative.c \
|
||||
crypto_sign/ed25519/ref10/fe_isnonzero.c \
|
||||
crypto_sign/ed25519/ref10/fe_mul.c \
|
||||
crypto_sign/ed25519/ref10/fe_neg.c \
|
||||
crypto_sign/ed25519/ref10/fe_pow22523.c \
|
||||
crypto_sign/ed25519/ref10/fe_sq.c \
|
||||
crypto_sign/ed25519/ref10/fe_sq2.c \
|
||||
crypto_sign/ed25519/ref10/fe_sub.c \
|
||||
crypto_sign/ed25519/ref10/fe_tobytes.c \
|
||||
crypto_sign/ed25519/ref10/ge.h \
|
||||
crypto_sign/ed25519/ref10/ge_add.c \
|
||||
crypto_sign/ed25519/ref10/ge_add.h \
|
||||
crypto_sign/ed25519/ref10/ge_double_scalarmult.c \
|
||||
crypto_sign/ed25519/ref10/ge_frombytes.c \
|
||||
crypto_sign/ed25519/ref10/ge_madd.c \
|
||||
crypto_sign/ed25519/ref10/ge_madd.h \
|
||||
crypto_sign/ed25519/ref10/ge_msub.c \
|
||||
crypto_sign/ed25519/ref10/ge_msub.h \
|
||||
crypto_sign/ed25519/ref10/ge_p1p1_to_p2.c \
|
||||
crypto_sign/ed25519/ref10/ge_p1p1_to_p3.c \
|
||||
crypto_sign/ed25519/ref10/ge_p2_0.c \
|
||||
crypto_sign/ed25519/ref10/ge_p2_dbl.c \
|
||||
crypto_sign/ed25519/ref10/ge_p2_dbl.h \
|
||||
crypto_sign/ed25519/ref10/ge_p3_0.c \
|
||||
crypto_sign/ed25519/ref10/ge_p3_dbl.c \
|
||||
crypto_sign/ed25519/ref10/ge_p3_to_cached.c \
|
||||
crypto_sign/ed25519/ref10/ge_p3_to_p2.c \
|
||||
crypto_sign/ed25519/ref10/ge_p3_tobytes.c \
|
||||
crypto_sign/ed25519/ref10/ge_precomp_0.c \
|
||||
crypto_sign/ed25519/ref10/ge_scalarmult_base.c \
|
||||
crypto_sign/ed25519/ref10/ge_sub.c \
|
||||
crypto_sign/ed25519/ref10/ge_sub.h \
|
||||
crypto_sign/ed25519/ref10/ge_tobytes.c \
|
||||
crypto_sign/ed25519/ref10/keypair.c \
|
||||
crypto_sign/ed25519/ref10/open.c \
|
||||
crypto_sign/ed25519/ref10/pow22523.h \
|
||||
crypto_sign/ed25519/ref10/pow225521.h \
|
||||
crypto_sign/ed25519/ref10/sc.h \
|
||||
crypto_sign/ed25519/ref10/sc_muladd.c \
|
||||
crypto_sign/ed25519/ref10/sc_reduce.c \
|
||||
crypto_sign/ed25519/ref10/obsolete.c \
|
||||
crypto_sign/ed25519/ref10/sign.c \
|
||||
crypto_sign/ed25519/ref10/sqrtm1.h \
|
||||
crypto_stream/crypto_stream.c \
|
||||
crypto_stream/chacha20/stream_chacha20.c \
|
||||
crypto_stream/chacha20/stream_chacha20.h \
|
||||
@@ -164,23 +117,16 @@ SODIUM_SOURCE := \
|
||||
sodium/version.c
|
||||
|
||||
SODIUM_SOURCE += \
|
||||
crypto_scalarmult/curve25519/ref10/curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/curve25519_ref10.h \
|
||||
crypto_scalarmult/curve25519/ref10/fe.h \
|
||||
crypto_scalarmult/curve25519/ref10/fe_0_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_1_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_add_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_copy_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_cswap_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_frombytes_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_invert_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_mul_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_mul121666_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_sq_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_sub_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/fe_tobytes_curve25519_ref10.c \
|
||||
crypto_scalarmult/curve25519/ref10/montgomery.h \
|
||||
crypto_scalarmult/curve25519/ref10/pow225521.h
|
||||
crypto_scalarmult/curve25519/ref10/x25519_ref10.c
|
||||
|
||||
SODIUM_SOURCE += \
|
||||
crypto_pwhash/argon2/argon2-core.c \
|
||||
crypto_pwhash/argon2/argon2.c \
|
||||
crypto_pwhash/argon2/argon2-encoding.c \
|
||||
crypto_pwhash/argon2/blake2b-long.c \
|
||||
crypto_pwhash/argon2/argon2-fill-block-ref.c \
|
||||
crypto_pwhash/argon2/pwhash_argon2i.c \
|
||||
crypto_pwhash/argon2/argon2-fill-block-ssse3.c
|
||||
|
||||
SODIUM_SOURCE += \
|
||||
crypto_stream/salsa20/ref/stream_salsa20_ref.c \
|
||||
@@ -190,10 +136,10 @@ SODIUM_SOURCE += \
|
||||
randombytes/sysrandom/randombytes_sysrandom.c
|
||||
|
||||
LOCAL_MODULE := sodium
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include \
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/include \
|
||||
-I$(LOCAL_PATH)/include/sodium \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
|
||||
-DPACKAGE_NAME=\"libsodium\" -DPACKAGE_TARNAME=\"libsodium\" \
|
||||
-DPACKAGE_VERSION=\"1.0.7\" -DPACKAGE_STRING=\"libsodium\ 1.0.7\" \
|
||||
-DPACKAGE_BUGREPORT=\"https://github.com/jedisct1/libsodium/issues\" \
|
||||
@@ -209,7 +155,7 @@ LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/in
|
||||
-DHAVE_WEAK_SYMBOLS=1 -DHAVE_ARC4RANDOM=1 -DHAVE_ARC4RANDOM_BUF=1 \
|
||||
-DHAVE_MLOCK=1 -DHAVE_MPROTECT=1 -DHAVE_POSIX_MEMALIGN=1
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libsodium/src/libsodium/,$(SODIUM_SOURCE))
|
||||
LOCAL_SRC_FILES := $(addprefix libsodium/src/libsodium/,$(SODIUM_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -273,7 +219,7 @@ LOCAL_MODULE := libipset
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libipset/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libipset/,$(IPSET_SOURCE))
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libipset/src/libipset/,$(IPSET_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -300,7 +246,7 @@ LOCAL_MODULE := libcork
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libcork/include \
|
||||
-DCORK_API=CORK_LOCAL
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libcork/,$(CORK_SOURCE))
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libcork/src/libcork/,$(CORK_SOURCE))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -316,10 +262,10 @@ UDNS_SOURCES := udns_dn.c udns_dntosp.c udns_parse.c udns_resolver.c udns_init.c
|
||||
udns_rr_srv.c udns_rr_naptr.c udns_codes.c udns_jran.c
|
||||
|
||||
LOCAL_MODULE := libudns
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/shadowsocks-libev/libudns \
|
||||
LOCAL_CFLAGS += -O2 -I$(LOCAL_PATH)/libudns \
|
||||
-DHAVE_DECL_INET_NTOP
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/libudns/,$(UDNS_SOURCES))
|
||||
LOCAL_SRC_FILES := $(addprefix libudns/,$(UDNS_SOURCES))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -333,8 +279,8 @@ LOCAL_MODULE := libev
|
||||
LOCAL_CFLAGS += -O2 -DNDEBUG -DHAVE_CONFIG_H \
|
||||
-I$(LOCAL_PATH)/include/libev
|
||||
LOCAL_SRC_FILES := \
|
||||
shadowsocks-libev/libev/ev.c \
|
||||
shadowsocks-libev/libev/event.c
|
||||
libev/ev.c \
|
||||
libev/event.c
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
@@ -358,7 +304,7 @@ LOCAL_CFLAGS := -O2 -std=gnu99 -DUSE_IPTABLES \
|
||||
-I$(LOCAL_PATH)/libevent/include \
|
||||
-I$(LOCAL_PATH)/libevent
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
include $(BUILD_SHARED_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## pdnsd
|
||||
@@ -375,7 +321,7 @@ LOCAL_CFLAGS := -DANDROID -Wall -O2 -I$(LOCAL_PATH)/pdnsd \
|
||||
LOCAL_STATIC_LIBRARIES := libancillary
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
include $(BUILD_SHARED_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## shadowsocks-libev local
|
||||
@@ -385,6 +331,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
SHADOWSOCKS_SOURCES := local.c cache.c udprelay.c encrypt.c \
|
||||
utils.c netutils.c json.c jconf.c acl.c http.c tls.c rule.c \
|
||||
plugin.c \
|
||||
android.c
|
||||
|
||||
LOCAL_MODULE := ss-local
|
||||
@@ -397,19 +344,19 @@ LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DMODULE_LOCAL \
|
||||
-I$(LOCAL_PATH)/libancillary \
|
||||
-I$(LOCAL_PATH)/mbedtls/include \
|
||||
-I$(LOCAL_PATH)/pcre \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libudns \
|
||||
-I$(LOCAL_PATH)/libudns \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libipset/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libev
|
||||
-I$(LOCAL_PATH)/libev
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libev libmbedtls libipset libcork libudns \
|
||||
libsodium libancillary libpcre
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
include $(BUILD_SHARED_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## shadowsocks-libev tunnel
|
||||
@@ -417,7 +364,7 @@ include $(BUILD_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c netutils.c json.c jconf.c android.c
|
||||
SHADOWSOCKS_SOURCES := tunnel.c cache.c udprelay.c encrypt.c utils.c netutils.c json.c jconf.c android.c plugin.c
|
||||
|
||||
LOCAL_MODULE := ss-tunnel
|
||||
LOCAL_SRC_FILES := $(addprefix shadowsocks-libev/src/, $(SHADOWSOCKS_SOURCES))
|
||||
@@ -426,19 +373,19 @@ LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -DMODULE_TUNNEL \
|
||||
-DCONNECT_IN_PROGRESS=EINPROGRESS \
|
||||
-I$(LOCAL_PATH)/libancillary \
|
||||
-I$(LOCAL_PATH)/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libudns \
|
||||
-I$(LOCAL_PATH)/libudns \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libcork/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include \
|
||||
-I$(LOCAL_PATH)/libsodium/src/libsodium/include/sodium \
|
||||
-I$(LOCAL_PATH)/mbedtls/include \
|
||||
-I$(LOCAL_PATH)/shadowsocks-libev/libev \
|
||||
-I$(LOCAL_PATH)/libev \
|
||||
-I$(LOCAL_PATH)/include/shadowsocks-libev
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libev libmbedtls libsodium libcork libudns libancillary
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
include $(BUILD_SHARED_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## system
|
||||
@@ -549,7 +496,7 @@ LOCAL_LDLIBS := -ldl -llog
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix badvpn/, $(TUN2SOCKS_SOURCES))
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
include $(BUILD_SHARED_EXECUTABLE)
|
||||
|
||||
########################################################
|
||||
## mbed TLS
|
||||
@@ -573,7 +520,7 @@ include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := pcre
|
||||
LOCAL_MODULE := pcre
|
||||
|
||||
LOCAL_CFLAGS += -DHAVE_CONFIG_H
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_ABI := armeabi-v7a x86
|
||||
APP_PLATFORM := android-16
|
||||
APP_PLATFORM := android-19
|
||||
APP_STL := stlport_static
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
@@ -0,0 +1,31 @@
|
||||
# Copyright (C) 2009 The Android Open Source Project
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# this file is included from Android.mk files to build a target-specific
|
||||
# executable program
|
||||
#
|
||||
# Modified by @Mygod, based on:
|
||||
# https://android.googlesource.com/platform/ndk/+/f2e98f8c066aed59caf61163d4b87c2b858f9814/build/core/build-shared-library.mk
|
||||
# https://android.googlesource.com/platform/ndk/+/f2e98f8c066aed59caf61163d4b87c2b858f9814/build/core/build-executable.mk
|
||||
LOCAL_BUILD_SCRIPT := BUILD_EXECUTABLE
|
||||
LOCAL_MAKEFILE := $(local-makefile)
|
||||
$(call check-defined-LOCAL_MODULE,$(LOCAL_BUILD_SCRIPT))
|
||||
$(call check-LOCAL_MODULE,$(LOCAL_MAKEFILE))
|
||||
$(call check-LOCAL_MODULE_FILENAME)
|
||||
# we are building target objects
|
||||
my := TARGET_
|
||||
$(call handle-module-filename,lib,$(TARGET_SONAME_EXTENSION))
|
||||
$(call handle-module-built)
|
||||
LOCAL_MODULE_CLASS := EXECUTABLE
|
||||
include $(BUILD_SYSTEM)/build-module.mk
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <cpu-features.h>
|
||||
|
||||
#include <sys/un.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -18,25 +17,6 @@
|
||||
#define LOGW(...) do { __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__); } while(0)
|
||||
#define LOGE(...) do { __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__); } while(0)
|
||||
|
||||
jstring Java_com_github_shadowsocks_system_getabi(JNIEnv *env, jobject thiz) {
|
||||
AndroidCpuFamily family = android_getCpuFamily();
|
||||
uint64_t features = android_getCpuFeatures();
|
||||
const char *abi;
|
||||
|
||||
if (family == ANDROID_CPU_FAMILY_X86) {
|
||||
abi = "x86";
|
||||
} else if (family == ANDROID_CPU_FAMILY_MIPS) {
|
||||
abi = "mips";
|
||||
} else if (family == ANDROID_CPU_FAMILY_ARM) {
|
||||
// if (features & ANDROID_CPU_ARM_FEATURE_ARMv7) {
|
||||
abi = "armeabi-v7a";
|
||||
// } else {
|
||||
// abi = "armeabi";
|
||||
// }
|
||||
}
|
||||
return env->NewStringUTF(abi);
|
||||
}
|
||||
|
||||
jint Java_com_github_shadowsocks_system_exec(JNIEnv *env, jobject thiz, jstring cmd) {
|
||||
const char *cmd_str = env->GetStringUTFChars(cmd, 0);
|
||||
|
||||
@@ -103,9 +83,7 @@ static JNINativeMethod method_table[] = {
|
||||
{ "sendfd", "(ILjava/lang/String;)I",
|
||||
(void*) Java_com_github_shadowsocks_system_sendfd },
|
||||
{ "exec", "(Ljava/lang/String;)I",
|
||||
(void*) Java_com_github_shadowsocks_system_exec },
|
||||
{ "getABI", "()Ljava/lang/String;",
|
||||
(void*) Java_com_github_shadowsocks_system_getabi }
|
||||
(void*) Java_com_github_shadowsocks_system_exec }
|
||||
};
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 806 B After Width: | Height: | Size: 806 B |
|
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
|
||||
<item>
|
||||
<selector android:enterFadeDuration="@android:integer/config_mediumAnimTime"
|
||||
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||
<item android:state_selected="true">
|
||||
<color android:color="@color/material_primary_100"/>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
||||
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 257 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 277 KiB |
@@ -6,6 +6,17 @@
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<selector android:enterFadeDuration="@android:integer/config_mediumAnimTime"
|
||||
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/material_green_700" />
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
<item android:left="8dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:enterFadeDuration="@android:integer/config_mediumAnimTime"
|
||||
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||
<item android:state_selected="true">
|
||||
<color android:color="@color/material_primary_100"/>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19,3h-4.18C14.4,1.84 13.3,1 12,1c-1.3,0 -2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM14,17L7,17v-2h7v2zM17,13L7,13v-2h10v2zM17,9L7,9L7,7h10v2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M14,10L2,10v2h12v-2zM14,6L2,6v2h12L14,6zM18,14v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2,16h8v-2L2,14v2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<Spinner android:id="@+id/template_selector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/acl_rule_templates"/>
|
||||
<EditText android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:lines="1"/>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
<ImageView android:id="@android:id/icon"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"/>
|
||||
<Space android:layout_width="4dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical">
|
||||
<TextView android:id="@android:id/text1"
|
||||
android:textAppearance="?android:attr/textAppearance"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"/>
|
||||
<TextView android:id="@android:id/text2"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
@@ -19,24 +20,22 @@
|
||||
android:textSize="18sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingStart="60dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
android:layout_height="wrap_content"/>
|
||||
<Switch android:checked="true"
|
||||
android:id="@+id/bypassSwitch"
|
||||
android:text="@string/bypass_apps"
|
||||
android:textSize="18sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:paddingStart="60dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
<FrameLayout android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
@@ -48,7 +47,19 @@
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/applistview"
|
||||
android:id="@+id/list"
|
||||
android:visibility="gone"/>
|
||||
<com.futuremind.recyclerviewfastscroll.FastScroller
|
||||
android:id="@+id/fastscroller"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone"
|
||||
app:fastscroll__handleColor="@color/material_primary_500"
|
||||
app:fastscroll__bubbleColor="@color/material_primary_500"
|
||||
app:fastscroll__bubbleTextAppearance="@style/StyledScrollerTextAppearance"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@@ -28,6 +28,6 @@
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:clickable="false"
|
||||
android:layout_marginEnd="8dp"/>
|
||||
android:layout_marginEnd="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<include layout="@layout/toolbar_light_dark"/>
|
||||
<FrameLayout android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
<android.support.v7.widget.RecyclerView android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="32dp"
|
||||
android:clipToPadding="false"/>
|
||||
<com.futuremind.recyclerviewfastscroll.FastScroller
|
||||
android:id="@+id/fastscroller"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
app:fastscroll__handleColor="@color/material_primary_500"
|
||||
app:fastscroll__bubbleColor="@color/material_primary_500"
|
||||
app:fastscroll__bubbleTextAppearance="@style/StyledScrollerTextAppearance"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/background_header"/>
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
@@ -4,12 +4,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<include layout="@layout/toolbar_light_dark"/>
|
||||
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/profilesList"
|
||||
<android.support.v7.widget.RecyclerView android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingBottom="32dp"
|
||||
android:scrollbars="vertical"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"/>
|
||||
</LinearLayout>
|
||||
@@ -6,7 +6,6 @@
|
||||
android:layout_height="wrap_content">
|
||||
<com.github.shadowsocks.widget.BoundedCardView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_selectable"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
@@ -25,7 +24,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:id="@+id/container">
|
||||
<TextView android:id="@+id/title"
|
||||
<TextView android:id="@android:id/text1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
@@ -55,28 +54,29 @@
|
||||
android:contentDescription="@string/edit"
|
||||
android:focusable="true"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
<RelativeLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:id="@+id/details">
|
||||
<TextView android:id="@+id/address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
android:layout_marginTop="4dp">
|
||||
<TextView android:id="@android:id/text2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@+id/traffic"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
<TextView android:id="@+id/traffic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</com.github.shadowsocks.widget.BoundedCardView>
|
||||
</FrameLayout>
|
||||
@@ -15,7 +15,8 @@
|
||||
android:textSize="18sp"
|
||||
android:padding="16dp"/>
|
||||
</FrameLayout>
|
||||
<android.support.v7.widget.RecyclerView android:id="@+id/profilesList"
|
||||
<android.support.v7.widget.RecyclerView android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"/>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item android:id="@+id/selection"
|
||||
android:title="@string/action_selection"
|
||||
android:icon="@drawable/abc_ic_menu_selectall_mtrl_alpha"
|
||||
android:alphabeticShortcut="s"
|
||||
android:numericShortcut="0"
|
||||
android:visible="false"
|
||||
app:showAsAction="always">
|
||||
<menu>
|
||||
<item android:id="@+id/action_select_all"
|
||||
android:title="@android:string/selectAll"
|
||||
android:alphabeticShortcut="a"
|
||||
android:numericShortcut="1"
|
||||
app:showAsAction="always"/>
|
||||
<item android:id="@+id/action_cut"
|
||||
android:title="@android:string/cut"
|
||||
android:alphabeticShortcut="t"
|
||||
android:numericShortcut="2"
|
||||
app:showAsAction="always"/>
|
||||
<item android:id="@+id/action_copy"
|
||||
android:title="@android:string/copy"
|
||||
android:alphabeticShortcut="c"
|
||||
android:numericShortcut="3"
|
||||
app:showAsAction="always"/>
|
||||
<item android:id="@+id/action_delete"
|
||||
android:title="@string/delete"
|
||||
android:alphabeticShortcut="d"
|
||||
android:numericShortcut="4"
|
||||
app:showAsAction="always"/>
|
||||
</menu>
|
||||
</item>
|
||||
<item android:title="@string/action_add_rule"
|
||||
android:icon="@drawable/ic_av_playlist_add"
|
||||
android:alphabeticShortcut="a"
|
||||
android:numericShortcut="1"
|
||||
app:showAsAction="always">
|
||||
<menu>
|
||||
<item android:id="@+id/action_manual_settings"
|
||||
android:title="@string/add_profile_methods_manual_settings"
|
||||
android:alphabeticShortcut="m"
|
||||
android:numericShortcut="1"/>
|
||||
<item android:id="@+id/action_import"
|
||||
android:title="@string/action_import"
|
||||
android:alphabeticShortcut="i"
|
||||
android:numericShortcut="2"/>
|
||||
<item android:id="@+id/action_import_gfwlist"
|
||||
android:title="@string/route_entry_gfwlist"
|
||||
android:alphabeticShortcut="g"
|
||||
android:numericShortcut="3"/>
|
||||
</menu>
|
||||
</item>
|
||||
</menu>
|
||||