adrianer / 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

support setting net.dns.search #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

In the same way that we can configure to set net.dns1 it would also be nice
if we can use the dhcp pushed search-domain to set net.dns.search.

This can be done in a up/down script but it would be neater to not have to
write one just for this.

Keep up the good work,

Daire

Original issue reported on code.google.com by daire.by...@gmail.com on 7 May 2010 at 2:26

GoogleCodeExporter commented 8 years ago

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

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 18 Sep 2010 at 5:12

GoogleCodeExporter commented 8 years ago
please tell more about the up/down script you mentioned - is it possible to 
auto trigger it upon connect/disconnect from a VPN ?

Original comment by andre.kj...@gmail.com on 21 Jun 2011 at 8:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Setting property net.dns.search to the local domain does allow looking up 
hostnames without the domain suffix. However, when I added
setprop net.dns.search "${new_domain_name}"
to the dhcpcd hook script it wouldn't work - it wouldn't add the property.
At the same time, when I added
echo "${new_domain_name}" > /data/local/domain_name
to the end of the same script, it worked correctly...
Any idea what's going on?

Original comment by p...@sedlacek.biz on 28 Dec 2011 at 11:29

GoogleCodeExporter commented 8 years ago

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

GoogleCodeExporter commented 8 years ago
Just an update - reply to my own comment.
Adding the property wouldn't work because of insufficient rights - dhcpcd runs 
as unprivileged user dhcp. For some reason I couldn't get
su setprop net.dns.search "${new_domain_name}"
to work either - the su request would be denied without showing the 
Superuser.apk confirmation window.
Any ideas? :)

Original comment by p...@sedlacek.biz on 27 Jan 2012 at 9:28

GoogleCodeExporter commented 8 years ago
try:
su -c 'setprop net.dns.search "${new_domain_name}"'

Original comment by friedrich.schaeuffelhut on 27 Jan 2012 at 10:41

GoogleCodeExporter commented 8 years ago
Thanks Friedrich,
I made a mistake in the comment - that's what I'm trying.
su -c 'setprop net.dns.search "${new_domain_name}"'
in the dhcpcd hook is always denied without bringing up the Superuser window...

Original comment by p...@sedlacek.biz on 27 Jan 2012 at 11:08