From eeea9d0fce75698a907b5b77120245328e15074e Mon Sep 17 00:00:00 2001 From: kr328 Date: Tue, 14 Sep 2021 01:07:55 +0800 Subject: [PATCH] Fix: add zhihu to http proxy black list --- .../github/kr328/clash/service/TunService.kt | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/service/src/main/java/com/github/kr328/clash/service/TunService.kt b/service/src/main/java/com/github/kr328/clash/service/TunService.kt index a08a9312..eef0c4ab 100644 --- a/service/src/main/java/com/github/kr328/clash/service/TunService.kt +++ b/service/src/main/java/com/github/kr328/clash/service/TunService.kt @@ -193,23 +193,7 @@ class TunService : VpnService(), CoroutineScope by CoroutineScope(Dispatchers.De ProxyInfo.buildDirectProxy( it.address.hostAddress, it.port, - if (store.bypassPrivateNetwork) - listOf( - "localhost", - "*.local", - "127.*", - "10.*", - "172.16.*", - "172.17.*", - "172.18.*", - "172.19.*", - "172.2*", - "172.30.*", - "172.31.*", - "192.168.*" - ) - else - emptyList() + HTTP_PROXY_BLACK_LIST + if (store.bypassPrivateNetwork) HTTP_PROXY_LOCAL_LIST else emptyList() ) ) } @@ -239,5 +223,21 @@ class TunService : VpnService(), CoroutineScope by CoroutineScope(Dispatchers.De private const val TUN_DNS = "172.19.0.2" private const val NET_ANY = "0.0.0.0" private const val NET_SUBNET_LOOPBACK = "127.0.0.0/8" + + private val HTTP_PROXY_LOCAL_LIST: List = listOf( + "localhost", + "*.local", + "127.*", + "10.*", + "172.16.*", + "172.17.*", + "172.18.*", + "172.19.*", + "172.2*", + "172.30.*", + "172.31.*", + "192.168.*" + ) + private val HTTP_PROXY_BLACK_LIST: List = listOf("*zhihu.com", "*zhimg.com") } -} \ No newline at end of file +}