6

VpnServiceを使用して TUN デバイスを作成しました。デバイスの他のネットワーク インターフェイスの中で、TUN インターフェイスが最も優先度が高いのはなぜですか?

更新 #1

これは、TUN デバイスを構成する方法です。

mInterface = new Builder().setSession(getString(R.string.app_name))
        .addAddress("10.0.1.1", 24)
        .addRoute("0.0.0.0", 1)
        .addRoute("128.0.0.0", 1)
        .establish();

アップデート #2

これは、TUN デバイスを使用しroute -n ない場合の出力です。

shell@m0:/ $ busybox route -n
busybox route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.197.55.0     0.0.0.0         255.255.255.0   U     0      0        0 rmnet0

これは、TUN デバイスroute -n での出力です。

shell@m0:/ $ busybox route -n
busybox route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0
10.197.55.0     0.0.0.0         255.255.255.0   U     0      0        0 rmnet0
shell@m0:/ $
4

1 に答える 1