Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
d909941e
Commit
d909941e
authored
Aug 11, 2021
by
Daniel Wolf
Browse files
More logging
parent
97cb0cfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/service/DnsVpnService.kt
View file @
d909941e
...
...
@@ -263,8 +263,10 @@ class DnsVpnService : VpnService(), Runnable, CoroutineScope {
screenStateReceiver
=
registerReceiver
(
listOf
(
Intent
.
ACTION_SCREEN_OFF
,
Intent
.
ACTION_SCREEN_ON
))
{
if
(
it
?.
action
==
Intent
.
ACTION_SCREEN_OFF
)
{
log
(
"Screen is now off"
)
lastScreenOff
=
System
.
currentTimeMillis
()
}
else
{
log
(
"Screen is now on"
)
if
(
lastScreenOff
!=
null
&&
System
.
currentTimeMillis
()
-
lastScreenOff
!!
>=
60000
)
{
if
(
fileDescriptor
!=
null
&&
getPreferences
().
restartVpnOnNetworkChange
)
recreateVpn
(
false
,
null
)
}
...
...
@@ -781,6 +783,7 @@ class DnsVpnService : VpnService(), Runnable, CoroutineScope {
false
}
}
else
if
(
resolveResult
!=
null
){
log
(
"Address resolved."
)
hideNoConnectionNotification
()
false
}
else
{
...
...
app/src/main/java/com/frostnerd/smokescreen/util/proxy/ProxyHttpsHandler.kt
View file @
d909941e
...
...
@@ -73,6 +73,8 @@ class ProxyHttpsHandler(
override
fun
remapDestination
(
destinationAddress
:
InetAddress
,
port
:
Int
):
UpstreamAddress
{
queryCountCallback
?.
invoke
()
// The packet is forwarded using HTTPs and not via socket. Thus the host is specified by it's domain and we do not need to map an IP address.
// This dummy address is used to ensure that even if it were used the packet would end up nowhere.
return
dummyUpstreamAddress
}
...
...
Write
Preview
Supports
Markdown
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