Closed rikhuijzer closed 3 months ago
Starting from the high_level_tokio example, it should be sufficient to pass the tls
you get from tls_incoming.next()
to hypers serve_connection
. It seems like the hyper::rt::{Read,Write}
traits in hyper aren't the same as in tokio, so you may have to add something like let tls = TokioIo::new(tls);
.
I'll try to add a tokio example later today. If you figure it out before I do, a message with code or a PR would be much appreciated.
I pushed and example (high_level_hyper.rs
).
Btw, your curl error looks like you used curl http://example.com
and served https on port 80 instead of curl https://example.com
and serving on port 443.
Thanks Florian! I haven't tried it but will do so soon. I appreciate your quick response!
Btw, your curl error looks like you used
curl http://example.com
and served https on port 80 instead ofcurl https://example.com
and serving on port 443.
Ouch. I could have known that. Thanks!
During my CS master, one teacher always said that if something is unclear to me, I should ask since it is likely unclear to other people too. I hope it's okay to ask here too.
I've setup a server with
hyper
's getting started guide (https://hyper.rs/guides/1/server/hello-world/):This worked fine for me, but I have so far been unable to integrate
rustls-acme
into it. The currentexamples/high_level_tokio.rs
usesTcpListenerStream
andnext()
instead oflistener.accept()
. Would it be a good idea for ahyper
example to be added?As a side-note, at some point I had something working but then
curl
responded withwhich is a weird issue, I think. I'm using all the latest versions according to