jonenst commented on PR #797:
URL: 
https://github.com/apache/httpcomponents-client/pull/797#issuecomment-3844212900

   Thanks !
   I have tested with the latest code from master, as a user I was indeed in 
control of the proxyHost/proxyPort through java system properties when the 
apache httpclient was created with HttpClients.createDefault(). For basicauth 
as you explained (and removed in the docs), it works if you either:
   - add manually the `Authenticator.setDefault` somewhere (note: this method 
is still an improvement, it gives locus of control to the final application 
developper; previously you could have been blocked because a lib developper 
used HttpClients.createDefault())
   - or (should work?, untested and complicated?) use -javaagents to inject the 
code the same code (haven't tested it though) => locus of control to the user 
if the user controls the java launcher command line (even indirectly through 
env variables...) but pretty technical, may be forbidden, and doesn't work with 
graalvm native image
   - or run an unauthenticated proxy that proxies upstream with your auth (e.g. 
squid proxy `cache_peer  login=my_username:my_password`)
   
   Maybe all this (and more options ? can you make it more secure (tied to 
user, not all tcp of localhost) ? socks (never used it)?) should go into some 
guide, otherwise I'm pretty sure people are going to be pretty confused 
(especially with the removal of the support for -DproxyUser -DproxyPass)
   
   Thanks again for taking the time to work on this
   
   Cheers


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to