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
dd2abac2
Commit
dd2abac2
authored
Feb 28, 2022
by
chenhuaqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine passing network interface args
parent
403f72fe
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
.../src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
+3
-0
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.
core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
View file @
dd2abac2
...
@@ -101,6 +101,9 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
...
@@ -101,6 +101,9 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
})
})
}
}
})
})
if
(
DataStore
.
outboundBindInterface
.
isNotBlank
())
{
config
.
put
(
"outbound-bind-interface"
,
DataStore
.
outboundBindInterface
)
}
configFile
.
writeText
(
config
.
toString
())
configFile
.
writeText
(
config
.
toString
())
Timber
.
d
(
"prepare start service with config: $config"
)
Timber
.
d
(
"prepare start service with config: $config"
)
...
...
core/src/main/java/com/github/shadowsocks/preference/DataStore.kt
View file @
dd2abac2
...
@@ -107,4 +107,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
...
@@ -107,4 +107,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
var
dirty
:
Boolean
var
dirty
:
Boolean
get
()
=
privateStore
.
getBoolean
(
Key
.
dirty
)
?:
false
get
()
=
privateStore
.
getBoolean
(
Key
.
dirty
)
?:
false
set
(
value
)
=
privateStore
.
putBoolean
(
Key
.
dirty
,
value
)
set
(
value
)
=
privateStore
.
putBoolean
(
Key
.
dirty
,
value
)
var
outboundBindInterface
:
String
get
()
=
privateStore
.
getString
(
Key
.
outboundBindInterface
)
?:
""
set
(
value
)
=
privateStore
.
putString
(
Key
.
outboundBindInterface
,
value
)
}
}
core/src/main/java/com/github/shadowsocks/utils/Constants.kt
View file @
dd2abac2
...
@@ -65,6 +65,7 @@ object Key {
...
@@ -65,6 +65,7 @@ object Key {
const
val
plugin
=
"plugin"
const
val
plugin
=
"plugin"
const
val
pluginConfigure
=
"plugin.configure"
const
val
pluginConfigure
=
"plugin.configure"
const
val
udpFallback
=
"udpFallback"
const
val
udpFallback
=
"udpFallback"
const
val
outboundBindInterface
=
"outboundBindInterface"
const
val
dirty
=
"profileDirty"
const
val
dirty
=
"profileDirty"
...
...
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