One way to locate an online problem is to use a proxy to debug locally.
Install whislte
Install the node
brew install node
Copy the code
Install the whistle
npm install whistle -g --registry=https://registry.npm.taobao.org
Copy the code
Adding environment variables
cancanliu@cancanliu ~ % vim ~/.bash_profile
Copy the code
export PATH=$PATH:/Users/cancanliu/.npm-global/bin:$PATH
Copy the code
Make an environment variable permanent
Create the edit. ZSHRC file and add the source ~/.bash_profile command
vim ~/.zshrc
Copy the code
source ~/.bash_profile
Copy the code
Start the W2 agent
cancanliu@cancanliu ~ % w2 start
Copy the code
chrome
Browser Plug-in installationwhistle
And enable the proxy state
The web proxy is used locally
-
Browser visit http://127.0.0.1:8899/
-
Configuring the Proxy URL
App agent to local
-
To install the certificate on the mobile phone, click HTTPS to download rootCA, send the certificate to the mobile phone, and install the certificate
-
Set the computer and mobile phone to use the same wifi, configure mobile phone wifi as manual proxy, host name: view computer ipv4 address (Intranet address), port: Whistle’s default 8899
-
View the proxy URL