Closed lychees closed 2 years ago
Web pages can't use normal TCP or UDP sockets. They can only connect using websockets. So I'm running a websocket proxy:
https://github.com/paradust7/minetest/blob/webport/src/mainloop.cpp#L82
My proxy only allows connections to minetest servers that are listed in the public server list. You could make your own proxy server if you wanted. The interface is here:
https://github.com/paradust7/webshims/blob/main/src/emsocket/proxy.js#L35
I guess it is probablly related with https://github.com/paradust7/minetest-wasm/issues/6, but I am not sure.
Now, we are binding a address with the ip, mt.kuso.io:30000, It now shows time out when connecting. (everything is fine in native minetest)