Am really wondering how to set a proxy server in android phone like [tattoo] in order to gain access in some private networks
any suggestion would be appreciated ...
thanks
Android allows you to configure proxy settings for each Wi-Fi network. This is sometimes required to access the Internet on a business or school network, for example. Your browser traffic will be sent through the proxy you configure.
A proxy server is a server which is known as an application gateway which acts as an intermediary between the local network and large scale network such as the internet. We can configure our proxy settings over Wi-Fi network on android device.
The Proxy and Port fields are optional fields allowing you to specify the address of a HTTP proxy to use for all web traffic over this connection. Carriers sometimes use HTTP proxies to modify websites for your device, or to improve the speed of commonly access web pages and resources by caching them.
Finally i got what i want and here is the result :
There is no UI for proxy settings for android web browser. But the android web browser will read the proxy settings in its settings database. Here is the instructions to enable the proxy in the android web browser.
adb shell
sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db
sqlite> INSERT INTO system VALUES(99,'http_proxy', 'proxy:port');
sqlite>.exit
source: http://discuz-android.blogspot.com/2008/01/set-proxy-for-android-web-browser.html
For Android 4.0.3 and up (don't know how far up though) the following will work:
If you have ADB access, this should work:
adb shell settings put global http_proxy <address>:<port>
However the setting will be lost with a reboot.
On CyanogenMod (source : http://forum.cyanogenmod.com/topic/20002-web-proxy-setup/)
In CM6 there was a setting in the Wireless & Settings for the proxy.
In CM7 you have to long press on the desktop background.
Then in the list that pops up select Custom Shortcut
- Pick your activity
-
Activities
- Settings
-
toward the bottom of this long list is Proxy Settings
Add this shortcut to your desktop. When you then click on the shortcut you can enter your proxy address and port number.
I found something here that looks like it might work
package com.BrowserSettings;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.provider.Settings;
public class BrowserSettingsUI extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button button = (Button) findViewById(R.id.Button01);
button.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
try {
Settings.System.putString(getContentResolver(),
Settings.System.HTTP_PROXY, "127.0.0.1:100");//enable proxy
}catch (Exception ex){
}
}
});
final Button button2 = (Button) findViewById(R.id.Button02);
button2.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
try {
Settings.System.putString(getContentResolver(),
Settings.System.HTTP_PROXY, "");//disable proxy
}catch (Exception ex){
}
}
});
}
}
You must add
<uses-permission android:name=”android.permission.WRITE_SETTINGS” />
to your manifest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With