微信默认的通讯方式是不使用代理访问接口,所有的微信小程序不需要单独设置,APP的请求可以在代理里设置不走代理,我们以Android为例,设置proxy(Proxy.NO_PROXY
public void run() {但是这个办法也不是觉得安全
Looper.prepare();
OkHttpClient okHttpClient = new OkHttpClient.Builder().
proxy(Proxy.NO_PROXY).//okhttp不设置代理
build();
Request request = new Request.Builder()
.url("http://www.baidu.com")
.build();
Response response = null;
try {
response = okHttpClient.newCall(request).execute();
Toast.makeText(this, Objects.requireNonNull(response.body()).string(), Toast.LENGTH_SHORT).show();
} catch (IOException e) {
e.printStackTrace();
}
Looper.loop();
}
如果不能使用代理来抓包,但是可以直接通过系统数据包抓包,比如andriod模拟器中可以设置proxifier,将模拟器的所有请求直接转给fiddler处理。
还可以使用JustTrustMe
JustTrustMe是一款超级实用的手机抓包神器,在JustTrustMe最新版app中,自带的特殊功能,需要配合xposed框架才能够进行正常使用。
网友回复