Add support for bypass_domain platform HTTP proxy option

This commit is contained in:
世界
2024-02-19 00:49:48 +08:00
parent 9d463b269a
commit 9f086fab5c

View File

@@ -9,6 +9,7 @@ import android.os.IBinder
import io.nekohasekai.libbox.TunOptions
import io.nekohasekai.sfa.database.Settings
import io.nekohasekai.sfa.ktx.toIpPrefix
import io.nekohasekai.sfa.ktx.toList
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
@@ -169,7 +170,9 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
systemProxyEnabled = Settings.systemProxyEnabled
if (systemProxyEnabled) builder.setHttpProxy(
ProxyInfo.buildDirectProxy(
options.httpProxyServer, options.httpProxyServerPort
options.httpProxyServer,
options.httpProxyServerPort,
options.httpProxyBypassDomain.toList()
)
)
} else {