Use proxy in Visual Studio Emulator for Android

2019-04-08 15:44发布

Here is a link to the emulator announcement (included with Visual Studio 15 CTP): https://www.visualstudio.com/en-us/msft-android-emulator-vs.aspx

I would like to set up a proxy for the Internet connection in this VM. My purpose is to connect through port 8888 on my host machine so that I could see this Android VM's traffic in my Fiddler.

Is this possible? The android settings in the VM itself do not contain any mobile network access points and therefore I can't figure out how to set up a proxy.

Thanks in advance.

3条回答
Rolldiameter
2楼-- · 2019-04-08 16:07

Unfortunately it's not possible to monitor network traffic on the VS Emulator for Android yet. This is because we treat the network connection as an Ethernet connection, and you can only set a proxy on a WiFi network adapter in Android. It doesn't even work when you try to manually set the System.HTTP_PROXY variable via a Java System.putString() call, because Android only gives this permission to system apps. We're working on a fix for this and it should be available soon!

查看更多
做个烂人
3楼-- · 2019-04-08 16:09

Once you have launched the emulator follow the steps below.

  • Settings
  • WI-FI
  • Long tap on network you are connected to and select Modify network config
  • Check the Show advanced options checkbox
  • Lastly change the proxy settings

Hope this works for you.

查看更多
▲ chillily
4楼-- · 2019-04-08 16:10
登录 后发表回答