且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

How to monitor your mobile application network traffic in your own LAPTOP

更新时间:2022-08-29 09:17:53

装一个Fiddle,扮演reverse proxy的角色。启动Fiddle之后,查看其host name和监听的端口号:


How to monitor your mobile application network traffic in your own LAPTOPHow to monitor your mobile application network traffic in your own LAPTOP



把这些信息设置到你手机wifi 连接的proxy setting里面,之后用你手机应用访问网络产生的network request就会被Fiddle 拦截下来,并能够随心所欲的修改。

How to monitor your mobile application network traffic in your own LAPTOP


例如我们想实现这样一条映射规则:


凡是请求https://openui5.hana.ondemand.com/resources/sap-ui-core.js 的request,都应该被映射到1.30.0的js去:https://openui5.hana.ondemand.com/1.32.0/resources/sap-ui-core.js

只需要这样:

How to monitor your mobile application network traffic in your own LAPTOP

在这个hook的尾部加一段代码即可:

How to monitor your mobile application network traffic in your own LAPTOP

语法仿照上面被注释掉的例子:

How to monitor your mobile application network traffic in your own LAPTOP