Laan Tungir on Nostr: Javascript code, that would run in a browser acting as a relay. It's tricky, but I ...
Javascript code, that would run in a browser acting as a relay. It's tricky, but I think it could be done.
I think that initiating the web socket connections from the clients to the browser-relay would be the hard part, because browsers won't accept incoming network requests from random ip addresses, but maybe there is a round-about way to do it. Something like NWC.
Published at
2024-08-09 08:42:41Event JSON
{
"id": "fd55f1e48b659d4f567f45c67290bb97f6a334954b2d5a9a5cdd7f0105a47d5e",
"pubkey": "1ec454734dcbf6fe54901ce25c0c7c6bca5edd89443416761fadc321d38df139",
"created_at": 1723192961,
"kind": 1,
"tags": [
[
"e",
"27667a3426762fcae4d9b92908e1e551b781d02ddc2b9b633f5b9d1118739b88",
"wss://relay.primal.net",
"root"
],
[
"e",
"853a259fb63903082ce8a51e68750e76a22592b9bf0533615ff8c3bf4b4b892f",
"wss://relay.primal.net",
"reply"
],
[
"p",
"1ec454734dcbf6fe54901ce25c0c7c6bca5edd89443416761fadc321d38df139"
],
[
"p",
"5ffb8e1b6b629c0e34a013f9298ebb0759b98a3d24029916321d5eb4255b6735"
]
],
"content": "Javascript code, that would run in a browser acting as a relay. It's tricky, but I think it could be done. \n\nI think that initiating the web socket connections from the clients to the browser-relay would be the hard part, because browsers won't accept incoming network requests from random ip addresses, but maybe there is a round-about way to do it. Something like NWC.",
"sig": "fa85917b8dae8248e7235b25295bc60524b27be346324679ff1d4ebc351a8f36e4abdbbc3dd3fbf8dc101b09f831caa98c625a6bacd052862bc15559df6994d5"
}