Skip to content
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: forward proxy for CONNECT request handling #61

Open
franchb opened this issue Nov 25, 2024 · 4 comments
Open

Feature request: forward proxy for CONNECT request handling #61

franchb opened this issue Nov 25, 2024 · 4 comments

Comments

@franchb
Copy link

franchb commented Nov 25, 2024

Hi there,

Thank you for this amazing project!

I am currently learning Rust and I am interested in implementing a transparent forward proxy to handle CONNECT requests, similar to how the ngx_http_proxy_connect_module works for nginx, or how the squid proxy functions.

Initially, I attempted to develop this feature with Pingora, but my Rust skills are still developing.

So, I began searching for projects that utilize the Pingora framework and came across this project, which I found small, easy but rather solid.

Would you consider implementing CONNECT functionality for this proxy?

Thank you!

@Aitthi
Copy link
Member

Aitthi commented Nov 28, 2024

Hi @franchb,

Thank you for your feature request and for pointing out the possibility of implementing CONNECT support! 🚀

Since Easy-Proxy is built on Pingora, I’d recommend exploring the PeerOptions struct in Pingora, which provides extensive configuration options for upstream connections. For example, fields like custom_l4 and tcp_fast_open could potentially play a role in handling CONNECT requests.

Here’s a snapshot of the PeerOptions struct in Pingora for reference:

PeerOptions

If additional fields or modifications are needed in PeerOptions to fully support CONNECT, you can propose changes upstream in Pingora. Alternatively, if you have specific enhancements for Easy-Proxy itself, feel free to open a PR in this repository—we’d love to review and discuss your ideas!

Let me know if you need guidance on where to start or have further questions. 😊

@Aitthi
Copy link
Member

Aitthi commented Nov 28, 2024

.insert::<HttpPeer>(HttpPeer::new(endpoint, false, String::new()))

@Aitthi
Copy link
Member

Aitthi commented Nov 28, 2024

let peer = match ctx.backend.ext.get::<HttpPeer>() {

@franchb
Copy link
Author

franchb commented Nov 28, 2024

Thank you, @Aitthi ! I will try to implement a custom L4 peer, and if it works, I will submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants