ktock / container2wasm

Container to WASM converter

Home Page:https://ktock.github.io/container2wasm-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to approach adding a new network adapter?

3p3r opened this issue · comments

Hello! Amazing work on container2wasm.

I recently finished working on https://github.com/3p3r/fakettp/ which is based on Service Workers and allows any client side code to spawn a fake web server or even run socket.io in polling mode.

Using fakettp and socket.io in polling mode, I wanted to add a new network adapter to container2wasm which runs entirely in browser and uses Service Workers underneath. This would also lead to containers being able to communicate with each other in browser entirely.

How do I approach doing that? Where is the best place to start this effort and contribute it back?

For extending networking functionallity, one possible approach to modify c2w-net-proxy which is a on-browser networking stack that runs in a web worker and forwards all packets to/from the container. Another one is directly fixing virtio-net implementation of Bochs and TinyEMU to support non-c2w-net-proxy forwarder. We also have docs about networking: https://github.com/ktock/container2wasm/tree/9f60d3fdf889c4215cbfc30e3898a3690e1c4b87/examples/networking

That's the exact information I was looking for. Thanks!
I'll begin by modifying the c2w-net-proxy and see where that takes me.