userlandkernel / espreversetcp Goto Github PK
View Code? Open in Web Editor NEWA reverse TCP tunnel for the ESP32
A reverse TCP tunnel for the ESP32
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.
First of all, thanks for sharing this project. It's a great idea!
I am seeing [Errno 104] Connection reset by peer as soon as i do curl http://localhost:8080
I was wonding whether you had the same problem and how did you solve it ?
From the ESP. Looks fine
23:55:09.927 -> WNET xxxx FORWARD TO xxxxxxx
23:55:10.443 -> WLAN_CONN_RETRYWLAN_CONNECTED
23:55:10.443 -> IP: xxxx MAC: xxx
23:55:10.443 -> CONN_LISTENER
23:55:10.443 -> CONN_TCP
23:55:10.770 -> RECV_FROM_LISTENER
23:55:11.049 -> RECV_NOP
23:55:11.049 -> RECV_NOP
23:55:11.049 -> RECV_NOP
23:55:11.049 -> RECV_NOP
23:55:11.563 ->
23:55:11.563 ->
23:55:11.563 -> RECV_AUTH
Python
Waiting for ESP-32 to connect to us...
('Got connection from ESP32:', ('xxxxx', 52826))
Starting local input socket on 127.0.0.1 port 8080...
('Got local connection from:', ('127.0.0.1', 42714))
Sending 78 bytes to the target...
[Errno 104] Connection reset by peer
Waiting for ESP-32 to connect to us...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.