fix android route and peer conn disconn bug

1. android correctly add route
2. use mock nic ctx to consume packets
This commit is contained in:
sijie.sun
2024-08-06 21:49:54 +08:00
committed by Sijie.Sun
parent fdc2755291
commit 4a5e426730
2 changed files with 24 additions and 9 deletions

View File

@@ -90,7 +90,7 @@ class TauriVpnService : VpnService() {
for (route in routes) {
val ipParts = ipv4Addr.split("/")
if (ipParts.size != 2) throw IllegalArgumentException("Invalid IP addr string")
builder.addAddress(ipParts[0], ipParts[1].toInt())
builder.addRoute(ipParts[0], ipParts[1].toInt())
}
for (app in disallowedApplications) {