我有远程机器运行带有 owaspzap 映像的 docker。当我直接连接到机器并运行命令时
curl http://localhost:8080
我得到了默认的 zap 代理主页。但是,当我设置到机器的 ssh 隧道时(假设我将本地端口 52000 绑定到远程端口 8080)运行时出现错误
curl http://localhost:52000
ZAP 错误 [java.net.ConnectException]:连接被拒绝
堆栈跟踪:java.net.ConnectException:在 java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) 在 java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java) 的 java.net.PlainSocketImpl.socketConnect(Native Method) 的连接被拒绝:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java .net.Socket.connect(Socket.java:528) 在 java.net.Socket.(Socket.java:425) 在 java.net.Socket.(Socket.java:280) 在 org.apache.commons.httpclient。 org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory 的协议.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)。createSocket(DefaultProtocolSocketFactory.java:122) 在 org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) 在 org.apache.commons.httpclient.HttpConnection.open(Unknown Source) 在 org.apache。 commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.parosproxy .paros.network.HttpSender.executeMethod(Unknown Source) at org.parosproxy.paros.network.HttpSender.runMethod(Unknown Source) at org.parosproxy.paros.network.HttpSender.send(Unknown Source) at org.parosproxy.paros .network.HttpSender.sendAuthenticated(Unknown Source) at org.parosproxy.paros.network.HttpSender.sendAndReceive(Unknown Source) at org.parosproxy.paros.network.HttpSender.sendAndReceive(Unknown Source) at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(Unknown Source) at org. parosproxy.paros.core.proxy.ProxyThread.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
我错过了什么?