Proxy which requires authentication with Android E

2019-01-07 10:17发布

Has anybody managed to get the Android Emulator working behind a proxy which requires authentication?

I've tried setting the -http-proxy argument to

http://DOMAIN/USERNAME:PASSWORD@IP:PORT

but am having no success.

I've tried following the docs to no avail. I've also tried the -verbose-proxy setting but this no longer seems to exist.

Any pointers?

16条回答
ら.Afraid
2楼-- · 2019-01-07 10:38

Using Android SDK 1.5 emulator with proxy in Eclipse 3.45

Go to Package Explorer -> Right click your Android project ->Run As->Run Configurations.

Under Android Application on the left column, select your project -> on the right column, where you see Android | Target | Common tabs ->

Select Target -> on the bottom “Additional Emulator Command Line Options”->

-http-proxy http://www.gateProxy.com:1080 -debug-proxy http://www.gateProxy.com:1080

->Run/Close.

查看更多
叛逆
3楼-- · 2019-01-07 10:39
  1. Find the file androidtool.cfg at C:\Documents and Settings\YOUR USER NAME\.android\

  2. Add this line:

    http.proxyLogin=USER@PASSWORD
    
  3. Save the file and try to open the Android SDK.

查看更多
淡お忘
4楼-- · 2019-01-07 10:39
  1. Start command prompt.

  2. Go the folder where your emulator is located. In general, it will be in the tools folder of the Android SDK.

  3. Then use the following command:

    emulator -avd <avd name> -http-proxy <server>:<proxy>
    

    By using this, we will be able to access the internet using the browser.

查看更多
Viruses.
5楼-- · 2019-01-07 10:39

For Android2.3.3 Settings->Wireless&Networks->MobileNetworks->AccessPointNames->Telkila-> set the Proxy and the Port here (xx.xx.xx.xx and port)

查看更多
我想做一个坏孩纸
6楼-- · 2019-01-07 10:40

Apparently this problems runs only with Android 2.x and Windows. There is a opened bug here : http://code.google.com/p/android/issues/detail?id=5508&q=emulator%20proxy&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

查看更多
唯我独甜
7楼-- · 2019-01-07 10:41

It seems like SDK 1.5 onwards, the -http-proxy flag also doesn't work. What did work for me is to boot the android image in the emulator and then once Android is running, go to Home > Menu > Settings > Wireless Controls > Mobile Networks > Access Point Names and then setup the http proxy settings for the default access point.

With the APN proxy settings in place, I can get the emulator's browser to surf the web. However, other stuff like Maps still doesn't work.

查看更多
登录 后发表回答