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
cf0ad396
Commit
cf0ad396
authored
Feb 23, 2019
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine code style
parent
f4ce8b87
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/net/LocalDnsServer.kt
...rc/main/java/com/github/shadowsocks/net/LocalDnsServer.kt
+2
-2
core/src/main/java/com/github/shadowsocks/utils/DeviceStorageApp.kt
...ain/java/com/github/shadowsocks/utils/DeviceStorageApp.kt
+1
-1
No files found.
core/src/main/java/com/github/shadowsocks/net/LocalDnsServer.kt
View file @
cf0ad396
...
@@ -121,8 +121,8 @@ class LocalDnsServer(private val localResolver: suspend (String) -> Array<InetAd
...
@@ -121,8 +121,8 @@ class LocalDnsServer(private val localResolver: suspend (String) -> Array<InetAd
ByteBuffer
.
wrap
(
prepareDnsResponse
(
request
).
apply
{
ByteBuffer
.
wrap
(
prepareDnsResponse
(
request
).
apply
{
header
.
setFlag
(
Flags
.
RA
.
toInt
())
// recursion available
header
.
setFlag
(
Flags
.
RA
.
toInt
())
// recursion available
for
(
address
in
localResults
)
addRecord
(
when
(
address
)
{
for
(
address
in
localResults
)
addRecord
(
when
(
address
)
{
is
Inet4Address
->
ARecord
(
request
.
question
.
name
,
DClass
.
IN
,
TTL
,
address
)
is
Inet4Address
->
ARecord
(
question
.
name
,
DClass
.
IN
,
TTL
,
address
)
is
Inet6Address
->
AAAARecord
(
request
.
question
.
name
,
DClass
.
IN
,
TTL
,
address
)
is
Inet6Address
->
AAAARecord
(
question
.
name
,
DClass
.
IN
,
TTL
,
address
)
else
->
throw
IllegalStateException
(
"Unsupported address $address"
)
else
->
throw
IllegalStateException
(
"Unsupported address $address"
)
},
Section
.
ANSWER
)
},
Section
.
ANSWER
)
}.
toWire
())
}.
toWire
())
...
...
core/src/main/java/com/github/shadowsocks/utils/DeviceStorageApp.kt
View file @
cf0ad396
...
@@ -36,5 +36,5 @@ class DeviceStorageApp(context: Context) : Application() {
...
@@ -36,5 +36,5 @@ class DeviceStorageApp(context: Context) : Application() {
* Thou shalt not get the REAL underlying application context which would no longer be operating under device
* Thou shalt not get the REAL underlying application context which would no longer be operating under device
* protected storage.
* protected storage.
*/
*/
override
fun
getApplicationContext
()
:
Context
=
this
override
fun
getApplicationContext
()
=
this
}
}
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