Use proxy in Visual Studio Emulator for Android

本小妞迷上赌 提交于 2020-01-01 10:48:13

问题


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.


回答1:


We've made this work as of Visual Studio 2015 RC. See http://blogs.msdn.com/b/visualstudioalm/archive/2015/05/06/using-fiddler-to-monitor-network-traffic-from-the-vs-emulator-for-android.aspx for the full instructions.




回答2:


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.




回答3:


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!



来源:https://stackoverflow.com/questions/29224560/use-proxy-in-visual-studio-emulator-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!