diff --git a/design/src/main/java/com/github/kr328/clash/design/NetworkSettingsDesign.kt b/design/src/main/java/com/github/kr328/clash/design/NetworkSettingsDesign.kt
index a2af8015..7c1d2d61 100644
--- a/design/src/main/java/com/github/kr328/clash/design/NetworkSettingsDesign.kt
+++ b/design/src/main/java/com/github/kr328/clash/design/NetworkSettingsDesign.kt
@@ -71,9 +71,9 @@ class NetworkSettingsDesign(
)
switch(
- value = srvStore::blockLoopback,
- title = R.string.block_loopback,
- summary = R.string.block_loopback_summary,
+ value = srvStore::allowBypass,
+ title = R.string.allow_bypass,
+ summary = R.string.allow_bypass_summary,
configure = vpnDependencies::add,
)
diff --git a/design/src/main/res/values-zh/strings.xml b/design/src/main/res/values-zh/strings.xml
index 99ba7785..3233e568 100644
--- a/design/src/main/res/values-zh/strings.xml
+++ b/design/src/main/res/values-zh/strings.xml
@@ -214,4 +214,6 @@
阻止本地回环
阻止本地回环连接
GeoIP Fallback 区域代码
+ 允许应用绕过
+ 允许其他应用绕过 VPN
\ No newline at end of file
diff --git a/design/src/main/res/values/strings.xml b/design/src/main/res/values/strings.xml
index 6d3e20dd..5f44ad29 100644
--- a/design/src/main/res/values/strings.xml
+++ b/design/src/main/res/values/strings.xml
@@ -122,6 +122,8 @@
Handle all dns packet
Block Loopback
Block loopback connections
+ Allow Bypass
+ Allows all apps to bypass this VPN connection
System Proxy
Attach http proxy to VpnService
Access Control Mode
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 8177ce84..8890d64d 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
@@ -200,9 +200,8 @@ class TunService : VpnService(), CoroutineScope by CoroutineScope(Dispatchers.De
}
}
- val blocking = mutableListOf("$TUN_GATEWAY/$TUN_SUBNET_PREFIX")
- if (store.blockLoopback) {
- blocking.add(NET_SUBNET_LOOPBACK)
+ if (store.allowBypass) {
+ allowBypass()
}
TunModule.TunDevice(
diff --git a/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt b/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt
index c97d1200..648af537 100644
--- a/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt
+++ b/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt
@@ -46,8 +46,8 @@ class ServiceStore(context: Context) {
defaultValue = true
)
- var blockLoopback by store.boolean(
- key = "block_loopback",
+ var allowBypass by store.boolean(
+ key = "allow_bypass",
defaultValue = true
)