简体   繁体   English

Java SWT浏览器的每个窗口代理?

[英]Java SWT browser per-window proxy?

I know that, 我知道,

OS X: All Browser instances, regardless of native renderer, automatically use OS X's global proxy settings. These settings can be changed at any time in the OS X System Preferences.

and the same applies to windows: Windows也是如此:

Windows: All Browser instances, regardless of native renderer, automatically use Windows' global proxy settings. These settings can be changed at any time in the Windows Control Panel.

How would one use multiple proxies and have each SWT browser window using a different one? 一个人将如何使用多个代理,并且每个SWT浏览器窗口都使用一个不同的代理? Ok, lets say it's not possible. 好吧,可以说这是不可能的。

Can this be done in another language? 可以用另一种语言完成吗? Using a real browser perhaps? 也许使用真正的浏览器?

Found a solution to this if anyone is interested. 如果有人感兴趣,找到解决方案

Using HtmlUnit allows the following functionality, 使用HtmlUnit可以实现以下功能,

The last WebClient constructor allows you to specify proxy server information in those cases where you need to connect through one. 在需要通过一个连接进行连接的情况下,最后一个WebClient构造函数允许您指定代理服务器信息。

I am still open to other alternatives if anyone has one. 如果有人有,我仍然愿意接受其他选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM