Commit d8ab61e0 authored by Max Lv's avatar Max Lv

update android-plugin

parent eeb34bd9
...@@ -2,4 +2,4 @@ import sbtandroid.AndroidKeys._ ...@@ -2,4 +2,4 @@ import sbtandroid.AndroidKeys._
keyalias in Android := "travis" keyalias in Android := "travis"
buildConfigDebug in Android := true publicServer in Android := "127.0.0.1"
...@@ -5,8 +5,8 @@ import sbtandroid._ ...@@ -5,8 +5,8 @@ import sbtandroid._
import sbtandroid.AndroidKeys._ import sbtandroid.AndroidKeys._
object App { object App {
val version = "1.7.3" val version = "1.7.4"
val versionCode = 40 val versionCode = 41
} }
object General { object General {
......
...@@ -188,14 +188,18 @@ object Extra { ...@@ -188,14 +188,18 @@ object Extra {
val isTrafficStat = settings.getBoolean(Key.isTrafficStat, false) val isTrafficStat = settings.getBoolean(Key.isTrafficStat, false)
val proxy = settings.getString(Key.proxy, "127.0.0.1") match { val proxy = settings.getString(Key.proxy, "127.0.0.1") match {
case "198.199.101.152" => if (!BuildConfig.DEBUG) "ss.maxcdn.info" else "198.199.101.152" case "198.199.101.152" => BuildConfig.SERVER
case s: String => s case s: String => s
case _ => "127.0.0.1" case _ => "127.0.0.1"
} }
val sitekey = settings.getString(Key.sitekey, "default") val sitekey = settings.getString(Key.sitekey, "default")
val encMethod = settings.getString(Key.encMethod, "table") val encMethod = settings.getString(Key.encMethod, "table")
val remotePort: Int = try { val remotePort: Int = try {
Integer.valueOf(settings.getString(Key.remotePort, "1984")) if (proxy == BuildConfig.SERVER) {
scala.util.Random.shuffle(Seq(20, 21, 23, 443)).toSeq(0)
} else {
Integer.valueOf(settings.getString(Key.remotePort, "1984"))
}
} catch { } catch {
case ex: NumberFormatException => { case ex: NumberFormatException => {
1984 1984
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment