Commit d909941e authored by Daniel Wolf's avatar Daniel Wolf
Browse files

More logging

parent 97cb0cfe
......@@ -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 {
......
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment