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
2a3ffd76
Commit
2a3ffd76
authored
Sep 21, 2015
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update shadowsocks-libev
parent
33b775ea
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
43 additions
and
8 deletions
+43
-8
src/main/aidl/com/github/shadowsocks/aidl/Config.java
src/main/aidl/com/github/shadowsocks/aidl/Config.java
+5
-1
src/main/jni/shadowsocks-libev
src/main/jni/shadowsocks-libev
+1
-1
src/main/res/values-zh/strings.xml
src/main/res/values-zh/strings.xml
+3
-0
src/main/res/values/strings.xml
src/main/res/values/strings.xml
+2
-0
src/main/res/xml/pref_all.xml
src/main/res/xml/pref_all.xml
+6
-0
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+2
-1
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
.../scala/com/github/shadowsocks/ShadowsocksNatService.scala
+6
-0
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
.../scala/com/github/shadowsocks/ShadowsocksVpnService.scala
+6
-2
src/main/scala/com/github/shadowsocks/database/DBHelper.scala
...main/scala/com/github/shadowsocks/database/DBHelper.scala
+3
-1
src/main/scala/com/github/shadowsocks/database/Profile.scala
src/main/scala/com/github/shadowsocks/database/Profile.scala
+3
-0
src/main/scala/com/github/shadowsocks/database/ProfileManager.scala
...cala/com/github/shadowsocks/database/ProfileManager.scala
+2
-0
src/main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
...main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
+3
-2
src/main/scala/com/github/shadowsocks/utils/Constants.scala
src/main/scala/com/github/shadowsocks/utils/Constants.scala
+1
-0
No files found.
src/main/aidl/com/github/shadowsocks/aidl/Config.java
View file @
2a3ffd76
...
@@ -10,6 +10,7 @@ public class Config implements Parcelable {
...
@@ -10,6 +10,7 @@ public class Config implements Parcelable {
public
boolean
isBypassApps
=
false
;
public
boolean
isBypassApps
=
false
;
public
boolean
isTrafficStat
=
false
;
public
boolean
isTrafficStat
=
false
;
public
boolean
isUdpDns
=
false
;
public
boolean
isUdpDns
=
false
;
public
boolean
isAuth
=
false
;
public
String
profileName
=
"Untitled"
;
public
String
profileName
=
"Untitled"
;
public
String
proxy
=
"127.0.0.1"
;
public
String
proxy
=
"127.0.0.1"
;
...
@@ -33,13 +34,14 @@ public class Config implements Parcelable {
...
@@ -33,13 +34,14 @@ public class Config implements Parcelable {
};
};
public
Config
(
boolean
isGlobalProxy
,
boolean
isGFWList
,
boolean
isBypassApps
,
public
Config
(
boolean
isGlobalProxy
,
boolean
isGFWList
,
boolean
isBypassApps
,
boolean
isTrafficStat
,
boolean
isUdpDns
,
String
profileName
,
String
proxy
,
String
sitekey
,
boolean
isTrafficStat
,
boolean
isUdpDns
,
boolean
isAuth
,
String
profileName
,
String
proxy
,
String
sitekey
,
String
encMethod
,
String
proxiedAppString
,
String
route
,
int
remotePort
,
int
localPort
)
{
String
encMethod
,
String
proxiedAppString
,
String
route
,
int
remotePort
,
int
localPort
)
{
this
.
isGlobalProxy
=
isGlobalProxy
;
this
.
isGlobalProxy
=
isGlobalProxy
;
this
.
isGFWList
=
isGFWList
;
this
.
isGFWList
=
isGFWList
;
this
.
isBypassApps
=
isBypassApps
;
this
.
isBypassApps
=
isBypassApps
;
this
.
isTrafficStat
=
isTrafficStat
;
this
.
isTrafficStat
=
isTrafficStat
;
this
.
isUdpDns
=
isUdpDns
;
this
.
isUdpDns
=
isUdpDns
;
this
.
isAuth
=
isAuth
;
this
.
profileName
=
profileName
;
this
.
profileName
=
profileName
;
this
.
proxy
=
proxy
;
this
.
proxy
=
proxy
;
this
.
sitekey
=
sitekey
;
this
.
sitekey
=
sitekey
;
...
@@ -60,6 +62,7 @@ public class Config implements Parcelable {
...
@@ -60,6 +62,7 @@ public class Config implements Parcelable {
isBypassApps
=
in
.
readInt
()
==
1
;
isBypassApps
=
in
.
readInt
()
==
1
;
isTrafficStat
=
in
.
readInt
()
==
1
;
isTrafficStat
=
in
.
readInt
()
==
1
;
isUdpDns
=
in
.
readInt
()
==
1
;
isUdpDns
=
in
.
readInt
()
==
1
;
isAuth
=
in
.
readInt
()
==
1
;
profileName
=
in
.
readString
();
profileName
=
in
.
readString
();
proxy
=
in
.
readString
();
proxy
=
in
.
readString
();
sitekey
=
in
.
readString
();
sitekey
=
in
.
readString
();
...
@@ -80,6 +83,7 @@ public class Config implements Parcelable {
...
@@ -80,6 +83,7 @@ public class Config implements Parcelable {
out
.
writeInt
(
isBypassApps
?
1
:
0
);
out
.
writeInt
(
isBypassApps
?
1
:
0
);
out
.
writeInt
(
isTrafficStat
?
1
:
0
);
out
.
writeInt
(
isTrafficStat
?
1
:
0
);
out
.
writeInt
(
isUdpDns
?
1
:
0
);
out
.
writeInt
(
isUdpDns
?
1
:
0
);
out
.
writeInt
(
isAuth
?
1
:
0
);
out
.
writeString
(
profileName
);
out
.
writeString
(
profileName
);
out
.
writeString
(
proxy
);
out
.
writeString
(
proxy
);
out
.
writeString
(
sitekey
);
out
.
writeString
(
sitekey
);
...
...
shadowsocks-libev
@
5ae4df94
Subproject commit
7e23ae7a75e26b4362b6a390338d945ac972ca14
Subproject commit
5ae4df94e440c4f6826a679a62687ad27303d89b
src/main/res/values-zh/strings.xml
View file @
2a3ffd76
...
@@ -77,6 +77,9 @@
...
@@ -77,6 +77,9 @@
<string
name=
"udp_dns"
>
UDP 转发
</string>
<string
name=
"udp_dns"
>
UDP 转发
</string>
<string
name=
"udp_dns_summary"
>
由远程服务器转发 UDP 协议的数据包
</string>
<string
name=
"udp_dns_summary"
>
由远程服务器转发 UDP 协议的数据包
</string>
<string
name=
"onetime_auth"
>
一次性认证
</string>
<string
name=
"onetime_auth_summary"
>
启用一次性认证(实验性)
</string>
<!-- profile -->
<!-- profile -->
<string
name=
"add_profile_dialog"
>
为影梭添加此配置文件?
</string>
<string
name=
"add_profile_dialog"
>
为影梭添加此配置文件?
</string>
<string-array
name=
"add_profile_methods"
>
<string-array
name=
"add_profile_methods"
>
...
...
src/main/res/values/strings.xml
View file @
2a3ffd76
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
<!-- feature category -->
<!-- feature category -->
<string
name=
"feature_cat"
>
Feature Settings
</string>
<string
name=
"feature_cat"
>
Feature Settings
</string>
<string
name=
"onetime_auth"
>
Onetime Authentication
</string>
<string
name=
"onetime_auth_summary"
>
Enable onetime authentication (Experimental)
</string>
<string
name=
"http_proxy"
>
HTTP Proxy
</string>
<string
name=
"http_proxy"
>
HTTP Proxy
</string>
<string
name=
"http_proxy_summary"
>
Local HTTP Proxy
</string>
<string
name=
"http_proxy_summary"
>
Local HTTP Proxy
</string>
<string
name=
"dns_proxy"
>
DNS Proxy
</string>
<string
name=
"dns_proxy"
>
DNS Proxy
</string>
...
...
src/main/res/xml/pref_all.xml
View file @
2a3ffd76
...
@@ -78,6 +78,12 @@
...
@@ -78,6 +78,12 @@
android:summary=
"@string/udp_dns_summary"
android:summary=
"@string/udp_dns_summary"
android:title=
"@string/udp_dns"
>
android:title=
"@string/udp_dns"
>
</CheckBoxPreference>
</CheckBoxPreference>
<CheckBoxPreference
android:key=
"isAuth"
android:defaultValue=
"false"
android:summary=
"@string/onetime_auth_summary"
android:title=
"@string/onetime_auth"
>
</CheckBoxPreference>
<CheckBoxPreference
<CheckBoxPreference
android:key=
"isAutoConnect"
android:key=
"isAutoConnect"
android:summary=
"@string/auto_connect_summary"
android:summary=
"@string/auto_connect_summary"
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
2a3ffd76
...
@@ -127,7 +127,7 @@ object Shadowsocks {
...
@@ -127,7 +127,7 @@ object Shadowsocks {
val
PROXY_PREFS
=
Array
(
Key
.
profileName
,
Key
.
proxy
,
Key
.
remotePort
,
Key
.
localPort
,
Key
.
sitekey
,
val
PROXY_PREFS
=
Array
(
Key
.
profileName
,
Key
.
proxy
,
Key
.
remotePort
,
Key
.
localPort
,
Key
.
sitekey
,
Key
.
encMethod
)
Key
.
encMethod
)
val
FEATRUE_PREFS
=
Array
(
Key
.
route
,
Key
.
isGlobalProxy
,
Key
.
proxyedApps
,
val
FEATRUE_PREFS
=
Array
(
Key
.
route
,
Key
.
isGlobalProxy
,
Key
.
proxyedApps
,
Key
.
isUdpDns
,
Key
.
isAutoConnect
)
Key
.
isUdpDns
,
Key
.
isAut
h
,
Key
.
isAut
oConnect
)
val
EXECUTABLES
=
Array
(
Executable
.
PDNSD
,
Executable
.
REDSOCKS
,
Executable
.
SS_TUNNEL
,
Executable
.
SS_LOCAL
,
Executable
.
TUN2SOCKS
)
val
EXECUTABLES
=
Array
(
Executable
.
PDNSD
,
Executable
.
REDSOCKS
,
Executable
.
SS_TUNNEL
,
Executable
.
SS_LOCAL
,
Executable
.
TUN2SOCKS
)
...
@@ -166,6 +166,7 @@ object Shadowsocks {
...
@@ -166,6 +166,7 @@ object Shadowsocks {
case
Key
.
route
=>
updateListPreference
(
pref
,
profile
.
route
)
case
Key
.
route
=>
updateListPreference
(
pref
,
profile
.
route
)
case
Key
.
isGlobalProxy
=>
updateCheckBoxPreference
(
pref
,
profile
.
global
)
case
Key
.
isGlobalProxy
=>
updateCheckBoxPreference
(
pref
,
profile
.
global
)
case
Key
.
isUdpDns
=>
updateCheckBoxPreference
(
pref
,
profile
.
udpdns
)
case
Key
.
isUdpDns
=>
updateCheckBoxPreference
(
pref
,
profile
.
udpdns
)
case
Key
.
isAuth
=>
updateCheckBoxPreference
(
pref
,
profile
.
auth
)
case
_
=>
case
_
=>
}
}
}
}
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
View file @
2a3ffd76
...
@@ -205,6 +205,8 @@ class ShadowsocksNatService extends Service with BaseService {
...
@@ -205,6 +205,8 @@ class ShadowsocksNatService extends Service with BaseService {
,
"-c"
,
Path
.
BASE
+
"ss-local-nat.conf"
,
"-c"
,
Path
.
BASE
+
"ss-local-nat.conf"
,
"-f"
,
Path
.
BASE
+
"ss-local-nat.pid"
)
,
"-f"
,
Path
.
BASE
+
"ss-local-nat.pid"
)
if
(
config
.
isAuth
)
cmd
+=
"-A"
if
(
config
.
route
!=
Route
.
ALL
)
{
if
(
config
.
route
!=
Route
.
ALL
)
{
cmd
+=
"--acl"
cmd
+=
"--acl"
cmd
+=
(
Path
.
BASE
+
"acl.list"
)
cmd
+=
(
Path
.
BASE
+
"acl.list"
)
...
@@ -233,6 +235,8 @@ class ShadowsocksNatService extends Service with BaseService {
...
@@ -233,6 +235,8 @@ class ShadowsocksNatService extends Service with BaseService {
cmd
+=
(
"-l"
,
"8153"
)
cmd
+=
(
"-l"
,
"8153"
)
if
(
config
.
isAuth
)
cmd
+=
"-A"
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
.
mkString
(
" "
))
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
.
mkString
(
" "
))
Console
.
runCommand
(
cmd
.
mkString
(
" "
))
Console
.
runCommand
(
cmd
.
mkString
(
" "
))
...
@@ -254,6 +258,8 @@ class ShadowsocksNatService extends Service with BaseService {
...
@@ -254,6 +258,8 @@ class ShadowsocksNatService extends Service with BaseService {
,
"-c"
,
Path
.
BASE
+
"ss-tunnel-nat.conf"
,
"-c"
,
Path
.
BASE
+
"ss-tunnel-nat.conf"
,
"-f"
,
Path
.
BASE
+
"ss-tunnel-nat.pid"
)
,
"-f"
,
Path
.
BASE
+
"ss-tunnel-nat.pid"
)
if
(
config
.
isAuth
)
cmdBuf
+=
"-A"
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmdBuf
.
mkString
(
" "
))
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmdBuf
.
mkString
(
" "
))
Console
.
runCommand
(
cmdBuf
.
mkString
(
" "
))
Console
.
runCommand
(
cmdBuf
.
mkString
(
" "
))
}
}
...
...
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
View file @
2a3ffd76
...
@@ -302,12 +302,14 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -302,12 +302,14 @@ class ShadowsocksVpnService extends VpnService with BaseService {
})
})
val
cmd
=
new
ArrayBuffer
[
String
]
val
cmd
=
new
ArrayBuffer
[
String
]
cmd
+=(
Path
.
BASE
+
"ss-local"
,
"-V"
,
"-u"
cmd
+=
(
Path
.
BASE
+
"ss-local"
,
"-V"
,
"-u"
,
"-b"
,
"127.0.0.1"
,
"-b"
,
"127.0.0.1"
,
"-t"
,
"600"
,
"-t"
,
"600"
,
"-c"
,
Path
.
BASE
+
"ss-local-vpn.conf"
,
"-c"
,
Path
.
BASE
+
"ss-local-vpn.conf"
,
"-f"
,
Path
.
BASE
+
"ss-local-vpn.pid"
)
,
"-f"
,
Path
.
BASE
+
"ss-local-vpn.pid"
)
if
(
config
.
isAuth
)
cmd
+=
"-A"
if
(
config
.
route
!=
Route
.
ALL
)
{
if
(
config
.
route
!=
Route
.
ALL
)
{
cmd
+=
"--acl"
cmd
+=
"--acl"
cmd
+=
(
Path
.
BASE
+
"acl.list"
)
cmd
+=
(
Path
.
BASE
+
"acl.list"
)
...
@@ -325,7 +327,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -325,7 +327,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
p
.
println
(
conf
)
p
.
println
(
conf
)
})
})
val
cmd
=
new
ArrayBuffer
[
String
]
val
cmd
=
new
ArrayBuffer
[
String
]
cmd
+=(
Path
.
BASE
+
"ss-tunnel"
cmd
+=
(
Path
.
BASE
+
"ss-tunnel"
,
"-V"
,
"-V"
,
"-u"
,
"-u"
,
"-t"
,
"10"
,
"-t"
,
"10"
...
@@ -335,6 +337,8 @@ class ShadowsocksVpnService extends VpnService with BaseService {
...
@@ -335,6 +337,8 @@ class ShadowsocksVpnService extends VpnService with BaseService {
,
"-c"
,
Path
.
BASE
+
"ss-tunnel-vpn.conf"
,
"-c"
,
Path
.
BASE
+
"ss-tunnel-vpn.conf"
,
"-f"
,
Path
.
BASE
+
"ss-tunnel-vpn.pid"
)
,
"-f"
,
Path
.
BASE
+
"ss-tunnel-vpn.pid"
)
if
(
config
.
isAuth
)
cmd
+=
"-A"
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
.
mkString
(
" "
))
if
(
BuildConfig
.
DEBUG
)
Log
.
d
(
TAG
,
cmd
.
mkString
(
" "
))
Console
.
runCommand
(
cmd
.
mkString
(
" "
))
Console
.
runCommand
(
cmd
.
mkString
(
" "
))
}
}
...
...
src/main/scala/com/github/shadowsocks/database/DBHelper.scala
View file @
2a3ffd76
...
@@ -51,7 +51,7 @@ object DBHelper {
...
@@ -51,7 +51,7 @@ object DBHelper {
}
}
class
DBHelper
(
val
context
:
Context
)
class
DBHelper
(
val
context
:
Context
)
extends
OrmLiteSqliteOpenHelper
(
context
,
DBHelper
.
PROFILE
,
null
,
9
)
{
extends
OrmLiteSqliteOpenHelper
(
context
,
DBHelper
.
PROFILE
,
null
,
10
)
{
lazy
val
profileDao
:
Dao
[
Profile
,
Int
]
=
getDao
(
classOf
[
Profile
])
lazy
val
profileDao
:
Dao
[
Profile
,
Int
]
=
getDao
(
classOf
[
Profile
])
...
@@ -67,6 +67,8 @@ class DBHelper(val context: Context)
...
@@ -67,6 +67,8 @@ class DBHelper(val context: Context)
profileDao
.
executeRaw
(
"ALTER TABLE `profile` ADD COLUMN route VARCHAR;"
)
profileDao
.
executeRaw
(
"ALTER TABLE `profile` ADD COLUMN route VARCHAR;"
)
}
else
if
(
oldVersion
<
9
)
{
}
else
if
(
oldVersion
<
9
)
{
profileDao
.
executeRaw
(
"ALTER TABLE `profile` ADD COLUMN route VARCHAR;"
)
profileDao
.
executeRaw
(
"ALTER TABLE `profile` ADD COLUMN route VARCHAR;"
)
}
else
if
(
oldVersion
<
10
)
{
profileDao
.
executeRaw
(
"ALTER TABLE `profile` ADD COLUMN auth SMALLINT;"
)
}
else
{
}
else
{
profileDao
.
executeRaw
(
"DROP TABLE IF EXISTS 'profile';"
)
profileDao
.
executeRaw
(
"DROP TABLE IF EXISTS 'profile';"
)
onCreate
(
database
,
connectionSource
)
onCreate
(
database
,
connectionSource
)
...
...
src/main/scala/com/github/shadowsocks/database/Profile.scala
View file @
2a3ffd76
...
@@ -90,6 +90,9 @@ class Profile {
...
@@ -90,6 +90,9 @@ class Profile {
@DatabaseField
@DatabaseField
var
udpdns
:
Boolean
=
false
var
udpdns
:
Boolean
=
false
@DatabaseField
var
auth
:
Boolean
=
false
@DatabaseField
(
dataType
=
DataType
.
LONG_STRING
)
@DatabaseField
(
dataType
=
DataType
.
LONG_STRING
)
var
individual
:
String
=
""
var
individual
:
String
=
""
...
...
src/main/scala/com/github/shadowsocks/database/ProfileManager.scala
View file @
2a3ffd76
...
@@ -122,6 +122,7 @@ class ProfileManager(settings: SharedPreferences, dbHelper: DBHelper) {
...
@@ -122,6 +122,7 @@ class ProfileManager(settings: SharedPreferences, dbHelper: DBHelper) {
edit
.
putBoolean
(
Key
.
isBypassApps
,
profile
.
bypass
)
edit
.
putBoolean
(
Key
.
isBypassApps
,
profile
.
bypass
)
edit
.
putBoolean
(
Key
.
isTrafficStat
,
profile
.
traffic
)
edit
.
putBoolean
(
Key
.
isTrafficStat
,
profile
.
traffic
)
edit
.
putBoolean
(
Key
.
isUdpDns
,
profile
.
udpdns
)
edit
.
putBoolean
(
Key
.
isUdpDns
,
profile
.
udpdns
)
edit
.
putBoolean
(
Key
.
isAuth
,
profile
.
auth
)
edit
.
putString
(
Key
.
profileName
,
profile
.
name
)
edit
.
putString
(
Key
.
profileName
,
profile
.
name
)
edit
.
putString
(
Key
.
proxy
,
profile
.
host
)
edit
.
putString
(
Key
.
proxy
,
profile
.
host
)
edit
.
putString
(
Key
.
sitekey
,
profile
.
password
)
edit
.
putString
(
Key
.
sitekey
,
profile
.
password
)
...
@@ -146,6 +147,7 @@ class ProfileManager(settings: SharedPreferences, dbHelper: DBHelper) {
...
@@ -146,6 +147,7 @@ class ProfileManager(settings: SharedPreferences, dbHelper: DBHelper) {
profile
.
bypass
=
settings
.
getBoolean
(
Key
.
isBypassApps
,
false
)
profile
.
bypass
=
settings
.
getBoolean
(
Key
.
isBypassApps
,
false
)
profile
.
traffic
=
settings
.
getBoolean
(
Key
.
isTrafficStat
,
false
)
profile
.
traffic
=
settings
.
getBoolean
(
Key
.
isTrafficStat
,
false
)
profile
.
udpdns
=
settings
.
getBoolean
(
Key
.
isUdpDns
,
false
)
profile
.
udpdns
=
settings
.
getBoolean
(
Key
.
isUdpDns
,
false
)
profile
.
auth
=
settings
.
getBoolean
(
Key
.
isAuth
,
false
)
profile
.
name
=
settings
.
getString
(
Key
.
profileName
,
"default"
)
profile
.
name
=
settings
.
getString
(
Key
.
profileName
,
"default"
)
profile
.
host
=
settings
.
getString
(
Key
.
proxy
,
"127.0.0.1"
)
profile
.
host
=
settings
.
getString
(
Key
.
proxy
,
"127.0.0.1"
)
profile
.
password
=
settings
.
getString
(
Key
.
sitekey
,
"default"
)
profile
.
password
=
settings
.
getString
(
Key
.
sitekey
,
"default"
)
...
...
src/main/scala/com/github/shadowsocks/utils/ConfigUtils.scala
View file @
2a3ffd76
...
@@ -242,7 +242,7 @@ object ConfigUtils {
...
@@ -242,7 +242,7 @@ object ConfigUtils {
val
method
=
proxy
(
3
).
trim
val
method
=
proxy
(
3
).
trim
new
Config
(
config
.
isGlobalProxy
,
config
.
isGFWList
,
config
.
isBypassApps
,
config
.
isTrafficStat
,
new
Config
(
config
.
isGlobalProxy
,
config
.
isGFWList
,
config
.
isBypassApps
,
config
.
isTrafficStat
,
config
.
isUdpDns
,
config
.
profileName
,
host
,
password
,
method
,
config
.
proxiedAppString
,
config
.
route
,
port
,
config
.
isUdpDns
,
config
.
isAuth
,
config
.
profileName
,
host
,
password
,
method
,
config
.
proxiedAppString
,
config
.
route
,
port
,
config
.
localPort
)
config
.
localPort
)
}
}
...
@@ -252,6 +252,7 @@ object ConfigUtils {
...
@@ -252,6 +252,7 @@ object ConfigUtils {
val
isBypassApps
=
settings
.
getBoolean
(
Key
.
isBypassApps
,
false
)
val
isBypassApps
=
settings
.
getBoolean
(
Key
.
isBypassApps
,
false
)
val
isTrafficStat
=
settings
.
getBoolean
(
Key
.
isTrafficStat
,
false
)
val
isTrafficStat
=
settings
.
getBoolean
(
Key
.
isTrafficStat
,
false
)
val
isUdpDns
=
settings
.
getBoolean
(
Key
.
isUdpDns
,
false
)
val
isUdpDns
=
settings
.
getBoolean
(
Key
.
isUdpDns
,
false
)
val
isAuth
=
settings
.
getBoolean
(
Key
.
isAuth
,
false
)
val
profileName
=
settings
.
getString
(
Key
.
profileName
,
"default"
)
val
profileName
=
settings
.
getString
(
Key
.
profileName
,
"default"
)
val
proxy
=
settings
.
getString
(
Key
.
proxy
,
"127.0.0.1"
)
val
proxy
=
settings
.
getString
(
Key
.
proxy
,
"127.0.0.1"
)
...
@@ -273,7 +274,7 @@ object ConfigUtils {
...
@@ -273,7 +274,7 @@ object ConfigUtils {
}
}
val
proxiedAppString
=
settings
.
getString
(
Key
.
proxied
,
""
)
val
proxiedAppString
=
settings
.
getString
(
Key
.
proxied
,
""
)
new
Config
(
isGlobalProxy
,
isGFWList
,
isBypassApps
,
isTrafficStat
,
isUdpDns
,
profileName
,
proxy
,
new
Config
(
isGlobalProxy
,
isGFWList
,
isBypassApps
,
isTrafficStat
,
isUdpDns
,
isAuth
,
profileName
,
proxy
,
sitekey
,
encMethod
,
proxiedAppString
,
route
,
remotePort
,
localPort
)
sitekey
,
encMethod
,
proxiedAppString
,
route
,
remotePort
,
localPort
)
}
}
}
}
src/main/scala/com/github/shadowsocks/utils/Constants.scala
View file @
2a3ffd76
...
@@ -79,6 +79,7 @@ object Key {
...
@@ -79,6 +79,7 @@ object Key {
val
isBypassApps
=
"isBypassApps"
val
isBypassApps
=
"isBypassApps"
val
isTrafficStat
=
"isTrafficStat"
val
isTrafficStat
=
"isTrafficStat"
val
isUdpDns
=
"isUdpDns"
val
isUdpDns
=
"isUdpDns"
val
isAuth
=
"isAuth"
val
proxy
=
"proxy"
val
proxy
=
"proxy"
val
sitekey
=
"sitekey"
val
sitekey
=
"sitekey"
...
...
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