mirror of
https://github.com/SagerNet/sing-box-for-android.git
synced 2025-04-02 03:17:37 +03:00
Update DNS resolver usages
This commit is contained in:
parent
ec8294f9bf
commit
2ce3c747af
2 changed files with 5 additions and 2 deletions
|
@ -143,7 +143,6 @@ class BoxService(
|
|||
}
|
||||
|
||||
DefaultNetworkMonitor.start()
|
||||
Libbox.registerLocalDNSTransport(LocalResolver)
|
||||
Libbox.setMemoryLimit(!Settings.disableMemoryLimit)
|
||||
|
||||
val newService = try {
|
||||
|
@ -256,7 +255,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
|
||||
|
@ -24,6 +25,10 @@ import io.nekohasekai.libbox.NetworkInterface as LibboxNetworkInterface
|
|||
|
||||
interface PlatformInterfaceWrapper : PlatformInterface {
|
||||
|
||||
override fun localDNSTransport(): LocalDNSTransport? {
|
||||
return LocalResolver
|
||||
}
|
||||
|
||||
override fun usePlatformAutoDetectInterfaceControl(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue