用StrongSwan,跟服务器建立连接后,从服务端断开连接,有些手机(华为Mate7),会出错:
提示连接失败,但系统状态栏仍然有“钥匙”图标,点击可以看到VPN处于连接状态中的对话框,点击断开连接,也没效果。
在APP里,再次连接,也会失败。就算将APP卸载,连接状态的对话框也不会消失;必须重启手机,才能恢复。
而有些手机,不会出现这种情况。这种现象,跟 这里(strongswan#695)和 这里(google#62410)描述的一样。
查看LOG,发现服务器断开时,有如下的错误日志:
The problem is that the Google fix only applies to Android version 4.4.3, and there are a lot of 4.4 - 4.4.2 devices out there.
提示连接失败,但系统状态栏仍然有“钥匙”图标,点击可以看到VPN处于连接状态中的对话框,点击断开连接,也没效果。
在APP里,再次连接,也会失败。就算将APP卸载,连接状态的对话框也不会消失;必须重启手机,才能恢复。
而有些手机,不会出现这种情况。这种现象,跟 这里(strongswan#695)和 这里(google#62410)描述的一样。
查看LOG,发现服务器断开时,有如下的错误日志:
03-24 17:43:: W/System.err(7257): java.lang.IllegalStateException: command '108 interface fwmark uid add tun1 0 99999'
failed with '400 108 Failed to add uid rule (Invalid argument)'
03-24 17:43:: W/System.err(7257): at android.os.Parcel.readException(Parcel.java:1476)
03-24 17:43:: W/System.err(7257): at android.os.Parcel.readException(Parcel.java:1422)
03-24 17:43:: W/System.err(7257): at android.net.IConnectivityManager$Stub$Proxy.establishVpn(IConnectivityManager.java:1578)
03-24 17:43:: W/System.err(7257): at android.net.VpnService$Builder.establish(VpnService.java:471)
03-24 17:43:: W/System.err(7257): at cn.gaojs.vpn.logic.CharonVpnService$BuilderAdapter.establishNoDns(CharonVpnService.java:583)
03-24 17:43:: W/System.err(7257): at dalvik.system.NativeStart.run(Native Method)
strongswan: it is caused by the same bug as#462 in Android 4.4 before 4.4.3. Refer to the related issues for more information.The problem is that the Google fix only applies to Android version 4.4.3, and there are a lot of 4.4 - 4.4.2 devices out there.