Dinesh
Dinesh

Reputation: 16428

From where Java's Proxy class will retrieve the proxy configurations?

I have one basic doubt in Java's Proxy class. Suppose a pc is using proxy to connect with internet, then to find the proxy address via java code is as follows,

Proxy next = ProxySelector.getDefault().select(new URI("http://www.google.com/")).iterator().next();
proxy_address = next.address().toString();

Here, the variable will hold the proxy address. Now from where, this proxy class will find the address details? Can anyone explain this?

And one more thing is like, if its from the web browser, then if i have installed more than one browser, then from which browser it will take the config?

I am suspecting that it will take it from IE (for windows). Is that right? If then, what about Linux and Mac ?

Thanks in advance.

Upvotes: 0

Views: 116

Answers (1)

Gilbert Le Blanc
Gilbert Le Blanc

Reputation: 51455

On Windows XP, proxy settings are kept in the Registry. UNIX has an environment variable called http_proxy. Proxy settings are accessible and changeable through Internet Explorer.

If you have more than one browser, each browser gets the proxy settings from the operating system.

Upvotes: 1

Related Questions