Charles 调试代理未检测 Eclipse 生成的流量?

发布于 2024-10-16 07:40:11 字数 298 浏览 3 评论 0原文

我正在尝试调试一个使用 Jsoup 通过 Charles 调试代理发送和接收 http 流量的 Java 类,但 Charles 无法检测到任何流量。我想要做的是检查我的应用程序发送和接收的流量(主要是发送)。

我知道该连接可以工作,因为我可以打印请求返回的 HTML,并且我已将网络连接的“Active Provider”设置为本机,端口和主机与我在 Charles 中设置的内容相匹配......有什么我在吗?丢失的?有更好的方法吗?

我必须补充一点,告诉 Eclipse 检查更新会导致 Charles 增加流量!?

提前致谢!

I'm trying to debug a Java class that uses Jsoup to send and receive http traffic with the Charles Debugging Proxy but Charles is failing to detect any of the traffic. What I want to be able to do is inspect the traffic my app is sending and receiving (primarily sending).

I know that the connection works as I can print the HTML returned by my requests and I have set the network connection's "Active Provider" to native, the port and host match what I have set in Charles.... Is there something I am missing? Is there a better way to do this?

I must add that telling Eclipse to check for updates results in Charles picking that traffic up!?

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风筝在阴天搁浅。 2024-10-23 07:40:12

您需要手动设置java.net.HTTPURLConnection上的代理信息。有一个 未完成的拉取请求,它为 Jsoup 添加了 java.net.Proxy 支持。

You need to set proxy information on java.net.HTTPURLConnection manually. There is an outstanding pull request that adds java.net.Proxy support to Jsoup.

飞烟轻若梦 2024-10-23 07:40:11

我认为问题在于您如何设置代理。听起来您是在“首选项 ->”下执行此操作的一般->网络连接。这为 Eclipse 进程本身设置了代理,但这不是您想要的。您需要在从 Eclipse 启动的新进程上设置代理。这发生在启动配置中。启动配置中没有用于设置代理信息的特殊 UI,但这只是系统属性。

您可以阅读以下资源,了解需要设置的系统属性:

http:// www.rgagnon.com/javadetails/java-0085.html

I think the problem is how you are setting the proxy. It sounds like you are doing this under Preferences -> General -> Network Connections. That sets the proxy for the Eclipse process itself and isn't what you want. You need to set the proxy on the new process that you are launching from Eclipse. That happens in the launch config. There isn't special UI for setting up proxy information in the launch config, but it's all just system properties.

Here is a resource that you can read for which system properties you need to set:

http://www.rgagnon.com/javadetails/java-0085.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文