title: 从shell设置Android代理
date: 2021-07-02 21:12:39
keywords: Android,shell设置代理
tags:
- Linux
- Android
- shell
- Proxy
因为蓝某模拟器并不能从设置里面设置代理,需要抓包调试的时候就很闹心
设置代理:
adb shell settings put global http_proxy ip:port
如:
adb shell settings put global http_proxy 172.16.21.14: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