Closed ehelms closed 2 years ago
@ehelms according to the go docs the net
library supports also the no_proxy
/NO_PROXY
env variable. We can add an exception for the foreman server there.
On a deeper thought, it seems that the request would always go to localhost
anyway, since the RHCd would be installed on the same machine as Satellite. This makes the no_proxy
rule much more stable. I don't suppose there are many cases where you would want to add a proxy to access local machine.
localhost
is not part of the cert and not what we setup as the foreman url
(Also, that would break Ansible)
So no localhost shortcut :) We still can add the foreman url to the no_proxy list.
Yepp, that part sounds reasonable. Just wanted to point out that localhost
is a bad idea :)
Good question - RHC talking to cloud. However, given this a generic solution that affects
net
, I can see how this might cause talking to Foreman to route through the proxy too which is not what we want (https://github.com/ShimShtein/yggdrasil-worker-forwarder/blob/main/server.go#L60). @ShimShtein thoughts on if this would be a problem and how we could prevent it?This way of configuring comes from -- https://github.com/RedHatInsights/yggdrasil/wiki/FAQ#how-do-i-connect-to-a-broker-using-an-httphttps-proxy