From 03d5304abbea59b04b3c8c11b036f038f91559d0 Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Wed, 8 May 2024 10:44:43 +0800 Subject: [PATCH] Remove unnecessary addRoute --- app/src/main/java/io/nekohasekai/sfa/bg/VPNService.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/main/java/io/nekohasekai/sfa/bg/VPNService.kt b/app/src/main/java/io/nekohasekai/sfa/bg/VPNService.kt index 44e244c..fa5fbe0 100644 --- a/app/src/main/java/io/nekohasekai/sfa/bg/VPNService.kt +++ b/app/src/main/java/io/nekohasekai/sfa/bg/VPNService.kt @@ -83,8 +83,6 @@ class VPNService : VpnService(), PlatformInterfaceWrapper { while (inet4RouteAddress.hasNext()) { builder.addRoute(inet4RouteAddress.next().toIpPrefix()) } - } else { - builder.addRoute("0.0.0.0", 0) } val inet6RouteAddress = options.inet6RouteAddress @@ -92,8 +90,6 @@ class VPNService : VpnService(), PlatformInterfaceWrapper { while (inet6RouteAddress.hasNext()) { builder.addRoute(inet6RouteAddress.next().toIpPrefix()) } - } else { - builder.addRoute("::", 0) } val inet4RouteExcludeAddress = options.inet4RouteExcludeAddress