emscripten-core / emscripten-core/emscripten
websocket_to_posix_proxy in a container
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Hi,
At first, let me explained a little bit what I'm doing.
I have a modbus TCP server running in the browser with the code compiled with the flags to use the websocket_to_posix_proxy as explained in [this](https://emscripten.org/docs/porting/networking.html#full-posix-sockets-over-websocket-proxy-server) documentation.
I tried to build the websocket_to_posix_proxy directly in windows but can't get it to work with the windows socket API. So I build it in WSL and the whole is working perfectly. When i run my script in the browser, it registers through websocket with the proxy and when sending modbus tcp requests from a third software, the proxy succesfully transfer the requests through websocket to the browser etc...
Now for ease of deployment, I'm trying to build the proxy in a docker container with alpine linux as a base. I carefully expose the required ports (8090 for the websocket and 8502 for the modbus tcp socket) and register them so that traffic on that ports will be forwarded to the container.
The build seems to work ok and the connection through the websocket seems also to work as expected (the proxy running in the container reacts when I start the script in the browser and the websocket handshare seems successfull). But when I run modbus tcp requests, I get a "connection reset" error.
Did anybody successfully implemented the websocket_to_posix_proxy in a docker container?
Kindest regards,
Thomas
Contributor guide
Assessment
This issue has not been assessed yet.