fxlauncher icon indicating copy to clipboard operation
fxlauncher copied to clipboard

proxy support

Open storkeu opened this issue 7 years ago • 5 comments

Hi,

How does fxlauncher handle behind proxy scenarios? When experimenting with demo, it failed to connect.

Feb 22, 2018 4:23:51 PM fxlauncher.Launcher lambda$start$0
WARNING: Error during File Synchronization phase java.net.ConnectException: Connection refused: connect

Can user specify proxy or read app proxy settings?

storkeu avatar Feb 23 '18 10:02 storkeu

You can supply proxy parameters the normal way, .ie -Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800 :)

edvin avatar Feb 23 '18 10:02 edvin

Tks, I managed to start the demo with no errors with your tip (poor java experience...) But in my scenario I have a native app with bundled jre, and don't expect users to have java installed. In my app I have a form to allow user to specify proxy settings and detect if no internet connection. How can fxlauncher work with this scenario? fxlauncher runs first, right?

storkeu avatar Feb 23 '18 13:02 storkeu

FXLauncher bundles the JRE, but there is currently no feature that will allow you to ask the user for proxy information, so update wouldn't work. This feature could be added to the launcher pretty easily though.

edvin avatar Feb 23 '18 14:02 edvin

I also faced the similar issue but able to solve it using this library

I added the code in the Launcher.java to resolve the proxy for the app server url and added that proxy host and port as environment varaibles.

It started working by just double clicking the jar now but the size of the fxlauncher jar is increased from 37 kb to 6 MB. Still it is acceptable for me as my users are with in my corporate network across different locations and each user could have a different proxy PAC script. So I had no choice but to use this proxy-vole library.

I can share the code if anybody is interested.

sahajamit avatar Jun 27 '18 08:06 sahajamit

Hello, can you share your code using proxy-vole please, thank you.

slimarafa avatar Dec 16 '19 11:12 slimarafa