Re: ProxySelector2
Peter Hansson <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CAC55jYMKpj5iFkGGiC6yXFL+zMj0TvCwS6Xs0ic_iegbCZyTTA@mail.gmail.com> |
I'm assuming you are asking in a general sense, i.e. running a NB Platform Application *without* my plugin?? I'll try to answer as such although blended with my experience from the plugin. Yes, if your proxy requires authentication you may see the Platform bring up a meaningless dialogbox where it asks for username/password. The user gets absolutely no indication about who's asking and why. For most people it won't even be obvious from which application the dialog originates. I believe I've logged an RFE on that. Of course this "problem" is fixed in the Plugin. The dialog is now much more verbose. It will now say something like "when attempting to access <url> the proxy at <address> is asking for credentials" ... and this should give the user a good indication about why the dialog pops up. In the plugin I believe I've also made sure the dialog doesn't hide behind something else but must admit I cannot remember right now. I haven't completely rewritten this part of NB core, just improved the contents of the dialog and a few other things. Standard Java SE should in fact be able to authenticate transparently with an NTLMv2 based proxy (which is what many sites use) so I must admit I'm not fully aware of which scenarios Java SE will *not* be able to authenticate transparently to a proxy .... except of course the case where the network proxy requires an explicit username/password, but that is less common from my experience. Whether you use standard NB stuff or my plugin the network configuration settings are stored in <application's userdir>/config/Preferences/org/netbeans/core.properties. While I was developing the plugin I was using a Windows-based proxy. I then tested different use case: with explicit auth, with NTLMv2 auth, etc. You are right that these things are difficult to reproduce because it requires setting up an environment with proxies and so on. And this takes time. I still keep my full test bed active for this very reason. As for fixing bugs: I'm the author of the plugin. You can ask me for fixes in the plugin. As for NB core I'm not a developer nor a contributor. I do make an effort to log a ticket on netbeans.org/bugzilla for everything I come across (and a suggestion for a fix where relevant) but it seems to me this part of the NB Platform has been dormant for a couple of years. I can to a certain extent understand why: if you make the wrong fix you risk breaking a lot of things for NB IDE users. Admittedly network related code is not an area which calls for quick fixes. Peter On Wed, Apr 20, 2016 at 7:40 PM, Oliver Rettig <[email protected]> wrote: > Hallo Peter, > > very thanks for your detailed mail. That is very interesting for because. I > run into trouble behind proxies with serveral netbeans platform > applications > (the NebeansIDE and also OpenSim). What is happening from time to time is > that > the gui freezes during the start process. Sometimes I can see a small > window > behind the main application window which asks for credentials for the proxy > configuration. In the case of the ide the default configuration in > options/proxy > is "autodetect". If the application cauld be started once I can change the > configuration to a fixed one with fix credentials and proxy host url. If > this > configuration was successful it always starts correct. In the case of the > OpenSim application there is no possibility to in the GUI to make this > configuration. So often it is not possible to start the app. > > It looks for me that, the small dialog which ask for credentions is a modal > dialog and sometimes blocks the further starting process but it is not > visible > - mayebe it is behind the main application window. > > Do you know the properties where netbeans saves the configuration of the > proxy? > > Any chance to fix this bug. The problem is that it is difficult to > reproduce. I > can not reproduce it on my developing PC. > > best regards > Oliver > > > If NetBeans IDE is not able connect to Internet then you'll not see > content > > in the "Start Page" tab. This really the best test if NetBeans IDE can > > access Internet or not. > > > > I can tell from your log output that your site is using WPAD method to > > discover the location of your site's PAC file. (which in your case seems > to > > reside on your intranet on address http://wpad/wpad.dat). You can > actually > > download the PAC file and view it as it is plain text JavaScript. Anyway, > > in this sense your site is pretty main stream compared to any other > > corporate site. > > > > Every time an URL is called NetBeans will evaluate this little JavaScript > > file. This is true both with and without the plugin. The plugin improves > a > > lot on this. Without the plugin PAC file evaluation just doesn't work in > NB > > if your are using Java 8. As you may be aware Java 8 included a new and > > improved JavaScript engine called Nashorn. However this particular piece > in > > NB core code was made long before Java 8 became available so it was > > developed and tested against another JavaScript engine ... and now the > code > > just doesn't work anymore (bug 245116). The other reason is that the NB > > core code in this area doesn't implement all the mandatory PAC JavaScript > > functions, say for example the script calls JavaScript function > > dnsResolve() (which the PAC standard mandates to exist, and guess what: > > many, many PAC scripts out there indeed calls this function) then the > proxy > > resolution will silently fail in NB core, that is if you are NOT using > the > > plugin. Ok, I'll stop with the reasons why you should be using the > plugin. > > > > :-) > > > > Anyway, to get closer to a resolution you'll need to enable some logging. > > Go to your NetBeans IDE installation directory and locate the file > > etc/netbeans.conf. Now edit the "netbeans_default_options" variable so > that > > you append to it as follows: > > > > netbeans_default_options="........ > > -J-Dorg.netbeans.core2.network.proxy.level=FINEST" > > > > Make sure the plugin is installed. Restart your IDE and wait 1-2 minutes > > and then post all relevant lines from messages log here. Those lines > > relevant would all be containing "org.netbeans.core2.network.proxy". > > > > If you want - out of curiosity - to do the same but WITHOUT the plugin > > (i.e. using bare NetBeans) then it would be > > "org.netbeans.core.network.proxy.level=FINEST" instead but core NB code > > does less logging than my plugin. Still helpful though. > > > > > > Peter > > > > > > > > On Mon, Apr 18, 2016 at 11:25 AM, Casqueiro Gilles < > > > > [email protected]> wrote: > > > Hello Peter, > > > > > > > > > > > > Yes I can, in Chrome and Firefox the internet connection works fine > with > > > the auto-detect proxy settings. > > > > > > > > > > > > Here are probably the relevant lines of the log file: > > > > > > > > > > > > INFO [org.netbeans.core2.network.proxy.NetworkProxyReloader]: System > > > network proxy resolver: Windows > > > > > > INFO [org.netbeans.core2.network.proxy.windows.WindowsNetworkProxy]: > > > Windows system proxy resolver: auto detect > > > > > > INFO [org.netbeans.core2.network.proxy.NetworkProxyReloader]: System > > > network proxy reloading succeeded. > > > > > > INFO [org.netbeans.core2.network.proxy.ProxyAutoConfig]: PAC file > > > evaluator using: LanguageName="ECMAScript" LanguageVersion="ECMA - 262 > > > Edition 5.1" EngineName="Oracle Nashorn" EngineVersion="1.8.0_60" > > > > > > INFO [org.netbeans.core2.network.proxy.NetworkProxyReloader]: System > > > network proxy - mode: auto > > > > > > INFO [org.netbeans.core2.network.proxy.NetworkProxyReloader]: System > > > network proxy - pac url: http://wpad/wpad.dat > > > > > > INFO [org.netbeans.core2.network.proxy.NetworkProxyReloader]: System > > > network proxy TEST - http host: blablabla.proxy.mycompany.blabla > > > > > > INFO [org.netbeans.core2.network.proxy.NetworkProxyReloader]: System > > > network proxy TEST - http port: 8080 > > > > > > > > > > > > Even if it is written in these lines that the proxy was found, Netbeans > > > isn’t actually able to connect to internet. For example, the “Test > > > connection” button in Tools/Option fails. And I have error messages > > > related > > > to the internet connection when I try to update or install a plugin. Do > > > Netbeans know how to resolve this host name into an ip address? My DNS > > > work > > > fine in the Windows command line. > > > > > > > > > > > > Thanks! > > > > > > > > > > > > Gilles > > > > > > > > > > > > *From:* Peter Hansson [mailto:[email protected]] > > > *Sent:* vendredi 15 avril 2016 17:38 > > > *To:* [email protected] > > > *Subject:* [platform-dev] Re: ProxySelector2 > > > > > > > > > > > > Hello Gilles, > > > > > > I'm the author of this plugin. If you get same issue with or without > the > > > plugin installed then there must be something else going on. > > > > > > You can send me the messages log from the IDE (with the plugin > installed > > > and after the IDE has been restarted and up for 1-2 minutes) and I'll > be > > > happy to look at it. > > > > > > The purpose of the plugin is to be on par with what modern browsers is > > > able to do when it comes to detect and choose proxy without a lot of > > > configuration hassle. So if you can make your internet connection > work in > > > IE or Chrome with only "Automatically detect proxy" in Windows settings > > > then the same should be true for the IDE with the plugin installed. > Can > > > you ?? > > > > > > Peter > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Apr 15, 2016 at 4:18 PM, Casqueiro Gilles < > > > [email protected]> wrote: > > > > > > Hello everyone, > > > > > > > > > > > > Does anyone successfully used the project “ProxySelector2” > > > https://bitbucket.org/phansson/netbeansproxy2/overview, also > available as > > > a plugin for Netbeans here: > > > http://plugins.netbeans.org/plugin/55258/?show=true ? > > > > > > > > > > > > First I tried to use the plugin on my Netbeans IDE installation on > > > Windows. When I specify manually the address and port of the proxy > either > > > in Netbeans or in the Windows settings, the internet connection works. > But > > > if I choose “System proxy” in Netbeans and “Automatically detect > proxy” > > > in > > > Windows settings, which are default values I think, it fails to > connect. > > > Same result with and without the plugin. Maybe I misunderstood how to > use > > > it? > > > > > > > > > > > > Note: Our proxy is apparently a Microsoft solution, but I don’t know > that > > > much about it. > > > > > > > > > > > > Gilles > > > > > > > > > > > > ----------------------------------------------------------------------- > > > > > > Le informazioni contenute in questo messaggio di posta elettronica e > > > relativi allegati sono riservate e confidenziali e ne è vietata la > > > diffusione in qualunque modo eseguita. Qualora Lei non fosse la > persona a > > > cui il presente messaggio è destinato, La invitiamo ad eliminarlo e a > > > darcene gentile comunicazione. > > > > > > The information contained in this e-mail and any attachments is > > > confidential and may also be privileged. If you are not the named > > > recipient > > > please notify the sender immediately and do not disclose the contents > to > > > any other person, use it for any purpose, or store or copy the > information > > > in any medium. > > > > > > ----------------------------------------------------------------------- > > > > > > > > > > > > > > > ----------------------------------------------------------------------- > > > > > > Le informazioni contenute in questo messaggio di posta elettronica e > > > relativi allegati sono riservate e confidenziali e ne è vietata la > > > diffusione in qualunque modo eseguita. Qualora Lei non fosse la > persona a > > > cui il presente messaggio è destinato, La invitiamo ad eliminarlo e a > > > darcene gentile comunicazione. > > > > > > The information contained in this e-mail and any attachments is > > > confidential and may also be privileged. If you are not the named > > > recipient > > > please notify the sender immediately and do not disclose the contents > to > > > any other person, use it for any purpose, or store or copy the > information > > > in any medium. > > > > > > ----------------------------------------------------------------------- > > -- > http://www.motion-science.org > http://www.gewerbehof-karlsruhe.de > http://www.friedensdenkmal-karlsruhe.de > http://www.quatrizeps.de > http://www.fokolocos.de >