From f3f40432532c71c4c2f66e0fb12101ab7246ab95 Mon Sep 17 00:00:00 2001 From: vadym Date: Mon, 15 Jun 2020 09:58:24 -0700 Subject: [PATCH] 1. fixed wired routing --- .../io/github/chronosx88/yggdrasil/YggdrasilTunService.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt index c513f84..560a8f6 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt @@ -7,6 +7,7 @@ import android.net.ConnectivityManager import android.net.Network import android.net.VpnService import android.os.ParcelFileDescriptor +import android.system.OsConstants import com.google.gson.Gson import dummy.ConduitEndpoint import kotlinx.coroutines.GlobalScope @@ -62,9 +63,7 @@ class YggdrasilTunService : VpnService() { tunInterface = builder .addAddress(address, 7) - .addRoute("10.0.0.0", 8) - .addRoute("172.16.0.0", 12) - .addRoute("192.168.0.0", 16) + .allowFamily(OsConstants.AF_INET) .addRoute("0200::", 7) .setMtu(MAX_PACKET_SIZE) .establish()