mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
add tun reroute gw function
This commit is contained in:
@@ -82,6 +82,11 @@ class OpenVPNThreadv3(var service: VPNService): ClientAPI_OpenVPNClient(), Runna
|
||||
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 {
|
||||
if (address.equals("remote_host"))
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user