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
976c3e4b
Commit
976c3e4b
authored
Jan 27, 2019
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant suspend modifiers
parent
64b78846
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
.../src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
+1
-1
core/src/main/java/com/github/shadowsocks/bg/TransproxyService.kt
.../main/java/com/github/shadowsocks/bg/TransproxyService.kt
+2
-2
No files found.
core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
View file @
976c3e4b
...
@@ -92,7 +92,7 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
...
@@ -92,7 +92,7 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
* Sensitive shadowsocks configuration file requires extra protection. It may be stored in encrypted storage or
* Sensitive shadowsocks configuration file requires extra protection. It may be stored in encrypted storage or
* device storage, depending on which is currently available.
* device storage, depending on which is currently available.
*/
*/
suspend
fun
start
(
service
:
BaseService
.
Interface
,
stat
:
File
,
configFile
:
File
,
extraFlag
:
String
?
=
null
)
{
fun
start
(
service
:
BaseService
.
Interface
,
stat
:
File
,
configFile
:
File
,
extraFlag
:
String
?
=
null
)
{
trafficMonitor
=
TrafficMonitor
(
stat
)
trafficMonitor
=
TrafficMonitor
(
stat
)
this
.
configFile
=
configFile
this
.
configFile
=
configFile
...
...
core/src/main/java/com/github/shadowsocks/bg/TransproxyService.kt
View file @
976c3e4b
...
@@ -36,7 +36,7 @@ class TransproxyService : Service(), LocalDnsService.Interface {
...
@@ -36,7 +36,7 @@ class TransproxyService : Service(), LocalDnsService.Interface {
override
fun
onStartCommand
(
intent
:
Intent
?,
flags
:
Int
,
startId
:
Int
):
Int
=
override
fun
onStartCommand
(
intent
:
Intent
?,
flags
:
Int
,
startId
:
Int
):
Int
=
super
<
LocalDnsService
.
Interface
>.
onStartCommand
(
intent
,
flags
,
startId
)
super
<
LocalDnsService
.
Interface
>.
onStartCommand
(
intent
,
flags
,
startId
)
private
suspend
fun
startDNSTunnel
()
{
private
fun
startDNSTunnel
()
{
val
proxy
=
data
.
proxy
!!
val
proxy
=
data
.
proxy
!!
val
cmd
=
arrayListOf
(
File
(
applicationInfo
.
nativeLibraryDir
,
Executable
.
SS_TUNNEL
).
absolutePath
,
val
cmd
=
arrayListOf
(
File
(
applicationInfo
.
nativeLibraryDir
,
Executable
.
SS_TUNNEL
).
absolutePath
,
"-t"
,
"10"
,
"-t"
,
"10"
,
...
@@ -50,7 +50,7 @@ class TransproxyService : Service(), LocalDnsService.Interface {
...
@@ -50,7 +50,7 @@ class TransproxyService : Service(), LocalDnsService.Interface {
data
.
processes
!!
.
start
(
cmd
)
data
.
processes
!!
.
start
(
cmd
)
}
}
private
suspend
fun
startRedsocksDaemon
()
{
private
fun
startRedsocksDaemon
()
{
File
(
Core
.
deviceStorage
.
noBackupFilesDir
,
"redsocks.conf"
).
writeText
(
"""base {
File
(
Core
.
deviceStorage
.
noBackupFilesDir
,
"redsocks.conf"
).
writeText
(
"""base {
log_debug = off;
log_debug = off;
log_info = off;
log_info = off;
...
...
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