-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Accept https proxy #740
base: main
Are you sure you want to change the base?
Accept https proxy #740
Conversation
I am not a maintainer of the project, but I do have some comments on the CL:
|
Thanks, I've made the suggested changes. |
Is there anything else needed here that prevents merging? Any comments? @garyburd |
Add `--proxy-url` flag to `logcli` to support connecting to Loki instances running behind either HTTP or HTTPS CONNECT-style proxies. Examples: http proxy: ``` logcli \ --addr="http://loki-distributed-querier.loki.svc.cluster.local.:3100/" \ --proxy-url "http://envoy.dom.tld" \ query '{app"foo"}' ``` https proxy with mTLS auth: ``` logcli \ --addr="https://loki-distributed-querier.loki.svc.cluster.local.:3100/" \ --proxy-url "https://envoy.dom.tld" \ --cert tls.crt \ --key tls.key \ --ca-cert ca.crt \ query '{app"foo"}' ``` Note that tail (`-f`) support and https proxies only works with a fork of the `gorilla/websocket` lib. There are open PRs that promise to add support for https proxies such as: gorilla/websocket#740 Add the following to `go.mod` to use the fork with https support: ``` replace github.com/gorilla/websocket v1.4.2 => github.com/philipatl/websocket v1.4.3-0.20211206152948-d16969baa130 ```
Add `--proxy-url` flag to `logcli` to support connecting to Loki instances running behind either HTTP or HTTPS CONNECT-style proxies. Examples: http proxy: ``` logcli \ --addr="http://loki-distributed-querier.loki.svc.cluster.local.:3100/" \ --proxy-url "http://envoy.dom.tld" \ query '{app"foo"}' ``` https proxy with mTLS auth: ``` logcli \ --addr="https://loki-distributed-querier.loki.svc.cluster.local.:3100/" \ --proxy-url "https://envoy.dom.tld" \ --cert tls.crt \ --key tls.key \ --ca-cert ca.crt \ query '{app"foo"}' ``` Note that tail (`-f`) support and https proxies only works with a fork of the `gorilla/websocket` lib. There are open PRs that promise to add support for https proxies such as: gorilla/websocket#740 Add the following to `go.mod` to use the fork with https support: ``` replace github.com/gorilla/websocket v1.4.2 => github.com/philipatl/websocket v1.4.3-0.20211206152948-d16969baa130 ```
It would be great to see https proxy support. Are there any open blockers or concerns that the community could help with this PR or an alternate implementation? |
Almost every PR is blocked by a lack of an active maintainer. |
Why this PR wasn't merged? |
@tomerb-neosec it looks like there are merge conflicts in this PR. If you get those taken care of we can go forward with reviewing and getting this merged in. Thanks for your contribution! |
Fixes #739
Summary of Changes
proxy_RegisterDialerType
for thehttps
scheme to allow communication to https proxiesUsesTLS
method to theproxy_Dialer
interface to ensure the https forwardDialer can inspect that https is supported, and to adjust if necessary