Huawei cell phone anyproxy capture

1, the installation NodeJs

 

1, download the corresponding Node.js version of your system: https://nodejs.org/en/download/

2, choose the installation directory for installation

3, environment configuration

4, the test

Third, preparation ######

1, Node.js Profile

Simply put Node.js is running on the server side JavaScript. Node.js is based Chrome V8 JavaScript runtime engine. Node.js uses an event-driven, non-blocking I / O model, making it lightweight and efficient. Node.js package manager npm , the world's largest repository of open source ecosystem.

2, download Node.js

Open the official website to download link: https://nodejs.org/en/download/ I am here to download a node-v6.9.2-x64.msi 

3, the download is complete, double-click the "node-v6.9.2-x64.msi", to start the installation Node.js 

Click on the button [Next]

 Check the box, click on the button [Next] 

After modifying folder, click [Next] button 

After installation click on [Finish] button to complete the installation 

So far Node.js has been installed, you can perform a simple test whether the installation was successful, but also for the environment configuration later

Keyboard press win + R {} key, enter cmd, and press Enter to open cmd window

The new version of Node.js has built npm, will be installed when you install Node.js, npm role is dependent on Node.js package management, it can also understand what is used to install / uninstall Node.js needs to be filled in

 

Environment Configuration ######

说明:这里的环境配置主要配置的是npm安装的全局模块所在的路径,以及缓存cache的路径,之所以要配置,是因为以后在执行类似:npm install express  [-g] (后面的可选参数-g,g代表global全局安装的意思)的安装语句时,会将安装的模块安装到【C:\Users\用户名\AppData\Roaming\npm】路径中,占C盘空间。

例如:我希望将全模块所在路径和缓存路径放在我node.js安装的文件夹中,则在我安装的文件夹【D:\Develop\nodejs】下创建两个文件夹【node_global】及【node_cache】如下图:

 创建完两个空文件夹之后,打开cmd命令窗口,输入

npm configsetprefix"D:\Develop\nodejs\node_global"npm configsetcache"D:\Develop\nodejs\node_cache" 

接下来设置环境变量,关闭cmd窗口,“我的电脑”-右键-“属性”-“高级系统设置”-“高级”-“环境变量” 

进入环境变量对话框,在【系统变量】下新建【NODE_PATH】,输入【D:\Develop\nodejs\node_global\node_modules】,将【用户变量】下的【Path】修改为【D:\Develop\nodejs\node_global】

测试node安装   输入 node -v  ,显示正确的版本号。

 

 

 

2 安装AnyProxy

npm install -g anyproxy

如果安装过程中出现了一些问题可以使用:npm uninstall -g  anyproxy  卸载。

安装完成后,命令行启动anyproxy

输入 anyproxy

 

 现在已经启动了。

打开网址 127.0.0.1:8002

可以在web界面查看服务器运行情况

 

 

anyproxy-ca 命令生成CA文件

 

 

 

3,手机下载CA并且添加信任

安装证书
  我们需要在被代理的手机上安装证书,这样在AnyProxy上才能以明文的方式查看https请求内容。在手机上安装证书有两种方式:
直接在手机浏览器中打开"http://ip:8002/fetchCrtFile"(IP换成安装AnyProxy机器的IP)
在安装AnyProxy主机上打开”http://localhost:8002/qr_root“,然后用微信 扫描二维码,再通过微信在浏览器中打开的方式安装证书(必须在微信中跳转到浏览器中打开,否则弹不出安装证书对话框)。

手机安装证书时,需要输入一个证书名字,随便定义吧 。

选项 选 wlan

 

4,手机设置代理

华为手机,进入 wlan。选择 和服务器电脑同一个wifi网络。

长按 网络名称,

选择 修改网络

选择 显示高级选项,

选择 代理  手动

输入服务器主机名  (服务器 IP地址)

服务器端口  设 8001

保存即可。

 

 

5,抓包

运行 手机中的需要上网的app,

Guess you like

Origin www.cnblogs.com/duoba/p/12217001.html