padrevirtual / android-openvpn-settings

Automatically exported from code.google.com/p/android-openvpn-settings
GNU General Public License v3.0
0 stars 0 forks source link

Make "Fix DNS" restore real provider DNS servers instead of Google DNS #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The "Fix DNS" function currently changes the DNS server to 8.8.8.8 
(Google).

It would be more useful for Fix DNS to restore the actual DNS servers for 
the currently active link.

This could automatically be done when the last VPN connection is closed, 
though I would recommend against that until the disconnection from the 
management port issues are worked out fully.

Similarly, a "Restore DNS" function could be useful for each vpn 
connection, to switch just the DNS settings between various VPN DNS 
Settings, so someone with multiple VPNs up could switch DNS around as 
necessary.

---
I believe the currently active link can be found in:
net.connectivity.type

On the Samsung Moment, that's set to either "WIFI" or "CDMA1". I imagine 
there are other options on other phones.

If it's set to wifi, then the interface name can be found in wifi.interface.
If it's set to CDMA1, then the interface name can be found in 
net.cdma.ppp.interface

The provider DNS can then be found in dhcp.eth0.dns[1-4] or 
net.ppp0.dns[1-2]

Original issue reported on code.google.com by jshrieve@gmail.com on 10 Mar 2010 at 1:29

GoogleCodeExporter commented 8 years ago
I agree. Using a public DNS server was just the quickest solution. IMHO the user
should be able to pick the DNS server from a list. Default should be the one of 
the
underlying link.

Original comment by friedrich.schaeuffelhut on 10 Mar 2010 at 1:38

GoogleCodeExporter commented 8 years ago

Original comment by friedrich.schaeuffelhut on 16 Sep 2010 at 2:12

GoogleCodeExporter commented 8 years ago

Original comment by friedrich.schaeuffelhut on 16 Sep 2010 at 3:37

GoogleCodeExporter commented 8 years ago

Original comment by friedrich.schaeuffelhut on 27 Jan 2012 at 8:34