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
8e83272f
Commit
8e83272f
authored
Apr 19, 2018
by
V.E.O
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove test URL for ChinaList
parent
d17d791b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
13 deletions
+1
-13
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
+1
-3
mobile/src/main/java/com/github/shadowsocks/preference/DataStore.kt
.../main/java/com/github/shadowsocks/preference/DataStore.kt
+0
-4
mobile/src/main/java/com/github/shadowsocks/utils/Constants.kt
...e/src/main/java/com/github/shadowsocks/utils/Constants.kt
+0
-1
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+0
-1
mobile/src/main/res/xml/pref_global.xml
mobile/src/main/res/xml/pref_global.xml
+0
-4
No files found.
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
View file @
8e83272f
...
@@ -166,9 +166,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
...
@@ -166,9 +166,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
*/
*/
private
fun
testConnection
(
id
:
Int
)
{
private
fun
testConnection
(
id
:
Int
)
{
val
(
success
,
result
)
=
try
{
val
(
success
,
result
)
=
try
{
val
urlString
=
when
(
app
.
currentProfile
!!
.
route
)
{
val
urlString
=
DataStore
.
testUrl
Acl
.
CHINALIST
->
DataStore
.
testUrlChinaList
else
->
DataStore
.
testUrl
}
val
url
=
URL
(
urlString
)
val
url
=
URL
(
urlString
)
if
(
url
.
protocol
!=
"https"
)
if
(
url
.
protocol
!=
"https"
)
throw
MalformedURLException
(
getString
(
R
.
string
.
connection_test_url_non_https
,
urlString
))
throw
MalformedURLException
(
getString
(
R
.
string
.
connection_test_url_non_https
,
urlString
))
...
...
mobile/src/main/java/com/github/shadowsocks/preference/DataStore.kt
View file @
8e83272f
...
@@ -54,9 +54,6 @@ object DataStore {
...
@@ -54,9 +54,6 @@ object DataStore {
var
testUrl
:
String
var
testUrl
:
String
get
()
=
publicStore
.
getString
(
Key
.
testUrl
)
?:
"https://www.google.com/generate_204"
get
()
=
publicStore
.
getString
(
Key
.
testUrl
)
?:
"https://www.google.com/generate_204"
set
(
value
)
=
publicStore
.
putString
(
Key
.
testUrl
,
value
)
set
(
value
)
=
publicStore
.
putString
(
Key
.
testUrl
,
value
)
var
testUrlChinaList
:
String
get
()
=
publicStore
.
getString
(
Key
.
testUrlChinaList
)
?:
"https://www.qualcomm.cn/generate_204"
set
(
value
)
=
publicStore
.
putString
(
Key
.
testUrlChinaList
,
value
)
var
serviceMode
:
String
var
serviceMode
:
String
get
()
=
publicStore
.
getString
(
Key
.
serviceMode
)
?:
Key
.
modeVpn
get
()
=
publicStore
.
getString
(
Key
.
serviceMode
)
?:
Key
.
modeVpn
set
(
value
)
=
publicStore
.
putString
(
Key
.
serviceMode
,
value
)
set
(
value
)
=
publicStore
.
putString
(
Key
.
serviceMode
,
value
)
...
@@ -73,7 +70,6 @@ object DataStore {
...
@@ -73,7 +70,6 @@ object DataStore {
fun
initGlobal
()
{
fun
initGlobal
()
{
// temporary workaround for support lib bug
// temporary workaround for support lib bug
if
(
publicStore
.
getString
(
Key
.
testUrl
)
==
null
)
testUrl
=
testUrl
if
(
publicStore
.
getString
(
Key
.
testUrl
)
==
null
)
testUrl
=
testUrl
if
(
publicStore
.
getString
(
Key
.
testUrlChinaList
)
==
null
)
testUrlChinaList
=
testUrlChinaList
if
(
publicStore
.
getString
(
Key
.
serviceMode
)
==
null
)
serviceMode
=
serviceMode
if
(
publicStore
.
getString
(
Key
.
serviceMode
)
==
null
)
serviceMode
=
serviceMode
if
(
publicStore
.
getString
(
Key
.
portProxy
)
==
null
)
portProxy
=
portProxy
if
(
publicStore
.
getString
(
Key
.
portProxy
)
==
null
)
portProxy
=
portProxy
if
(
publicStore
.
getString
(
Key
.
portLocalDns
)
==
null
)
portLocalDns
=
portLocalDns
if
(
publicStore
.
getString
(
Key
.
portLocalDns
)
==
null
)
portLocalDns
=
portLocalDns
...
...
mobile/src/main/java/com/github/shadowsocks/utils/Constants.kt
View file @
8e83272f
...
@@ -50,7 +50,6 @@ object Key {
...
@@ -50,7 +50,6 @@ object Key {
const
val
udpdns
=
"isUdpDns"
const
val
udpdns
=
"isUdpDns"
const
val
ipv6
=
"isIpv6"
const
val
ipv6
=
"isIpv6"
const
val
testUrl
=
"testUrl"
const
val
testUrl
=
"testUrl"
const
val
testUrlChinaList
=
"testUrlChinaList"
const
val
host
=
"proxy"
const
val
host
=
"proxy"
const
val
password
=
"sitekey"
const
val
password
=
"sitekey"
...
...
mobile/src/main/res/values/strings.xml
View file @
8e83272f
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
<string
name=
"stat_summary"
>
Sent: \t\t\t\t\t%3$s\t↑\t%1$s\nReceived: \t%4$s\t↓\t%2$s
</string>
<string
name=
"stat_summary"
>
Sent: \t\t\t\t\t%3$s\t↑\t%1$s\nReceived: \t%4$s\t↓\t%2$s
</string>
<string
name=
"speed"
>
%s/s
</string>
<string
name=
"speed"
>
%s/s
</string>
<string
name=
"connection_test_url"
>
Connection Test URL
</string>
<string
name=
"connection_test_url"
>
Connection Test URL
</string>
<string
name=
"connection_test_url_chinalist"
>
Connection Test URL (China List mode only)
</string>
<string
name=
"connection_test_pending"
>
Check Connectivity
</string>
<string
name=
"connection_test_pending"
>
Check Connectivity
</string>
<string
name=
"connection_test_testing"
>
Testing…
</string>
<string
name=
"connection_test_testing"
>
Testing…
</string>
<string
name=
"connection_test_available"
>
Success: %dms latency
</string>
<string
name=
"connection_test_available"
>
Success: %dms latency
</string>
...
...
mobile/src/main/res/xml/pref_global.xml
View file @
8e83272f
...
@@ -16,10 +16,6 @@
...
@@ -16,10 +16,6 @@
android:key=
"testUrl"
android:key=
"testUrl"
android:title=
"@string/connection_test_url"
android:title=
"@string/connection_test_url"
app:pref_summaryHasText=
"%s"
/>
app:pref_summaryHasText=
"%s"
/>
<AutoSummaryEditTextPreference
android:key=
"testUrlChinaList"
android:title=
"@string/connection_test_url_chinalist"
app:pref_summaryHasText=
"%s"
/>
<PreferenceCategory
<PreferenceCategory
android:title=
"@string/advanced"
>
android:title=
"@string/advanced"
>
<SimpleMenuPreference
<SimpleMenuPreference
...
...
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