第一步:下载工具,编译成apk,使用adb工具安装到手表
https://github.com/kuleyang/AndroidProxySetter
第二步:在终端上执行以下命令并带上相应的参数:
adb shell am start -n tk.elevenk.proxysetter/.MainActivity
参数:
-e host <host> # The host ip or address for the proxy
-e port <port> # The port for the proxy
-e ssid <ssid> # The SSID of the wifi network to set proxy on (optional, will apply on the first one if empty)
-e key <shared key> # The password/key for the wifi network
-e bypass <bypass string> # The bypass string to use for proxy settings
-e reset-wifi <boolean> # Whether or not to reset the wifi settings. This flag will tell the tool to forget all connected networks,make a new network config with the SSID and key given, and then attempt to connect to the wifi network. If no key is given,the wifi network is assumed to be unprotected/open
-e clear <boolean> # A flag that will clear the proxy settings for the given SSID
host port ssid 三个参数是必须的,例如host为202.192.18.33,port为8080,ssid 为EEBBK-FREE
则命令为:
adb shell am start -n tk.elevenk.proxysetter/.MainActivity -e host 202.192.18.33 -e port 8080 -e ssid EEBBK-FREE