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
5d449fca
Commit
5d449fca
authored
Apr 02, 2022
by
chenhuaqing
Committed by
hanakeichen
Apr 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add `dnsServer` field
parent
b53fd3fa
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
1 deletion
+12
-1
app/src/main/java/com/ccwangluo/accelerator/model/Game.kt
app/src/main/java/com/ccwangluo/accelerator/model/Game.kt
+1
-0
app/src/main/java/com/ccwangluo/accelerator/utils/AcceleratorUtils.kt
.../java/com/ccwangluo/accelerator/utils/AcceleratorUtils.kt
+1
-0
core/src/main/java/com/ccnet/acc/AccVpn.kt
core/src/main/java/com/ccnet/acc/AccVpn.kt
+6
-1
core/src/main/java/com/github/shadowsocks/preference/DataStore.kt
.../main/java/com/github/shadowsocks/preference/DataStore.kt
+3
-0
core/src/main/java/com/github/shadowsocks/utils/Constants.kt
core/src/main/java/com/github/shadowsocks/utils/Constants.kt
+1
-0
No files found.
app/src/main/java/com/ccwangluo/accelerator/model/Game.kt
View file @
5d449fca
...
@@ -18,4 +18,5 @@ data class GameInfo(
...
@@ -18,4 +18,5 @@ data class GameInfo(
val
packageName
:
String
,
val
packageName
:
String
,
val
boosterPackageName
:
String
,
val
boosterPackageName
:
String
,
val
proxyRules
:
String
,
val
proxyRules
:
String
,
val
dnsServer
:
String
,
)
)
\ No newline at end of file
app/src/main/java/com/ccwangluo/accelerator/utils/AcceleratorUtils.kt
View file @
5d449fca
...
@@ -207,6 +207,7 @@ object AcceleratorUtils : TencentLocationListener {
...
@@ -207,6 +207,7 @@ object AcceleratorUtils : TencentLocationListener {
}
}
}
}
DataStore
.
proxyRules
=
game
.
proxyRules
DataStore
.
proxyRules
=
game
.
proxyRules
DataStore
.
dnsServer
=
game
.
dnsServer
val
serverPort
=
game
.
boosterServer
.
split
(
":"
)
val
serverPort
=
game
.
boosterServer
.
split
(
":"
)
DataStore
.
pingAccHost
=
serverPort
[
0
]
DataStore
.
pingAccHost
=
serverPort
[
0
]
...
...
core/src/main/java/com/ccnet/acc/AccVpn.kt
View file @
5d449fca
...
@@ -16,10 +16,15 @@ object AccVpn {
...
@@ -16,10 +16,15 @@ object AccVpn {
fun
writeConfig
(
context
:
Context
,
tunFd
:
Int
,
profile
:
Profile
)
{
fun
writeConfig
(
context
:
Context
,
tunFd
:
Int
,
profile
:
Profile
)
{
val
proxyRules
=
DataStore
.
proxyRules
val
proxyRules
=
DataStore
.
proxyRules
val
dnsServer
=
if
(
DataStore
.
dnsServer
.
isNotBlank
())
{
DataStore
.
dnsServer
}
else
{
"8.8.8.8"
}
val
configContent
=
"""
val
configContent
=
"""
[General]
[General]
loglevel = trace
loglevel = trace
dns-server =
8.8.8.8
dns-server =
$dnsServer
tun-fd = $tunFd
tun-fd = $tunFd
[Proxy]
[Proxy]
Direct = direct
Direct = direct
...
...
core/src/main/java/com/github/shadowsocks/preference/DataStore.kt
View file @
5d449fca
...
@@ -134,4 +134,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
...
@@ -134,4 +134,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
var
proxyRules
:
String
var
proxyRules
:
String
get
()
=
privateStore
.
getString
(
Key
.
proxyRules
)
?:
""
get
()
=
privateStore
.
getString
(
Key
.
proxyRules
)
?:
""
set
(
value
)
=
privateStore
.
putString
(
Key
.
proxyRules
,
value
)
set
(
value
)
=
privateStore
.
putString
(
Key
.
proxyRules
,
value
)
var
dnsServer
:
String
get
()
=
privateStore
.
getString
(
Key
.
dnsServer
)
?:
""
set
(
value
)
=
privateStore
.
putString
(
Key
.
dnsServer
,
value
)
}
}
core/src/main/java/com/github/shadowsocks/utils/Constants.kt
View file @
5d449fca
...
@@ -80,6 +80,7 @@ object Key {
...
@@ -80,6 +80,7 @@ object Key {
const
val
pingNetReachableHost
=
"pingNetReachableHost"
const
val
pingNetReachableHost
=
"pingNetReachableHost"
const
val
proxyRules
=
"proxyRules"
const
val
proxyRules
=
"proxyRules"
const
val
dnsServer
=
"dnsServer"
// TV specific values
// TV specific values
const
val
controlStats
=
"control.stats"
const
val
controlStats
=
"control.stats"
...
...
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