Josh M
Josh M

Reputation: 11947

JWebBrowser - Set Proxy

I am using a JWebBrowser in this program that I am trying to create and I was just wondering how to set a proxy through JWebBrowser. I looked at this post setting the proxy? and tried it, but it didn't work. I've tried to Google this and I couldn't find anything. If anyone has any solutions, it would be much appreciated to share. Thanks.

Here is the code that I was using to try and make it work:

        System.getProperties().put("http.proxyHost", proxy.getIp());
    System.getProperties().put("http.proxyPort", Integer.toString(proxy.getPort()));
    System.getProperties().put("http.proxyUser", "");
    System.getProperties().put("http.proxyPassword", "");
    System.getProperties().put("proxySet", "true");

And yes, it is a valid proxy. I tried going to an ip checker (through JWebBrowser) to make sure my ip actually changed, but it didn't. If anyone can help me it would be much appreciated. Thanks.

Upvotes: 0

Views: 434

Answers (1)

RudeUrm
RudeUrm

Reputation: 46

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.

This is from www.eclipse.org/swt/faq.php#xpthemes. You can set the global proxy setting from Java best via manipulating the registry calling "reg add".

Upvotes: 0

Related Questions