Hmm didn’t know about the nhooyr bug, but there exists a wsflate package for gobwas
I tried.
nhooyr is incapable of connecting to many relays because of some gotcha: https://github.com/nbd-wtf/go-nostr/pull/79
gobwas doesn't have support for deflate at all and many relays require that.
Discussion
Indeed, that exists. I tried to plug it in, but I think I failed. There are no docs, the API is weird. https://github.com/nbd-wtf/go-nostr/commit/304b0a0477ee030d757f45fef406d4572e8ccb10
Can you do it? I can put up a bounty.
Ok I’ll give it a shot when I get a bit of free time!
Alright I implemented a draft here (includes switch to gobwas & compression): https://github.com/wozuo/go-nostr/commit/9c01ead91f482366b2d0cee6ba7f69eb6398cbe1 let me know what you think