Add support for bypass_domain platform HTTP proxy option
This commit is contained in:
@@ -9,6 +9,7 @@ import android.os.IBinder
|
|||||||
import io.nekohasekai.libbox.TunOptions
|
import io.nekohasekai.libbox.TunOptions
|
||||||
import io.nekohasekai.sfa.database.Settings
|
import io.nekohasekai.sfa.database.Settings
|
||||||
import io.nekohasekai.sfa.ktx.toIpPrefix
|
import io.nekohasekai.sfa.ktx.toIpPrefix
|
||||||
|
import io.nekohasekai.sfa.ktx.toList
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@@ -169,7 +170,9 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
|
|||||||
systemProxyEnabled = Settings.systemProxyEnabled
|
systemProxyEnabled = Settings.systemProxyEnabled
|
||||||
if (systemProxyEnabled) builder.setHttpProxy(
|
if (systemProxyEnabled) builder.setHttpProxy(
|
||||||
ProxyInfo.buildDirectProxy(
|
ProxyInfo.buildDirectProxy(
|
||||||
options.httpProxyServer, options.httpProxyServerPort
|
options.httpProxyServer,
|
||||||
|
options.httpProxyServerPort,
|
||||||
|
options.httpProxyBypassDomain.toList()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user