Oddbean new post about | logout
 Actually there is a "browser relay", Snort has it, Spring browser too. Not sure about Snort, with Spring it's a fake Websocket interface installed to global that will redirect all requests to a custom "local-relay" url to a relay running in a service worker. There's a dumb relay in sw now, which I didn't bother to make efficient yet, but it can be improved. The main limitation is browser js performance and storage size limits, I guess.

But this is only for your own app. If you wanted to share this relay, that's possible too using postMessage for cross-origin communication (with the same fake websocket installed in the app to trick the libs it's using (ndk/nostr-tools) to use the local relay). Haven't tried it though, there a limitation will probably be that the relay tab must be kept open.