Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
c65baf03
Commit
c65baf03
authored
Mar 02, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a build error
parent
185f32aa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
16 deletions
+87
-16
src/main/scala/com/github/shadowsocks/database/MenuAdapter.scala
...n/scala/com/github/shadowsocks/database/MenuAdapter.scala
+1
-1
src/main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
...main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
+44
-5
src/main/scala/com/github/shadowsocks/utils/Console.scala
src/main/scala/com/github/shadowsocks/utils/Console.scala
+39
-1
src/main/scala/com/github/shadowsocks/utils/Constants.scala
src/main/scala/com/github/shadowsocks/utils/Constants.scala
+0
-3
src/main/scala/com/github/shadowsocks/utils/Utils.scala
src/main/scala/com/github/shadowsocks/utils/Utils.scala
+3
-6
No files found.
src/main/scala/com/github/shadowsocks/database/MenuAdapter.scala
View file @
c65baf03
...
...
@@ -45,7 +45,7 @@ import android.view.View
import
android.view.ViewGroup
import
android.widget.BaseAdapter
import
android.widget.TextView
import
com.github.shadowsocks.
{
Shadowsocks
,
R
}
import
com.github.shadowsocks.
{
R
}
import
android.view.View.
{
OnLongClickListener
,
OnClickListener
}
case
class
Item
(
id
:
Int
,
title
:
String
,
iconRes
:
Int
,
...
...
src/main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
View file @
c65baf03
/*
* 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
import
android.content.
{
Intent
,
SharedPreferences
,
Context
}
import
android.content.
{
SharedPreferences
,
Context
}
import
com.github.shadowsocks.ShadowsocksApplication
import
com.google.tagmanager.Container
import
scalaj.http.
{
HttpOptions
,
Http
}
...
...
@@ -70,7 +109,8 @@ object ConfigUtils {
def
getPublicConfig
(
context
:
Context
,
container
:
Container
,
config
:
Config
)
:
Config
=
{
val
url
=
container
.
getString
(
"proxy_url"
)
val
sig
=
Utils
.
getSignature
(
context
)
val
list
=
Http
.
post
(
url
)
val
list
=
Http
.
post
(
url
)
.
params
(
"sig"
->
sig
)
.
option
(
HttpOptions
.
connTimeout
(
1000
))
.
option
(
HttpOptions
.
readTimeout
(
5000
))
...
...
@@ -113,8 +153,7 @@ object ConfigUtils {
}
val
proxiedAppString
=
settings
.
getString
(
Key
.
proxied
,
""
)
new
Config
(
isGlobalProxy
,
isGFWList
,
isBypassApps
,
isTrafficStat
,
isUdpDns
,
profileName
,
proxy
,
sitekey
,
encMethod
,
proxiedAppString
,
remotePort
,
localPort
)
new
Config
(
isGlobalProxy
,
isGFWList
,
isBypassApps
,
isTrafficStat
,
isUdpDns
,
profileName
,
proxy
,
sitekey
,
encMethod
,
proxiedAppString
,
remotePort
,
localPort
)
}
}
\ No newline at end of file
src/main/scala/com/github/shadowsocks/utils/Console.scala
View file @
c65baf03
/*
* 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
import
eu.chainfire.libsuperuser.Shell
import
eu.chainfire.libsuperuser.Shell.
{
OnCommandResultListener
,
SU
,
Builder
}
import
java.util
import
android.util.Log
object
Console
{
...
...
src/main/scala/com/github/shadowsocks/utils/Constants.scala
View file @
c65baf03
...
...
@@ -39,9 +39,6 @@
package
com.github.shadowsocks.utils
import
android.content.
{
Intent
,
SharedPreferences
}
import
com.github.shadowsocks.aidl.Config
object
Executable
{
val
REDSOCKS
=
"redsocks"
val
PDNSD
=
"pdnsd"
...
...
src/main/scala/com/github/shadowsocks/utils/Utils.scala
View file @
c65baf03
...
...
@@ -38,25 +38,22 @@
*/
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.PackageManager
import
android.graphics.drawable.
{
BitmapDrawable
,
Drawable
}
import
android.util.
{
Base64
,
Log
}
import
java.io._
import
java.net.
{
U
RLEncoder
,
U
nknownHostException
,
InetAddress
,
NetworkInterface
}
import
java.net.
{
UnknownHostException
,
InetAddress
,
NetworkInterface
}
import
org.apache.http.conn.util.InetAddressUtils
import
scala.collection.mutable.ArrayBuffer
import
org.xbill.DNS._
import
android.graphics._
import
android.app.ActivityManager
import
android.os.Build
import
android.provider.Settings
import
scala.Some
import
scalaj.http.
{
Http
,
HttpOptions
}
import
com.google.tagmanager.Container
import
java.security.MessageDigest
import
com.github.shadowsocks.
{
BuildConfig
,
Exec
,
ShadowsocksApplication
}
import
com.github.shadowsocks.
{
BuildConfig
}
object
Utils
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment