mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
adding dns addresses in route table for samsung devices
This commit is contained in:
@@ -107,7 +107,6 @@ class OpenVPNThreadv3(var service: VPNService): ClientAPI_OpenVPNClient(), Runna
|
||||
|
||||
override fun tun_builder_add_dns_server(address: String , ipv6: Boolean): Boolean {
|
||||
mService.addDNS(address)
|
||||
mService.addRoute(address, 32)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -193,6 +193,9 @@ class VPNService : android.net.VpnService() {
|
||||
fun addDNS(ip: String){
|
||||
Log.v(tag, "mbuilder.addDnsServer($ip)")
|
||||
mbuilder.addDnsServer(ip)
|
||||
if ("samsung".equals(Build.BRAND) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
|
||||
mbuilder.addRoute(ip, 32)
|
||||
}
|
||||
}
|
||||
|
||||
fun setSessionName(name: String){
|
||||
|
||||
Reference in New Issue
Block a user