从shell设置Android代理

设置代理:

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

其他说明

本人文章截至2021年5月22日仅在本人博客博客园简书平台发布,其他平台均为未授权发布。

posted @ 2021-07-08 21:03  泠泫凝  阅读(167)  评论(0编辑  收藏  举报