Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 210679 - Provide API to get configured non-proxy hosts
Provide API to get configured non-proxy hosts
Status: NEW
Product: platform
Classification: Unclassified
Component: Proxy
All All
: P3 (vote)
Assigned To: Libor Fischmeistr
Depends on:
  Show dependency treegraph
Reported: 2012-04-04 09:17 UTC by Petr Hejl
Modified: 2014-09-06 20:25 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2012-04-04 09:17:27 UTC
External processes started from NB may need this information to be available via API.
Comment 1 phansson 2014-09-06 20:25:40 UTC
Can't be done. There's no such thing as a fixed list. At least not on most sites these days.

True that back in the old days this would be configured as a fixed list somewhere in the OS. However, today, many sites are using PAC (proxy auto-configuration) which means that a .pac file needs to be evaluated everytime Java needs to reach a network destination. The .pac file (which is really a JavaScript script) may return different result depending on things like time of day or even depending on who's asking.

The list you are after is essentially all the inputs for which this script would return "DIRECT". Problem is that such list varies with the result of the .pac file evaluation.

The NetBeans ProxySelector is available throughout the JVM session, no matter if that session is the IDE itself or a NetBeans Platform application. You can ask it questions such as "which proxy to use for this endpoint?". However all standard Java networking calls, such as URLConnection, actually asks the ProxySelector on your behalf and thereby makes a choice on how to reach the endpoint (use a proxy or not, if use a proxy then which one?, etc). It all happens behind the scenes in Java, not NetBeans.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo