-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Feature Request] Upstream Proxy #51
Comments
The reason that I removed the initial upstream proxy implementation was because it did not work for websockets. If I can figure out a way that works for both HTTP and websockets, then I would be happy to include it as an implementation. I do like the idea of integrating the upstream proxy config with the |
This blog could be of interest as a reference since Hudsucker already uses tungstenite. We could start with normal HTTP proxy support w/o websockets and make it optional with a flag similar to |
+1 on the upstream proxy being useful for normal HTTP requests. I was going to implement this on my own (now with that git commit as reference), is there any other reference code or workaround thats useful in the meantime? |
Going back to the open Tungstenite issue, there seems to be another attempt in snapview/tungstenite-rs#406 (comment) earlier. |
Thanks @roniemartinez , looking at the previous code for the http proxy I see they were using hyper-proxy. Thats also what I was attempting to use but it seems like it might not be actively maintained anymore. Do you know if its still the best way forward for an http upstream proxy? |
Not sure about other libraries, but currently |
Do you have a solution now? Like mitmproxy python implementation? |
There isn't support built directly into this library, however, you can either provide a custom hyper client (potentially using hyper-proxy2) or forward the requests yourself in the |
Could you provide an example? How to forward https and ws to additional target in handle_request? |
+1 for this feature, I've used the goproxy version to change upstream Scheme and URL as below: |
I noticed that this crate supports upstream proxy before in b7a2136
But it was removed in 408999b
This is a very useful feature and might be worth it to bring it back?
I would like to propose a more flexible design instead of the original implementation by adding this to HttpHandler which will give an option to route traffic based on request or rotate from a list of upstream proxies
The text was updated successfully, but these errors were encountered: