Zan proxy is an HTTP proxy server written in node.js, which can be used to modify the request address and simulate the response data. It is also a tool for custom DNS resolution and request monitoring. The proxy server has a user-friendly interface and is easy to use. We also provide advanced plug-in mechanism for developers to define agent behavior.
Connecting online environment with local computer
Whether it is online environment or pre sending environment, it can easily forward resource requests (JS / CSS) and interface requests to the local computer, so as to achieve the effect of debugging online pages with the local computer. Support HTTPS, websocket, and share forwarding rules.
One step to create exclusive rules for team business
No manual synchronization is required. Using the remote rule function, the online rules are synchronized to the team members, so as to ensure the unity of the rules within the team.
One button second switch
No browser cache
No need to change the host file, no browser cache, DNS resolution one click modification, easy to solve the developer’s environment switching problem
Mock interface data
Parallel development is more efficient
It can debug without waiting for interface development to complete, reducing unnecessary waiting time. Mock data interface makes parallel development possible. Through plug-in extension, it can also be forwarded to the third-party mock data platform.
The response to the request is clear at a glance
Monitor all requests through zanproxy, support mobile request packet capture, and provide a good development experience
Support custom plug-ins
Agent behavior can be customized through custom plug-ins to meet the needs of custom agents in various scenarios
The author’s environment is windows, because there is no detailed description in the official document, so let’s install and configure it under windows, and I believe it is not a problem at all on Linux
- Environmental premise
First of all, you need to install NPM. You need to use NPM for installation. Here I assume that you have already installed NPM
yarn global add zan-proxy # npm i -g zan-proxy
Check after installation
- Install OpenSSL
A small complication of installing zanproxy under windows is to install OpenSSL. There are many tutorials on the network. In this article, it will be very simple. Later, we will package and share the software used. The software name is win64openssl-1_ 1_ 1g, you can also search and install by yourself
After the installation, configure the bin folder of the installation directory into the system environment variable to complete the installation of OpenSSL
This method is more simple than many online tutorials that I have seen so far. You can refer to it
- Start zanproxy
After installation, you can start zanproxy
If successful, the browser will be opened by default
- Startup parameters are configurable
Specify proxy port
zan-proxy -p 8002
Specify the management server port
zan-proxy -u 40002
View all commands
You can configure it according to your own needs. The above is the installation process. Next, you need to configure the certificate for remote debugging. I will put the certificate file in the link. In the document, it’s under Mac. The author is under windows. The installation is similar
The above is debugged under windows. For Android, please refer to the official documents. Next, a simple configuration is needed before it can be fully used. It is recommended to install the chrome plug-in switchomoga. I will also put it in the link. The purpose of using switchomoga is to easily switch agents
Use in browser
The browser is the same no matter in windows, MacOS or Linux. First, start zanproxy, and the default proxy port is 8001. Let’s simply configure and test it
- Configure switchyomega
Create a new profile, and then use the HTTP proxy. The port is 8001. LAN IP can be configured under LAN, as shown in the figure below. Then select this scenario on the page you need to debug
Specific to the use of the point, you can see the document, this article mainly explains the installation part, including host management, HTTP forwarding, mock and plug-in part, you can do as you like, the document is very detailed, if you want to debug the request on the mobile phone, you can install the certificate and configure the agent for remote debugging, very simple, enjoy it!
Source: love sharing coder
This article starts with the official account: Java web project. Welcome to pay attention to get more exciting content.