实现当没有传入证书时只拦截和处理 http 请求,跳过所有 https 请求。 #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
当只想用这个库拦截一个 http 请求时,需要进行不必要的证书安装过程,并且MITM攻击在 Android 7.0 以上只能通过虚拟环境或者Root实现,并且还存在 CA Pinning 的情况,而导致其他不需要拦截的 https 请求产生错误,所以实现了这个功能来实现只拦截 http,使用的时候不用创建和安装证书 JKS 传入 null 即可。
关联这个问题 #39