Commit 22924ff9 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

The VPN always uses the current active network

parent 23da5154
......@@ -819,6 +819,9 @@ class DnsVpnService : VpnService(), Runnable {
private fun createBuilder(): Builder {
log("Creating the VpnBuilder.")
val builder = Builder()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
builder.setUnderlyingNetworks(null)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val mgr =
getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
......
Supports Markdown
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