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
59f02cfa
Commit
59f02cfa
authored
Apr 28, 2017
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine Firebase remote config
parent
bd782dae
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
4 deletions
+15
-4
build.sbt
build.sbt
+1
-1
mobile/build.sbt
mobile/build.sbt
+2
-2
mobile/src/main/res/xml/default_configs.xml
mobile/src/main/res/xml/default_configs.xml
+7
-0
mobile/src/main/scala/com/github/shadowsocks/BaseService.scala
...e/src/main/scala/com/github/shadowsocks/BaseService.scala
+2
-1
mobile/src/main/scala/com/github/shadowsocks/MainActivity.scala
.../src/main/scala/com/github/shadowsocks/MainActivity.scala
+2
-0
mobile/src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala
...scala/com/github/shadowsocks/ShadowsocksApplication.scala
+1
-0
No files found.
build.sbt
View file @
59f02cfa
...
...
@@ -20,7 +20,7 @@ lazy val commonSettings = Seq(
resConfigs
:=
Seq
(
"ja"
,
"ko"
,
"ru"
,
"zh-rCN"
,
"zh-rTW"
)
)
val
supportLibsVersion
=
"25.
2.0
"
val
supportLibsVersion
=
"25.
3.1
"
lazy
val
root
=
Project
(
id
=
"shadowsocks-android"
,
base
=
file
(
"."
))
.
settings
(
commonSettings
)
.
aggregate
(
plugin
,
mobile
)
...
...
mobile/build.sbt
View file @
59f02cfa
...
...
@@ -4,8 +4,8 @@ enablePlugins(AndroidGms)
android
.
useSupportVectors
name
:=
"shadowsocks"
version
:=
"4.1.
5
"
versionCode
:=
Some
(
18
5
)
version
:=
"4.1.
6
"
versionCode
:=
Some
(
18
6
)
proguardOptions
++=
"-dontwarn com.evernote.android.job.gcm.**"
::
...
...
mobile/src/main/res/xml/default_configs.xml
0 → 100644
View file @
59f02cfa
<?xml version="1.0" encoding="utf-8"?>
<defaultsMap>
<entry>
<key>
proxy_url
</key>
<value>
https://www.socks123.pw/get.php
</value>
</entry>
</defaultsMap>
mobile/src/main/scala/com/github/shadowsocks/BaseService.scala
View file @
59f02cfa
...
...
@@ -126,6 +126,7 @@ trait BaseService extends Service {
def
connect
()
{
profile
.
name
=
profile
.
getName
// save original name before it's (possibly) overwritten by IP addresses
if
(
profile
.
host
==
"198.199.101.152"
)
{
val
client
=
new
OkHttpClient
.
Builder
()
.
dns
(
hostname
=>
Utils
.
resolve
(
hostname
,
enableIPv6
=
false
)
match
{
...
...
@@ -353,7 +354,7 @@ trait BaseService extends Service {
.
put
(
"PrimaryDNS"
,
new
JSONArray
().
put
(
makeDns
(
"Primary"
,
"119.29.29.29"
)))
.
put
(
"AlternativeDNS"
,
remoteDns
)
case
_
=>
config
.
put
(
"PrimaryDNS"
,
new
JSONArray
(
remoteDns
)
)
.
put
(
"PrimaryDNS"
,
remoteDns
)
// no need to setup AlternativeDNS in Acl.ALL/BYPASS_LAN mode
.
put
(
"OnlyPrimaryDNS"
,
true
)
}
...
...
mobile/src/main/scala/com/github/shadowsocks/MainActivity.scala
View file @
59f02cfa
...
...
@@ -384,12 +384,14 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
displayFragment
(
new
AboutFragment
)
case
DRAWER_FAQ
=>
launchUrl
(
getString
(
R
.
string
.
faq_url
))
case
DRAWER_CUSTOM_RULES
=>
displayFragment
(
new
CustomRulesFragment
)
case
_
=>
// ignore
}
true
// unexpected cases will throw exception
}
protected
override
def
onResume
()
{
super
.
onResume
()
app
.
remoteConfig
.
fetch
()
state
match
{
case
State
.
STOPPING
|
State
.
CONNECTING
=>
case
_
=>
hideCircle
()
...
...
mobile/src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala
View file @
59f02cfa
...
...
@@ -148,6 +148,7 @@ class ShadowsocksApplication extends Application {
checkChineseLocale
(
getResources
.
getConfiguration
)
FirebaseApp
.
initializeApp
(
this
)
remoteConfig
.
setDefaults
(
R
.
xml
.
default_configs
);
remoteConfig
.
fetch
().
addOnCompleteListener
(
task
=>
if
(
task
.
isSuccessful
)
remoteConfig
.
activateFetched
())
JobManager
.
create
(
this
).
addJobCreator
(
DonaldTrump
)
...
...
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