Tki*_*iet 5 shell adb proxy-authentication
我正在使用 ADB 命令
adb shell settings put global http_proxy <ip>:<port>
Run Code Online (Sandbox Code Playgroud)
效果很好。
但如果代理受用户名和密码保护,我将无法登录代理
如果你知道什么,请帮助我。
我做了一些调查并找到了通过 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
Run Code Online (Sandbox Code Playgroud)
并禁用代理:
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
Run Code Online (Sandbox Code Playgroud)
不幸的是,它在我的 Wear OS 手表上不起作用。也许你会更幸运。