爱意东升西落,浪漫至死不渝

安卓模拟器通过ADB实现设置代理


设置代理:

adb shell settings put global http_proxy ip:port

如:

adb shell settings put global http_proxy 127.0.0.1:8888

移除代理(需三条指令全部执行,部分机型可能需要重启手机才能完全移除代理):

adb shell settings delete global http_proxy

adb shell settings delete global global_http_proxy_host

adb shell settings delete global global_http_proxy_port

adb reboot