This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 210679 - Provide API to get configured non-proxy hosts
Summary: Provide API to get configured non-proxy hosts
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Proxy (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 09:17 UTC by Petr Hejl
Modified: 2014-09-06 20:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

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.