ebourg / jsign

Java implementation of Microsoft Authenticode for signing Windows executables, installers & scripts
https://ebourg.github.io/jsign
Apache License 2.0
259 stars 108 forks source link

better proxy management to be able to execute tests behind a proxy #85

Open lionnel opened 3 years ago

lionnel commented 3 years ago

Hi,

I'have isolated the initializeProxy to be able to set environment http.proxyUrl, http.proxyUser & http.proxyPassword to be able to pass local proxy.

ebourg commented 3 years ago

Thank you for the suggestion, but is this really necessary? The JVM automatically picks the http.proxy* system properties to configure the proxy. We shouldn't have to redo the same work here.

lionnel commented 3 years ago

Yes the JVM take account of proxy url (host and port). But as far as I have checked it do not take account of the user/password part. No pb if you do not merge the pr. I'm trying to implement a verifier. As I work being an authenticate proxy, it's more to me to be sure not to push this part in the future pr. Regards

ebourg commented 3 years ago

The username/password properties should be used automatically, at least with Java 8:

https://stackoverflow.com/questions/1626549/authenticated-http-proxy-with-java

Also if you work behind a proxy, you may want to try -Djava.net.useSystemProxies=true.