Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect windows proxy settings after install4j v9.0

Tags:

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?

like image 212
fassen Avatar asked Dec 06 '25 04:12

fassen


1 Answers

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)
like image 171
Ingo Kegel Avatar answered Dec 09 '25 21:12

Ingo Kegel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!