Commit cd6a1f1d authored by Mygod's avatar Mygod

Switch to __android_vpn

parent 3f70a470
......@@ -103,7 +103,9 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
this.configFile = configFile
val config = profile.toJson()
plugin?.let { (path, opts, isV2) ->
if (service.isVpnService) opts["V"] = if (isV2) "" else "true"
if (service.isVpnService) {
if (isV2) opts["__android_vpn"] = "" else config.put("plugin_arg", "-V")
}
config.put("plugin", path).put("plugin_opts", opts.toString())
}
config.put("local_address", DataStore.listenAddress)
......
Subproject commit 988e69d4dab676df9a61daf692765c353f5eb6f9
Subproject commit 8eaa922aaac511e901bd37283d468f9c940dc995
* 2.0.0:
* Deprecated passing `-V` and `--fast-open` to plugin.
Please find `V` option passed via plugin options.
Please find `__android_vpn` option passed via plugin options.
* Dependency updates:
- `androidx.core:core-ktx:1.3.2`;
- `androidx.drawerlayout:drawerlayout:1.1.1`;
......
......@@ -45,12 +45,10 @@ First you need to get your native binary compiling on Android platform.
* [Sample project for C](https://github.com/shadowsocks/simple-obfs-android/tree/4f82c4a4e415d666e70a7e2e60955cb0d85c1615);
* [Sample project for Go](https://github.com/shadowsocks/v2ray-plugin-android/tree/172bd4cec0276112828614482fb646b79dbf1540).
In addition to functionalities of a normal plugin, it has to support these additional flags that
may get passed through arguments:
In addition to functionalities of a normal plugin, it has to support these additional options:
* `-V`: VPN mode. In this case, the plugin should pass all file descriptors that needs protecting
from VPN connections (i.e. its traffic will not be forwarded through the VPN) through an
ancillary message to `./protect_path`.
* `__android_vpn`: VPN mode.
In this case, the plugin should pass all file descriptors that needs protecting from VPN connections (i.e. its traffic will not be forwarded through the VPN) through an ancillary message to `./protect_path`.
### Implement a binary provider
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment