Introduction
I encountered a problem when optimizing the internal sdk function before, how to redirect the local server file address to the online https service (locate whether there is an exception in a file on the line). Let's talk about how to perform redirection through the Map Remote of charles software.
Step 1: (install https certificate)
https link is required 安装证书
. You can successfully install the certificate through the following steps
Step 2: {Setting up SSL Proxy)
https port is 433 by default
Step 3: (Set up Map Remote)
Mapping remote addresses to local addresses
How to determine the remote address link and local address link? As follows, fill in the link below to the corresponding position in the above window to connect remotely: local link:
the fourth step:
Check whether the proxy is successful. Charles can see the HTTPS request content, but not unknown, which means the proxy is successful. When you visit the online address charles and redirect to the following address, the redirection is successful
The above is the whole process of using charles to redirect https requests. Careful students may find that the project I started locally has a domain name, because I use switchHosts for local ip mapping.
Many students may still build Node servers locally to start static resource services, which is too troublesome. An NPM package http-server is recommended here . http-server is a simple, zero-config command-line static resource server.
If you want to achieve an effect similar to hot update. At this point, you need to configure the Node service. 使用Node.js监听文件目录和写入文件
to fulfill.