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

Working with CONNECT tunnels #1037

Closed
fmonjalet opened this issue Jan 27, 2017 · 5 comments
Closed

Working with CONNECT tunnels #1037

fmonjalet opened this issue Jan 27, 2017 · 5 comments
Labels
A-server Area: server. C-feature Category: feature. This is adding a new feature.

Comments

@fmonjalet
Copy link
Contributor

Hi,

I am currently writing a toy HTTP proxy using hyper with tokio (current master). While plain HTTP proxying was easy to write, I am struggling with how to handle CONNECT tcp tunnels (typically used to proxy https without ssl interception).

How would you proceed to switch from the Http service to a raw tcp proxy service (such as the one demonstrated in tokio-socks5) on the same socket ?

Solving this issue would also be beneficial for switching protocols to websockets or cleartext http2.

Thank you in advance for any advice.

Florent

@seanmonstar
Copy link
Member

This is something that Tokio needs to figure, since hyper is using Tokio internally. I've discussed the concept before with the Tokio devs, but apparently there wasn't a tracking issue, so I've filed tokio-rs/tokio-proto#138.

@seanmonstar seanmonstar added the B-upstream Blocked: needs a change in a dependency or the compiler. label Jan 28, 2017
@fmonjalet
Copy link
Contributor Author

Thank you! I'll think of a workaround in the meantime.

@marcb
Copy link

marcb commented Jan 30, 2017

I'm also interested in CONNECT support. Looking to correlate TLS SNI with the domain name passed to CONNECT, to (dynamically) whitelist and also map the name to another for the resolution of the next hop.

Context an in-bound forward proxy for one platform to reach other platforms within an enterprise network across DMZs and fronted by reverse proxies.

Another protocol switch example is to support the proxy protocol (aka ELBs) stripping and insertion.

@sfackler
Copy link
Contributor

sfackler commented Jun 14, 2018

@seanmonstar
Copy link
Member

Yep, this can be done now with the server::conn module, and in the next release, could also be done thanks to #1563.

@seanmonstar seanmonstar added A-server Area: server. C-feature Category: feature. This is adding a new feature. and removed B-upstream Blocked: needs a change in a dependency or the compiler. labels Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-server Area: server. C-feature Category: feature. This is adding a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants