将 port 改为你的代理端口后,在 cmd 里运行:
adb connect 127.0.0.1:58526 && adb shell “settings put global http_proxy ip route list match 0 table all scope global | cut -F3:port”

注:port 是你的端口号

如果要在 powershell 里运行,请将 ` 改为 ``,并且两个 adb 命令分为两行

adb shell "settings put global http_proxy ``ip route list match 0 table all scope global | cut -F3``:8889"

删除代理:

adb shell settings put global http_proxy :0