Anyproxy's server deployment and mobile phone packet capture process

Note: (Note that there is a modification, the close method in the main file needs to be commented out) First, the two ports 8001 and 8002 of the server must be opened

1 Introduction

anyproxy is an open source proxy server developed by Alibaba based on Node.js, which can be used for mobile terminal test packet capture and other operations.

2. Install to server

//1首先安装nodejs和npm
apt install nodejs-legacy
apt install npm
//升级npm
npm install npm -g  
//升级node
npm install -g n  
n stable
//2安装anyproxy
npm install anyproxy -g
//3生成ca证书(用来代理https)
anyproxy-ca
//4启动anyproxy
anyproxy -i
//5验证:本地浏览器ip:8002打开web版界面(IP换成安装AnyProxy机器的IP)
ip:8002

3. Agent mobile phone https

3.1 Installation certificate

We need to install the certificate on the mobile phone being proxied, so that we can view the content of the https request in clear text on the AnyProxy. There are two ways to install a certificate on a mobile phone:

1. Open http: // ip: 8002 / fetchCrtFile directly in the mobile browser (IP is replaced with the IP of the AnyProxy machine)

2. Browser access ip: 8002 to open the RootCA in the left sidebar of the web version interface to generate a QR code, then scan the QR code to download and install the certificate.

3.2 Set proxy

The proxy server is configured in the wifi settings, steps: wifi settings-proxy-manual-the host name is the IP of the server where AnyProxy is located-port number is 8001

Published 36 original articles · won praise 2 · Views 3794

Guess you like

Origin blog.csdn.net/wangyongfei1122/article/details/103981242