我正在使用带有命令的 ADB
adb shell settings put global http_proxy <ip>:<port>
它的工作非常好。
但如果代理受用户名和密码保护,我将无法登录
如果你知道什么,请帮助我。
最佳答案
我进行了一些调查并找出了正确的设置以通过 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 watch 。也许你会更幸运。
关于shell - 使用用户名和密码连接 ADB 代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60220603/