Reputation: 53
I want to develop an android application that can access blocked website. I thought about changing DNS address but Android give permission only for wifi dns address changing. I have also searched about using proxy sites but i couldn't make it . I'm searching for more compatible solution .
I'm waiting your suggestions. Thanks in advance.
Upvotes: 0
Views: 584
Reputation: 1216
There are many types of block which can be applied to a user on a mobile network.
The one you are referring to is done via DNS and I suspect you want to do such a thing because Android does not provide an interface to change DNS when you are using a mobile connection.
In that case is necessary to use root privileges. Your app will be running only on a rooted device. So you need to learn how to run a command using su
. A good way to learn is to take a look to an open source root app such as Ad-Away.
To change DNS for a mobile network is necessary to know the Android version: in KitKat the DNS resolution is done through the netd
daemon which ignores changes made via setprop
. In Android <4.4 many DNS changer apps used commands like these
setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.4.4
For Android 4.4 I wrote an app called Override DNS which uses a different set of commands.
Internet censorship can be done on other different levels.
I think the best way to circumvent any kind of block is to host a VPN server on a VPS located in USA or Europe and to activate a VPN from Android device. With this method any kind of network communication can be sent through the VPN so there's no problem related to DNS etc. In this scenario there's no need to have root privileges (depending on the VPN technology choosen).
Upvotes: 1