ngrok-rust icon indicating copy to clipboard operation
ngrok-rust copied to clipboard

update hyper and axum

Open jrobsonchase opened this issue 1 year ago • 3 comments

Significant breakage, since hyper 1.0 introduced significant breakage.

Of note:

  • No more Accept trait, and no more hyper-provided server. Examples are all modeled after the axum serve-with-hyper example.
  • Conn now implements the hyper read/write traits, because why not?
  • Our proxy wrapper is ancient and unmaintained, and still uses old hyper :cry:

All in all, not super happy about this change. Hyper used to provide a nice pluggable interface where you could bring-your-own listener type, and that's been entirely done away with. Axum didn't fill in the gap very well, and their serve function explicitly takes a TCP listener. Not sure we want to provide yet another accept-serve loop.

Since hyper is 1.0 and stable though, I feel better about providing implementations of the traits that they do offer. Maybe the rest of the ecosystem will catch up and figure out how to not depend on TcpListener directly.

Resolves #126 Resolves #136

jrobsonchase avatar Feb 13 '24 16:02 jrobsonchase

All in all, not super happy about this change. Hyper used to provide a nice pluggable interface where you could bring-your-own listener type, and that's been entirely done away with.

Hopefully, as hyper-utils matures they develop a new pluggable interface.

Abdiramen avatar Feb 18 '24 13:02 Abdiramen

When is this PR expected to be integrated?

zaijie1213 avatar Sep 06 '24 05:09 zaijie1213

@jrobsonchase @bobzilladev Any chance this will get merge any time soon? I could really use this, since my project is dependent on Hyper 1.0+. Let me know if there is anything I can do to speed this up.

3miliano avatar Sep 25 '24 11:09 3miliano

What's the status on this? This is related to https://github.com/ngrok/ngrok-rust/issues/158

awakecoding avatar Feb 25 '25 19:02 awakecoding