mirror of
https://github.com/yggdrasil-network/crispa-android.git
synced 2025-01-22 16:06:30 +00:00
1. fixed wired routing
This commit is contained in:
parent
8890858011
commit
f3f4043253
@ -7,6 +7,7 @@ import android.net.ConnectivityManager
|
|||||||
import android.net.Network
|
import android.net.Network
|
||||||
import android.net.VpnService
|
import android.net.VpnService
|
||||||
import android.os.ParcelFileDescriptor
|
import android.os.ParcelFileDescriptor
|
||||||
|
import android.system.OsConstants
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import dummy.ConduitEndpoint
|
import dummy.ConduitEndpoint
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
@ -62,9 +63,7 @@ class YggdrasilTunService : VpnService() {
|
|||||||
|
|
||||||
tunInterface = builder
|
tunInterface = builder
|
||||||
.addAddress(address, 7)
|
.addAddress(address, 7)
|
||||||
.addRoute("10.0.0.0", 8)
|
.allowFamily(OsConstants.AF_INET)
|
||||||
.addRoute("172.16.0.0", 12)
|
|
||||||
.addRoute("192.168.0.0", 16)
|
|
||||||
.addRoute("0200::", 7)
|
.addRoute("0200::", 7)
|
||||||
.setMtu(MAX_PACKET_SIZE)
|
.setMtu(MAX_PACKET_SIZE)
|
||||||
.establish()
|
.establish()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user