code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Feat]: Run code-server containers entirely on browser natively using container2wasm or similar ones, using wasm

Open kotasudhakar opened this issue 1 year ago • 5 comments

What is your suggestion?

Implement container2wasm or similar ones to make the containers run solely and entirely on a browser without needing to run it on a remote server.

Why do you want this feature?

This feature really helps us to eliminate the need for servers/virtual machines and helps to people to use it inside the browser only

Are there any workarounds to get this functionality today?

Unfortunately not, as it involves WASM to be implemented

Are you interested in submitting a PR for this?

Yes, I am interested but i really dont have in depth knowledge on wasm and docker containers to proceed with this

kotasudhakar avatar Aug 07 '23 06:08 kotasudhakar

Interesting idea. Is there anything we actually need to implement in code-server though? At a glance it looks like container2wasm would be responsible for making everything work.

code-asher avatar Aug 07 '23 18:08 code-asher

Networking part is currently missing in the container2wasm, may be somehow if we can integrate it with the code-server and make it work all alone in the browser & a installation script for it would be really great

kotasudhakar avatar Aug 08 '23 09:08 kotasudhakar

I see, so nothing we can do until networking is implemented in container2wasm right?

code-asher avatar Aug 09 '23 22:08 code-asher

That's an interesting project! They have now experimental network support. This "wasm container" can access the network using an HTTPS proxy: https://ktock.github.io/container2wasm-demo/amd64-debian-wasi.html allowing to use the fetch api of the browser. That should be enough for normal github access etc. There is also a way using a local server and connecting with websocket. But I think that does not really make sense..

Maybe with a bit effort (wrapping packets), one could enable a wireguard proxy over the fetch api .. would be a cool feature for https://github.com/coder/wgtunnel :P

smerschjohann avatar Oct 30 '23 21:10 smerschjohann

Can someone please consider this feature and get started on this?

kotasudhakar avatar Oct 31 '23 12:10 kotasudhakar

Closing for now, it does not appear to be something we have to address in code-server itself, if I understand correctly.

code-asher avatar Jul 13 '24 00:07 code-asher