Open h2o2-stripe opened 4 years ago
@h2o2-stripe could you give some more context around the need to use a unix socket? Most other providers I'm aware of or use don't have this functionality, so this seems like an interesting request
@jamestoyer, thanks for the response!
We use an HTTP proxy that runs on developer laptops that allows command line tools to access internal sites that require client certificates.
In particular, it exposes a Unix domain socket that acts as an HTTP proxy. Plain HTTP requests to this proxy will be forwarded over HTTPS using the user's client certificate.
That's certainly not a use case I've heard of or seen before.
How are you getting around this for other providers? Or do you not use them locally?
Most of our other providers either: (a) don't connect to things inside the VPN, which need this support (e.g. AWS, G Suite, etc.), or (b) are run from server infrastructure, which doesn't need the Unix socket (if we ever actually use the Jira provider like we were thinking, it'd be run on the server, since it's mostly for centralized configuration, and not something that we'd want everyone running) However, for developers to manage Artifactory, we'd want them to both run from a laptop, and since we're hosting the server, it needs to run through our authenticating proxy.
@h2o2-stripe Have you tried using the HTTP_PROXY env variable?
DefaultTransport is the default implementation of Transport and is used by DefaultClient. It establishes network connections as needed and caches them for reuse by subsequent calls. It uses HTTP proxies as directed by the $HTTP_PROXY and $NO_PROXY (or $http_proxy and $no_proxy) environment variables.
From: https://golang.org/pkg/net/http/
It feels like this is the more correct solution. If it doesn't work, we can try and fix that instead
The more I think about his PR the more I believe it's not something that should exist in this provider for two reasons.
The intention was to allow to use unix socket as transport. In our case a proxy service opens unix socket and adds certificates and credentials on the way to Artifactory.