Android 模拟器代理设置 [英] Android emulator proxy setting
问题描述
我正在尝试设置网络代理以查看模拟器流量.
现在,如果我更改模拟器的网络设置(10.0.2.2:< port >,一切正常.但是,如果我尝试使用 emulator -avd myAvd -http-proxy localhost:< 通过命令行设置代理.端口 > ,SSL 流量无法通过,并且出现超时错误.
任何人都能够让它发挥作用?
谢谢
不确定您使用的是哪个模拟器,但 Android Studio 2 中发布的 new
Android 模拟器存在问题 -
I am trying to set up a network proxy to view emulator traffic.
Now if I make a change in network settings of emulator ( 10.0.2.2:< port >, things work fine. But if I try to set the proxy through command line using emulator -avd myAvd -http-proxy localhost:< port > , SSL traffic does not go through and I get time out errors.
Anyone has been able to get this working ?
Thanks
Not sure which emulator you are using, but there is an issue with new
Android emulator announced with Android Studio 2 - Bug Tracker
To get a workaround, I had to do the following using the new
emulator set to API 23:
- Pass
-http-proxy http://192.168.x.x:yyyy
as a flag when you are launching the emulator. For details how to do this, see here. - Configure the
Access Point
settings for the proxy within the emulator. To do this, you go to settings->more->cellular network->access point names and edit the existing Access Point. - Finally, there is a setting in
Developer Settings
for configuring the device to use the legacy DHCP client instead of the new one. This must be configured to use the legacy one. - Toggle
Airplane
mode on and off.
这篇关于Android 模拟器代理设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!