jczic / MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
https://github.com/jczic/MicroWebSrv
MIT License
645 stars 116 forks source link

Curious whether MicroWebSrv supports https? #48

Closed tshead2 closed 5 years ago

tshead2 commented 5 years ago

I’ve been wanting to handle web requests using https on a PyCom WiPy 3.0 for awhile now without success. Maybe this is asking too much of the hardware?

Thanks in advance, Tim

jczic commented 5 years ago

SSL/TLS (https) isn't implemented on MicroWebSrv, but it's simple with a pycom. Just wrap socket with the goods parameters after socket creation :)

tshead commented 5 years ago

@jczic - Thanks for the response! I thought that this would be easy too, but I've tried calling ssl.wrap_socket(...) after both bind() and accept(), and in both cases the client hangs while making a request. This was with my own minimalist http server, but I think I'll try hacking on MicroWebSrv instead. I'm curious if you have a working example?

Cheers, Tim

jczic commented 5 years ago

Hi, I have an another http(s) server with that but it's dedicated to a special usage and uses I/O directly (TLS's handshake doesn't works with asynchrone mode in micropython/esp32...). You can see that in : https://github.com/jczic/IoTSocket-Concentrator or directly in my sockets layer file in : https://github.com/jczic/xAsyncSockets. But this code doesn't use normal/synchrone TLS mode. Also, don't forget the argument to enable "server side" TLS usage on ssl.wrap_socket. Good luck and have a nice day.

tshead commented 5 years ago

Thanks for all the help, I’ll check it out!

Cheers, Tim

jczic commented 4 years ago

Hello,

I released a fully new version (v2.0) of my web server here : github.com/jczic/MicroWebSrv2. Open source MIT, fully asynchronous, more robust, more fast and more efficient! It is delivered with a good documentation.

Thank you for your support and feedback. ☺️

Jean-Christophe Bos

Le mar. 29 janv. 2019 à 04:15, Timothy M. Shead notifications@github.com a écrit :

Thanks for all the help, I’ll check it out!

Cheers, Tim

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jczic/MicroWebSrv/issues/48#issuecomment-458391543, or mute the thread https://github.com/notifications/unsubscribe-auth/AAegLMT8U51Bpl20RTX4yWoF8KX8xZ7Iks5vH7y7gaJpZM4aUMkp .

--

Sincèrement,

tshead commented 4 years ago

Thanks for the followup on this … I will check the new version out!

Cheers, Tim