How to detect windows proxy settings after install4j v9.0 - install4j

In our install4j installed application we use HttpClient (Apache) with "useSystemProperties" to perform http requests. Up until v9.0 of install4j that meant windows proxy settings were automatically applied. However, since 9.0.4 this no longer works (probably since 9.0.1 since proxy handling was reworked there, but I haven't been able to verify this). The installer itself still detects proxy settings (update check uses the proxy as before), but they are no longer "forwarded" to the installed application.
Is there a way to turn this "forwarding" back on?

In install4j 9.0.1+ the proxy settings are no longer available as system properties.
On Windows, install4j 9.0.1+ uses native code, not Java sockets for HTTP requests. To force the use of Java sockets you can set the VM parameter
-Dinstall4j.noWinInetConnection=true
The auto-detected proxy that is used for the connection can then be obtained from
com.install4j.runtime.installer.helper.content.ProxyHelper.getProxyHostInfo(url)

Related

GWT 2.7 with Rest

We are building a project and will be using gwt 2.7 with rest ( spring) and weblogic server.
The problem which we face is that I want to run the gwt module on superdev mode (which runs on 8888 port by default) but the rest is deployed on 7001 port on weblogic server.
I cannot call the rest services from superdev mode as it gives a cross site scripting error.
How can get my super dev mode running so that I can test and develop UI and connect to rest services on different port.
I know there has been topic on use a different server for dev mode. But i don't see any examples.
Can some please suggest wat needs to be done. Even if it requires changing the project structure to get the dev mode working with rest.
This is a common problem for web-development. It can be solved by using:
CORS (at the REST server)
Using a proxy servlet (I use this approach, but with a handwritten servlet)
Disable the browser security (I would not do this)
did you try running GWT module on external server mode?

Unable to connect Sonar Eclipse Plugin to Sonar Server

I have installed the latest version on the Sonar Eclipse Plugin on an Eclipse Juno 3.8. I am desperatly trying to connect the plugin to our running instance of Sonar. I'm behind a NTLM v2 Proxy. Hereunder, details of my configuration and my attempts.
Versions of products :
Eclipse 3.8,
Sonar Eclipse Plugin (Java Analyzer & m2e Connector) 3.2.0.20130627-1142-RELEASE,
SonarQube Server 3.7 (running on http://source01:9000, in the LAN, not behind the proxy, direct connection possible).
Trying to access with the following proxy configurations with an without http_proxy variable in the configuration:
direct with http_proxy : failure,
direct without http_proxy : success (but unable to use other Eclipse feature accessing Internet like the Marketplace),
native (with or without http_proxy) : failure,
manual (with or without http_proxy): failure.
I systematically got org.apache.http.conn.ConnectTimeoutException in the logs (trying to access http://source01:9000/api/authentication/validate which work in a browser).
No more idea on what to test.
I have finally found the problem seeking for a different one (Tomcat WST server started but Eclipse was unable to connect to it and timed out).
The problem comes from a strange and unpredictable behavior of the SOCKS proxy parameter.
When SOCKS proxy is defined, in some undefined cases, both starting a WST server or connecting to a SonarQube server through the plugin fail, whereas other functions like plugin installs work like a charm.
The solution came from https://stackoverflow.com/a/6459816/256561 and is to clear SOCKS proxy settings.

Deliver application's GUI via browser

I need to show to a user an interface of some application running on a server using a browser. It should be like RDP-client for a single application on a server.
Are there any solutions or services that can implement following functionality? Maybe Citrix?
Thanks in advance!
This looks like what you're looking for:
http://freerdp.net/
About FreeRDP-WebConnect
FreeRDP-WebConnect is an open source gateway for accessing RDP
sessions using any HTML5 compliant browser. In particular it relies on
the Canvas and the WebSockets feature. FreeRDP-WebConnect is a
subproject of the FreeRDP project.
On the server side, a standalone daemon - written in C++ - provides a
Web page via HTTPS (or HTTP, if configured) and uses FreeRDP libs to
connect as a client to any RDP session. The server side WebSockets
implementation handles current RFC6455 only, so browsers that
implement the older drafts do not work. With RFC6455 being raised to
the "Proposed Standard" level, this should change now really soon.
I would create an account on the server for the user, and only give it access to the one application it needs access to.
You can use Cameyo. To start, create yourself a free account, and click on "Add App". If your installer supports unattended installation, you simply need to submit it. Otherwise, you can build a Cameyo package locally and send it in. It will then be playable as HTML5.
You don't indicate what server you are running on.
As an alternative to FreeRDP-Webconnect cited above, also open source and also using FreeRDP as rdp client through an HTTP gateway, there is Myrtille.
FreeRDP-WebConnect embeds a standalone daemon written in C++ to provide a web page via HTTP(S), and so will also work on Linux servers, while Myrtille have a IIS/.NET (C#) implementation and an MSI installer, thus is more intended for Windows Servers.

Super Dev Mode on a remote server

The project I work at is quite specific. We use GWT with SAP backend. We run the Dev Mode using the following configuration (as program arguments; I run the project directly using IntelliJ IDEA)
-noserver -logLevel INFO -startupUrl http://server-url:8000/aaa -whitelist ^http[:][/][/]server-url[.]eu[:]8000/aaa com.company.project.main.Main
Note, we didn't use a local server (-noserver).
After familiarizing myself with the Super Dev Mode, I understood, that it works similar to GWT Web Mode, i.e. it compiles JavaScript (the folder to compile to can be specified) and then runs the code server with that script hosted.
Due to the specifics of the project, the compiled JavaScript is deployed to the remote server using maven via WebDav. So simply specifying -workDir as a parameter will not deploy the scripts on the remote server. Nor can we run (at least at the moment) a Java server on the server-url address.
Can we use the Super Dev Mode in this situation?
Yes you can.
EDIT 2016-11-27: I built a devserver that can use -launcherDir-style SuperDevMode without the need to write to the server, by using a webpack-like proxy: https://github.com/tbroyer/gwt-devserver
EDIT: there are a few issues re. deferred-binding properties. The recommended use of SDM (since GWT 2.7) is to use -launcherDir which means using a local server.
SuperDevMode works much like DevMode with -noserver, which means you have to deploy your app at least once to your server. In the case of SuperDevMode, it means you have to compile and deploy with the xsiframe linker and devModeRedirectEnabled property set to true.
Then you run SuperDevMode on your machine, create your bookmarklets if not done already, load your app from the remote server and click the Dev Mode On bookmarklet.
This will store something in the browser's sessionStorage so that reloading the page will now load the permutation from the SuperDevMode running on your machine rather than the remote server.
More info about how SuperDevMode works: http://blog.ltgt.net/how-does-gwts-super-dev-mode-work/
For now, I see only one possible solution, which is to run the gwt-codeserver.jar somehow on the SAP server (with the address, say, http://server-url:8000/bbb) and write a servlet, that will redirect all requests to http://server-url:8000/aaa. However, this is not very easy to implement. The SAP server has "tricky" authentication mechanism, where user first sees the logon page and then they are redirected to a generated session-specific URL.
Other ideas are very welcome.

Removing NTLM from Eclipse's

I'm having an issue trying to connect through a proxy from Eclipse 3.6. The proxy supports both NTLM and Basic Auth schemes.
Eclipse seems to prefer NTLM auth scheme, instead of the basic one. However, after the selection is done, the proxy seems to hang and Eclipse retries the downloads forever. Using wireshark to monitor the traffic I can see:
Eclipse is trying to auth through NTLM
The proxy sends back a 407 response.
This happens 3 times, then the proxy stops responding and Eclipse retries the download until I hit cancel.
Is there a way to tell Eclipse to try Basic Auth instead of NTLM?
Best regards,
Manuel.
I don't know about the Basic Auth, but regarding NTLM proxy, check the bug 281384, also discussed at length in bug 281472.
It introduces a workaround for NTLMv2 Proxies.
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=myproxy
-Dhttp.proxyUser=mydomain\myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.nonProxyHosts=localhost|127.0.0.1
The first property disables the httpclient provider (and so uses the URLConnection-based provider, which does have support for NTLMv2 proxies),
and the next 5 properties are as specified by Sun for the URLConnection-based provider.
The problem is that standard Eclipse HTTP client can't manage the so named HTLM proxies. The method, proposed by #VonC was good till Kepler version of Eclipse.
The trick is to turn off the Eclipse HTTP client. But starting from Kepler, its name had changed. Add the following to the eclipse.ini file:
-vmargs
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
Also look here for a very good explanation and here for an "official" explanation of the Eclipse team.
You don't need to set the proxy parameters in the eclipse.ini. The settings in Windows-preferences-General-Net are enough. But you should check the global proxy settings on the OS, paying attention to possible automatic settings.