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

Implement CONNECT-UDP for proxying HTTP/3 through HTTP/3 proxy #6

Open
mila opened this issue Feb 9, 2023 · 1 comment
Open

Implement CONNECT-UDP for proxying HTTP/3 through HTTP/3 proxy #6

mila opened this issue Feb 9, 2023 · 1 comment

Comments

@mila
Copy link
Contributor

mila commented Feb 9, 2023

HTTP/3 proxies can support CONNECT-UDP for proxying UDP packets. This can be used to proxy QUIC and HTTP/3 through HTTP/3 proxies.

  • Implement ProxyClientSession.connect_udp() and use it for proxying of HTTP/3 traffic.
  • Add CONNECT-UDP support to ProxyServer.
@mila
Copy link
Contributor Author

mila commented Feb 9, 2023

At the moment, hface uses AnyIO UDPSocket (or any other UnreliableObjectStream[UDPPacketType]) for UDP transport. With this transport, every packet can be sent to a different address. CONNECT-UDP is not compatible with this approach because we need to specify a destination address at the connection time.

It can be best to switch to ConnectedUDPSocket (or more generally UnreliableObjectStream[bytes]):

  • I don't think that clients need to supports servers migrating between IP addresses.
  • Servers already use QUICListenerStream for routing packets and this class has a remote_address attributes.
  • This could help to get rid of some hacks that we use when we need remote_address for HTTP/3 connections.

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

No branches or pull requests

1 participant