add tun reroute gw function
This commit is contained in:
parent
64627abe6d
commit
0f89c40a1d
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ class OpenVPNThreadv3(var service: VPNService): ClientAPI_OpenVPNClient(), Runna
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun tun_builder_reroute_gw(ipv4: Boolean , ipv6: Boolean , flags: Long): Boolean {
|
||||||
|
mService.addRoute("0.0.0.0", 0)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
override fun tun_builder_exclude_route(address: String, prefix_length: Int, metric: Int, ipv6: Boolean): Boolean {
|
override fun tun_builder_exclude_route(address: String, prefix_length: Int, metric: Int, ipv6: Boolean): Boolean {
|
||||||
if (address.equals("remote_host"))
|
if (address.equals("remote_host"))
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue