我一直在研究一项要求,以使用MITM代理监视和拦截移动设备上的本机应用程序流量。由于具有API支持,因此我决定使用BrowserMob代理。
以下是我的设置
BMP版本 2.1.5 https://github.com/lightbody/browsermob-proxy
移动设备-OnePlus 2 Android v 6.0.1
使用Drony在移动设备上设置代理 https://play.google.com/store/apps/details?id=org.sandroproxy.drony&hl=en_IN
我已在移动设备上安装了BMP SSL证书
移动和BMP主机都在同一WiFi网络上
我无法在BMP和移动设备之间建立连接。
我已经能够通过Charles Proxy监视流量,但是BMP设置遇到麻烦的问题
在BMP日志中出现以下错误
`WARNING: An exception was thrown by org.littleshoot.proxy.impl.ConnectionFlow$2.operationComplete()
net.lightbody.bmp.mitm.exception.MitmException: Error creating SSLEngine for connection to client to impersonate upstream host: null
at net.lightbody.bmp.mitm.manager.ImpersonatingMitmManager.clientSslEngineFor(ImpersonatingMitmManager.java:227)
at org.littleshoot.proxy.impl.ProxyToServerConnection$3.execute(ProxyToServerConnection.java:724)
at org.littleshoot.proxy.impl.ConnectionFlow.doProcessCurrentStep(ConnectionFlow.java:140)
at org.littleshoot.proxy.impl.ConnectionFlow.processCurrentStep(ConnectionFlow.java:128)
at org.littleshoot.proxy.impl.ConnectionFlow.advance(ConnectionFlow.java:90)
at org.littleshoot.proxy.impl.ConnectionFlowStep.onSuccess(ConnectionFlowStep.java:83)
at org.littleshoot.proxy.impl.ConnectionFlow$2.operationComplete(ConnectionFlow.java:149)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:162)
at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95)
at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:30)
at org.littleshoot.proxy.impl.ConnectionFlow.doProcessCurrentStep(ConnectionFlow.java:140)
at org.littleshoot.proxy.impl.ConnectionFlow.access$000(ConnectionFlow.java:14)
at org.littleshoot.proxy.impl.ConnectionFlow$1.run(ConnectionFlow.java:124)
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:446)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:888)
at com.google.common.cache.LocalCache.get(LocalCache.java:3849)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4712)
at net.lightbody.bmp.mitm.manager.ImpersonatingMitmManager.getHostnameImpersonatingSslContext(ImpersonatingMitmManager.java:242)
at net.lightbody.bmp.mitm.manager.ImpersonatingMitmManager.clientSslEngineFor(ImpersonatingMitmManager.java:223)
... 22 more`
任何人都可以提供有关如何解决此错误的指示吗?