Commit c65baf03 authored by Max Lv's avatar Max Lv

fix a build error

parent 185f32aa
...@@ -45,7 +45,7 @@ import android.view.View ...@@ -45,7 +45,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.BaseAdapter import android.widget.BaseAdapter
import android.widget.TextView import android.widget.TextView
import com.github.shadowsocks.{Shadowsocks, R} import com.github.shadowsocks.{R}
import android.view.View.{OnLongClickListener, OnClickListener} import android.view.View.{OnLongClickListener, OnClickListener}
case class Item(id: Int, title: String, iconRes: Int, case class Item(id: Int, title: String, iconRes: Int,
......
/*
* Shadowsocks - A shadowsocks client for Android
* Copyright (C) 2014 <max.c.lv@gmail.com>
*
* 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
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* ___====-_ _-====___
* _--^^^#####// \\#####^^^--_
* _-^##########// ( ) \\##########^-_
* -############// |\^^/| \\############-
* _/############// (@::@) \\############\_
* /#############(( \\// ))#############\
* -###############\\ (oo) //###############-
* -#################\\ / VV \ //#################-
* -###################\\/ \//###################-
* _#/|##########/\######( /\ )######/\##########|\#_
* |/ |#/\#/\#/\/ \#/\##\ | | /##/\#/ \/\#/\#/\#| \|
* ` |/ V V ` V \#\| | | |/#/ V ' V V \| '
* ` ` ` ` / | | | | \ ' ' ' '
* ( | | | | )
* __\ | | | | /__
* (vvv(VVV)(VVV)vvv)
*
* HERE BE DRAGONS
*
*/
package com.github.shadowsocks.utils package com.github.shadowsocks.utils
import android.content.{Intent, SharedPreferences, Context} import android.content.{SharedPreferences, Context}
import com.github.shadowsocks.ShadowsocksApplication import com.github.shadowsocks.ShadowsocksApplication
import com.google.tagmanager.Container import com.google.tagmanager.Container
import scalaj.http.{HttpOptions, Http} import scalaj.http.{HttpOptions, Http}
...@@ -70,7 +109,8 @@ object ConfigUtils { ...@@ -70,7 +109,8 @@ object ConfigUtils {
def getPublicConfig(context: Context, container: Container, config: Config): Config = { def getPublicConfig(context: Context, container: Container, config: Config): Config = {
val url = container.getString("proxy_url") val url = container.getString("proxy_url")
val sig = Utils.getSignature(context) val sig = Utils.getSignature(context)
val list = Http.post(url) val list = Http
.post(url)
.params("sig" -> sig) .params("sig" -> sig)
.option(HttpOptions.connTimeout(1000)) .option(HttpOptions.connTimeout(1000))
.option(HttpOptions.readTimeout(5000)) .option(HttpOptions.readTimeout(5000))
...@@ -113,8 +153,7 @@ object ConfigUtils { ...@@ -113,8 +153,7 @@ object ConfigUtils {
} }
val proxiedAppString = settings.getString(Key.proxied, "") val proxiedAppString = settings.getString(Key.proxied, "")
new Config(isGlobalProxy, isGFWList, isBypassApps, isTrafficStat, isUdpDns, profileName, proxy, sitekey, new Config(isGlobalProxy, isGFWList, isBypassApps, isTrafficStat, isUdpDns, profileName, proxy,
encMethod, proxiedAppString, remotePort, localPort) sitekey, encMethod, proxiedAppString, remotePort, localPort)
} }
} }
\ No newline at end of file
/*
* Shadowsocks - A shadowsocks client for Android
* Copyright (C) 2014 <max.c.lv@gmail.com>
*
* 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
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* ___====-_ _-====___
* _--^^^#####// \\#####^^^--_
* _-^##########// ( ) \\##########^-_
* -############// |\^^/| \\############-
* _/############// (@::@) \\############\_
* /#############(( \\// ))#############\
* -###############\\ (oo) //###############-
* -#################\\ / VV \ //#################-
* -###################\\/ \//###################-
* _#/|##########/\######( /\ )######/\##########|\#_
* |/ |#/\#/\#/\/ \#/\##\ | | /##/\#/ \/\#/\#/\#| \|
* ` |/ V V ` V \#\| | | |/#/ V ' V V \| '
* ` ` ` ` / | | | | \ ' ' ' '
* ( | | | | )
* __\ | | | | /__
* (vvv(VVV)(VVV)vvv)
*
* HERE BE DRAGONS
*
*/
package com.github.shadowsocks.utils package com.github.shadowsocks.utils
import eu.chainfire.libsuperuser.Shell import eu.chainfire.libsuperuser.Shell
import eu.chainfire.libsuperuser.Shell.{OnCommandResultListener, SU, Builder} import eu.chainfire.libsuperuser.Shell.{OnCommandResultListener, SU, Builder}
import java.util import java.util
import android.util.Log
object Console { object Console {
......
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
package com.github.shadowsocks.utils package com.github.shadowsocks.utils
import android.content.{Intent, SharedPreferences}
import com.github.shadowsocks.aidl.Config
object Executable { object Executable {
val REDSOCKS = "redsocks" val REDSOCKS = "redsocks"
val PDNSD = "pdnsd" val PDNSD = "pdnsd"
......
...@@ -38,25 +38,22 @@ ...@@ -38,25 +38,22 @@
*/ */
package com.github.shadowsocks.utils package com.github.shadowsocks.utils
import android.content.{Intent, SharedPreferences, Context} import android.content.{Intent, Context}
import android.content.pm.ApplicationInfo import android.content.pm.ApplicationInfo
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.graphics.drawable.{BitmapDrawable, Drawable} import android.graphics.drawable.{BitmapDrawable, Drawable}
import android.util.{Base64, Log} import android.util.{Base64, Log}
import java.io._ import java.io._
import java.net.{URLEncoder, UnknownHostException, InetAddress, NetworkInterface} import java.net.{UnknownHostException, InetAddress, NetworkInterface}
import org.apache.http.conn.util.InetAddressUtils import org.apache.http.conn.util.InetAddressUtils
import scala.collection.mutable.ArrayBuffer
import org.xbill.DNS._ import org.xbill.DNS._
import android.graphics._ import android.graphics._
import android.app.ActivityManager import android.app.ActivityManager
import android.os.Build import android.os.Build
import android.provider.Settings import android.provider.Settings
import scala.Some import scala.Some
import scalaj.http.{Http, HttpOptions}
import com.google.tagmanager.Container
import java.security.MessageDigest import java.security.MessageDigest
import com.github.shadowsocks.{BuildConfig, Exec, ShadowsocksApplication} import com.github.shadowsocks.{BuildConfig}
object Utils { object Utils {
......
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