如何在 JML Messenger 库中设置 http 代理
我正在使用java开发一个简单的msn客户端,但我不知道如何使用JML库设置http代理参数。 显然它不是库本地的=/
I'm developing a simple msn client using java, but i don't know how to set the http proxy parameters using the JML library.
Apparently it isn't native on the library =/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是一个想法:您可以依靠操作系统来配置代理。 这里有一些涵盖您的各种选项的提示 - 我绞尽脑汁试图想出如何将 Messenger 对象包装在你自己的类中,以将所有流量重定向到你的代理,但在我看来,JML 似乎只暴露了相当高级别的东西 - 我在想就设置与代理的 Socket 客户端连接而言如果 JML 在任何地方将其会话公开为 Stream 或任何可以轻松转换为 Stream 的内容,则通过该重定向 Stream。抱歉我不能提供更多帮助!
Just a thought: you could rely on the OS to have the proxy configured. There're a few pointers covering your various options here - I was wracking my brain trying to think of ways you could wrap a Messenger object within a roll your own class to redirect all traffic to your proxy but it looks to me as though JML only exposes fairly high level stuff - I was thinking in terms of setting up a Socket client connection to your proxy & redirecting a Stream through that, if there's anywhere JML exposes its session as a Stream or anything that can be easily turned into one. Sorry I'm not more help!