Java代理小程序:这样的事情可能吗?

发布于 2024-10-21 21:25:06 字数 160 浏览 1 评论 0原文

我想知道在技术上是否可以在 java applet 中创建代理。

那么是否可以通过这个 java applet 代理路由所有进一步的浏览器请求?

例如,如果用户要浏览 google.com,默认行为是否可以被此代理小程序替换?

如有任何反馈,我们将不胜感激。

I am wondering whether it is technically possible to create a proxy within a java applet.

And would it then be possible to route all further browser requests through this java applet proxy?

Eg., if the user would browse to google.com, could the default behaviour be replaced by this proxy applet?

Any feedback is appreciated.

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

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

发布评论

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

评论(1

古镇旧梦 2024-10-28 21:25:06

技术上是可行的,但我认为建造起来可能非常昂贵且耗时。您可能需要执行与 Juniper VPN 客户端类似的操作。它运行一个小程序,该小程序运行特定于操作系统的应用程序来更改代理设置,并且在您的情况下,同一个小程序可以作为代理服务器运行。如果操作系统应用程序检测到小程序死亡或关闭,则还必须恢复代理设置。对于 Juniper,它会更改系统主机文件而不是代理设置。

至于 Mat 的问题:用户会收到一些弹出窗口,告诉她要超级确定运行该应用程序并安装操作系统应用程序...再次,与 Juniper 发生的情况相同:)

编辑

这取决于有多少个操作系统/您想要支持的浏览器。在最坏的情况下,您将需要一个应用程序来设置和回滚 Windows、Mac、Linux 的系统代理设置(我什至不知道代理配置是否有系统范围的配置)。然后(据我记得)为 IE 签名小程序的方式与所有其他浏览器不同。

我想说的是,这不是周末的工作,它很容易需要几个月的时间来编码,并且在操作系统/浏览器的某些组合上存在很多问题。

Technically is possible, but I think it might be very expensive and time consuming to build. You might need to do something similar as what the Juniper VPN client does. It runs an applet which run an OS specific app that changes the proxy settings, and, in you case, the same applet can run as a proxy server. The OS application also has to revert the proxy settings if it detects that the applet died or was closed. In the case of Juniper, it changes the system hosts file instead of the proxy settings.

As for Mat concern: the user will get a few pop ups telling her to be SUPER sure of running the app and installing the OS app... again, in the same way that happens with Juniper :)

EDIT

It depends how many OSs / browsers you want to support. In worst case scenario you'll need an app to set and rollback the system proxy settings for Windows, Mac, Linux (I don't even know if there's system wide configuration for the proxy configuration). Then (as far as I remember) the way to sign an applet for IE is different than for all the other browsers.

What I'm trying to say is that it's not a weekend job, it could easily take a couple of months to code and have plenty of issues with certain combination of OS / browsers.

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