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
1437b43d
Commit
1437b43d
authored
Mar 14, 2021
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine the code style
parent
8e3d20b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
.../src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
+4
-5
No files found.
core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
View file @
1437b43d
...
...
@@ -71,7 +71,6 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
*/
fun
start
(
service
:
BaseService
.
Interface
,
stat
:
File
,
configFile
:
File
,
mode
:
String
,
dnsRelay
:
Boolean
=
true
)
{
// setup traffic monitor path
trafficMonitor
=
TrafficMonitor
(
stat
)
...
...
@@ -92,9 +91,9 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
// local SOCKS5 proxy
val
proxyConfig
=
JSONObject
()
proxyConfig
.
put
(
"local_address"
,
"${DataStore.listenAddress}"
)
proxyConfig
.
put
(
"local_address"
,
DataStore
.
listenAddress
)
proxyConfig
.
put
(
"local_port"
,
DataStore
.
portProxy
)
proxyConfig
.
put
(
"local_udp_address"
,
"${DataStore.listenAddress}"
)
proxyConfig
.
put
(
"local_udp_address"
,
DataStore
.
listenAddress
)
proxyConfig
.
put
(
"local_udp_port"
,
DataStore
.
portProxy
)
proxyConfig
.
put
(
"mode"
,
mode
)
localConfigs
.
put
(
proxyConfig
)
...
...
@@ -106,10 +105,10 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
throw
BaseService
.
ExpectedExceptionWrapper
(
e
)
}.
let
{
dns
->
val
dnsConfig
=
JSONObject
()
dnsConfig
.
put
(
"local_address"
,
"${DataStore.listenAddress}"
)
dnsConfig
.
put
(
"local_address"
,
DataStore
.
listenAddress
)
dnsConfig
.
put
(
"local_port"
,
DataStore
.
portLocalDns
)
dnsConfig
.
put
(
"local_dns_address"
,
"local_dns_path"
)
dnsConfig
.
put
(
"remote_dns_address"
,
"${dns.host ?: "
0.0.0.0
"}
"
)
dnsConfig
.
put
(
"remote_dns_address"
,
dns
.
host
?:
"0.0.0.0
"
)
dnsConfig
.
put
(
"remote_dns_port"
,
if
(
dns
.
port
<
0
)
53
else
dns
.
port
)
dnsConfig
.
put
(
"protocol"
,
"dns"
)
localConfigs
.
put
(
dnsConfig
)
...
...
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