4

我正在使用带有命令的 ADB

adb shell settings put global http_proxy <ip>:<port>

它的工作非常好。

但如果代理受用户名和密码保护,我无法登录

如果你知道什么,请帮助我。

4

1 回答 1

2

我进行了一些调查并找到了正确的设置来启用通过 adb 进行身份验证的 http 代理:

adb shell settings put global http_proxy 192.168.225.100:3128
adb shell settings put global global_http_proxy_host 192.168.225.100
adb shell settings put global global_http_proxy_port 3128
adb shell settings put global global_http_proxy_username foo
adb shell settings put global global_http_proxy_password bar

并禁用代理:

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 shell settings delete global global_http_proxy_username
adb shell settings delete global global_http_proxy_password
adb shell settings delete global global_http_proxy_exclusion_list
adb shell settings delete global global_proxy_pac_url
adb shell reboot

不幸的是,它不适用于我的 Wear OS 手表。也许你会更幸运。

于 2020-04-13T19:02:14.680 回答