userlandkernel / ESPReverseTCP

A reverse TCP tunnel for the ESP32
25 stars 4 forks source link

Really promising library! #2

Open zekageri opened 11 months ago

zekageri commented 11 months ago

I want to implement a websocket tunnel to my node js server which is in the cloud. In my mind it would work like this

esp connects to server ( from intranet to internet ) server serves an http page to the client client do an http request to the server server captures every http request sends to esp32 via websocket esp process websocket data like it was an http request sends response back via websocket

This is a lot of work and a lot of data ping ponging. I need some kind of an HTTP tunnel solution where

esp connects to server via http and not close the socket server forwards every http request to esp esp gets requets like it was in local

Can it work with this library?

I already have a setup with ESP Async Webserver. I have setup the HTTP endpoints and it is working in local. Now i need a server implementation.

userlandkernel commented 11 months ago

I need to revive this project as this project has some bugs in the protocol I wrote for it that make it close to unfunctional. It's also very slow I think because it uses synchronous code (cause I dont have extra memory for my ESP32 to run threaded code) but I'm planning to work on it in the future. You can use the code freely to make it work for your project but it doesn't work with HTTPS

zekageri commented 11 months ago

Thank you for the response. Glad to hear you have plans. Can you elaborate why this is unfunctional? If you have time ofc.