Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Better proxy support #236

Open
opoplawski opened this issue May 26, 2023 · 7 comments
Open

RFE: Better proxy support #236

opoplawski opened this issue May 26, 2023 · 7 comments

Comments

@opoplawski
Copy link

Perhaps you could make use of https://github.com/akuhtz/proxy-vole to auto detect proxy settings. Would be very helpful for us.

@opoplawski
Copy link
Author

I'm happy to test out any changes.

@opoplawski
Copy link
Author

So it's using the correct proxy (so yay java.net.useSystemProxies=true), but since we have an SSL filtering proxy we need to set the CA to include the proxy CA. Easiest would be to set javax.net.ssl.trustStoreType=WINDOWS-ROOT (which so far seems to need to be done on the command line), but that results in an exception: java.security.KeyStoreException: problem accessing trust store. Google search leads me to believe that the jre shipped with jhelioviewer is missing the SunMSCAPI provider.

I installed the Temurinjre chocolatey package and used the jre from that and it seems to work. But this is pretty clunky to get working.

@opoplawski
Copy link
Author

Indeed in the jre I installed I see jre\bin\sunmscapi.dll but not in the jhelioviewer jre\bin directory.

@bogdanni
Copy link
Contributor

bogdanni commented Jun 6, 2023

Thank you for investigating this, I would never find it.
So it seems that, for Windows, the jdk.crypto.mscapi module is needed for this to work.
Please try the build from http://swhv.oma.be/download_test/, I verified that sunmscapi.dll is now installed.

@bogdanni
Copy link
Contributor

bogdanni commented Jun 6, 2023

Do I understand well that setting java.net.useSystemProxies=true (and additionally for Windows javax.net.ssl.trustStoreType=WINDOWS-ROOT) on the command line would make it work with proxy servers?
Are you able to load movies?

@opoplawski
Copy link
Author

Using your test build with those settings works for me with our proxy - I'm able to load data from https://www.lmsal.com/ for example. If it still works for you, I think we're good. I think both settings should be pretty safe defaults - I certainly expect applications to honor the system proxy and CA configuration. So I guess the remaining question is how to add the javax.net.ssl.trustStoreType=WINDOWS-ROOT option. Can you add that to the windows launcher?

On Linux things are a bit different. java.net.useSystemProxies doesn't really work (but also doesn't hurt), but java does honor the http_proxy/https_proxy environment variables which should work for us. Also, we need to use the system CA store again, which we can do by either using the system installed java, or by adding the -Djavax.net.ssl.trustStore=/etc/pki/ca-trust/extracted/java/cacerts (at least for RedHat).

@bogdanni
Copy link
Contributor

bogdanni commented Jun 8, 2023

Could you please try the builds at http://swhv.oma.be/download_test/proxy/
They make use of proxy-vole. Just as normal user without special flags, defines, etc. Linux, Windows, maybe macOS also.
Please try both the GSFC server (TLS sockets) and the IAS server (plain sockets).
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants