Update local DNS transport registration
This commit is contained in:
@@ -150,7 +150,6 @@ class BoxService(
|
||||
}
|
||||
|
||||
DefaultNetworkMonitor.start()
|
||||
Libbox.registerLocalDNSTransport(LocalResolver)
|
||||
Libbox.setMemoryLimit(!Settings.disableMemoryLimit)
|
||||
|
||||
val newService = try {
|
||||
@@ -263,7 +262,6 @@ class BoxService(
|
||||
}
|
||||
commandServer?.setService(null)
|
||||
boxService = null
|
||||
Libbox.registerLocalDNSTransport(null)
|
||||
DefaultNetworkMonitor.stop()
|
||||
|
||||
commandServer?.apply {
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.util.Log
|
||||
import androidx.annotation.RequiresApi
|
||||
import io.nekohasekai.libbox.InterfaceUpdateListener
|
||||
import io.nekohasekai.libbox.Libbox
|
||||
import io.nekohasekai.libbox.LocalDNSTransport
|
||||
import io.nekohasekai.libbox.NetworkInterfaceIterator
|
||||
import io.nekohasekai.libbox.PlatformInterface
|
||||
import io.nekohasekai.libbox.StringIterator
|
||||
@@ -169,6 +170,10 @@ interface PlatformInterfaceWrapper : PlatformInterface {
|
||||
return WIFIState(ssid, wifiInfo.bssid)
|
||||
}
|
||||
|
||||
override fun localDNSTransport(): LocalDNSTransport? {
|
||||
return LocalResolver
|
||||
}
|
||||
|
||||
private class InterfaceArray(private val iterator: Iterator<LibboxNetworkInterface>) :
|
||||
NetworkInterfaceIterator {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user