Proxy which requires authentication with Android Emulator

前端 未结 16 1357
北海茫月
北海茫月 2020-11-30 03:07

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

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



        
相关标签:
16条回答
  • 2020-11-30 03:38
    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.

    0 讨论(0)
  • 2020-11-30 03:40

    This worked for me: http://code.google.com/p/android/issues/detail?id=5508#c39
    Apparently there's a bug in the emulator that forces you to use the IP address of the proxy instead of the name...

    0 讨论(0)
  • 2020-11-30 03:40

    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.

    0 讨论(0)
  • 2020-11-30 03:41

    I was able to view the traffic with an HTTP sniffer instead of a proxy. I used HTTPScoop, which is a nice little app.

    Also the nice thing about using HTTPScoop is that I can also see traffic on my actual device when I turn on internet sharing and have my phone use the wifi from my mac. So this is a good deal for debugging what happens on the phone itself AND the emulator.

    This way it doesn't matter what emulator you use, because the sniffer sees the traffic independent of the emulator, device, compiler settings etc.

    0 讨论(0)
提交回复
热议问题