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
d0ca6667
Commit
d0ca6667
authored
Jun 19, 2013
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update buildconfig
parent
ba644cdf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
21 deletions
+11
-21
.travis.yml
.travis.yml
+1
-1
local.sbt.example
local.sbt.example
+2
-0
src/main/scala/com/github/shadowsocks/ShadowVpnService.scala
src/main/scala/com/github/shadowsocks/ShadowVpnService.scala
+2
-2
src/main/scala/com/github/shadowsocks/ShadowsocksService.scala
...ain/scala/com/github/shadowsocks/ShadowsocksService.scala
+2
-2
src/main/scala/com/github/shadowsocks/Utils.scala
src/main/scala/com/github/shadowsocks/Utils.scala
+4
-16
No files found.
.travis.yml
View file @
d0ca6667
...
...
@@ -18,7 +18,7 @@ script:
-
wget https://raw.github.com/paulp/sbt-extras/master/sbt
-
chmod u+x ./sbt
-
cp local.sbt.example local.sbt
-
./sbt android:package-debug
-
./sbt
clean
android:package-debug
after_success
:
-
./sbt deploy
env
:
...
...
local.sbt.example
View file @
d0ca6667
import org.scalasbt.androidplugin.AndroidKeys._
keyalias in Android := "travis"
buildConfigDebug in Android := true
src/main/scala/com/github/shadowsocks/ShadowVpnService.scala
View file @
d0ca6667
...
...
@@ -142,7 +142,7 @@ class ShadowVpnService extends VpnService {
BASE
+
"shadowsocks.pid"
)
.
format
(
config
.
proxy
,
config
.
remotePort
,
config
.
localPort
,
config
.
sitekey
,
config
.
encMethod
)
Log
.
d
(
TAG
,
cmd
)
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
)
System
.
exec
(
cmd
)
}
}
...
...
@@ -310,7 +310,7 @@ class ShadowVpnService extends VpnService {
+
"--loglevel 3 "
+
"--pid %stun2socks.pid"
)
.
format
(
localAddress
.
format
(
"2"
),
localAddress
.
format
(
"1"
),
config
.
localPort
,
fd
,
VPN_MTU
,
BASE
)
Log
.
d
(
TAG
,
cmd
)
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
)
System
.
exec
(
cmd
)
}
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksService.scala
View file @
d0ca6667
...
...
@@ -177,7 +177,7 @@ class ShadowsocksService extends Service {
"shadowsocks.pid"
)
.
format
(
config
.
proxy
,
config
.
remotePort
,
config
.
localPort
,
config
.
sitekey
,
config
.
encMethod
)
Log
.
d
(
TAG
,
cmd
)
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
)
System
.
exec
(
cmd
)
}
}.
start
()
...
...
@@ -314,7 +314,7 @@ class ShadowsocksService extends Service {
val
bitmap
=
Bitmap
.
createBitmap
(
icon
.
getIntrinsicWidth
*
4
,
icon
.
getIntrinsicHeight
*
4
,
Bitmap
.
Config
.
ARGB_8888
)
val
r
=
rate
.
toString
val
size
=
bitmap
.
getHeight
/
3
val
size
=
bitmap
.
getHeight
/
4
val
canvas
=
new
Canvas
(
bitmap
)
val
paint
=
new
Paint
()
paint
.
setColor
(
Color
.
WHITE
)
...
...
src/main/scala/com/github/shadowsocks/Utils.scala
View file @
d0ca6667
...
...
@@ -130,7 +130,7 @@ object Extra {
val
isGFWList
=
settings
.
getBoolean
(
Key
.
isGFWList
,
false
)
val
isBypassApps
=
settings
.
getBoolean
(
Key
.
isBypassApps
,
false
)
val
proxy
=
settings
.
getString
(
Key
.
proxy
,
"127.0.0.1"
)
match
{
case
"198.199.101.152"
=>
"ss.maxcdn.info
"
case
"198.199.101.152"
=>
if
(!
BuildConfig
.
DEBUG
)
"ss.maxcdn.info"
else
"198.199.101.152
"
case
s
:
String
=>
s
case
_
=>
"127.0.0.1"
}
...
...
@@ -298,7 +298,7 @@ object Utils {
if
(!
addr
.
isLoopbackAddress
&&
!
addr
.
isLinkLocalAddress
)
{
val
sAddr
=
addr
.
getHostAddress
.
toUpperCase
if
(
InetAddressUtils
.
isIPv6Address
(
sAddr
))
{
Log
.
d
(
TAG
,
"IPv6 address detected"
)
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
"IPv6 address detected"
)
return
true
}
}
...
...
@@ -409,18 +409,6 @@ object Utils {
icon
}
def
getDataPath
(
ctx
:
Context
)
:
String
=
{
if
(
data_path
==
null
)
{
if
(
Environment
.
MEDIA_MOUNTED
==
Environment
.
getExternalStorageState
)
{
data_path
=
Environment
.
getExternalStorageDirectory
.
getAbsolutePath
}
else
{
data_path
=
ctx
.
getFilesDir
.
getAbsolutePath
}
Log
.
d
(
TAG
,
"Python Data Path: "
+
data_path
)
}
data_path
}
def
getHasRedirectSupport
:
Boolean
=
{
if
(
hasRedirectSupport
==
-
1
)
initHasRedirectSupported
()
hasRedirectSupport
==
1
...
...
@@ -495,7 +483,7 @@ object Utils {
}
def
runCommand
(
command
:
String
,
timeout
:
Int
)
:
Boolean
=
{
Log
.
d
(
TAG
,
command
)
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
command
)
runScript
(
command
,
null
,
timeout
,
asroot
=
false
)
true
}
...
...
@@ -509,7 +497,7 @@ object Utils {
Log
.
e
(
TAG
,
"Cannot get ROOT permission: "
+
root_shell
)
return
false
}
Log
.
d
(
TAG
,
command
)
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
command
)
runScript
(
command
,
null
,
timeout
,
asroot
=
true
)
true
}
...
...
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