build brook wasm(WebAssembly) wssclient
Since brook is a cross-platform network tool designed for developers, I think we can build a brook wasm(WebAssembly) wssclient to make brook run in browsers, so that many other network tools such as curl and ssh can also run in browsers(using brook as proxy) to do a lot of thing(ftp, email, TELNET).
https://github.com/golang/go/wiki/WebAssembly https://developer.mozilla.org/en-US/docs/WebAssembly https://developer.mozilla.org/en-US/docs/Web/API/Worker https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Indeed, go can be compiled into wasm, but wasm (browser) does not seem to support transport layer APIs, such as bind and listen a address by unknown
Indeed, go can be compiled into wasm, but wasm (browser) does not seem to support transport layer APIs, such as bind and listen a address by unknown
That's why we need a brook wasm wssclient to proxy tcp/udp on browser, we can make a bind/listen polyfill with Worker Channel Messaging API postMessage and Streams_API WritableStream.
This approach is theoretically possible and will open up many application scenarios, but on the other hand requires a lot of additional work.