Open dskvr opened 1 year ago
I'm really not sure what that would involve. Is there something you could point me to with respect to adding Tor support for network servers? I guess I always thought it would just be run behind some Tor-aware proxy or something.
it seems like the typescript implementation has tor support... maybe this will help?
Should be as simple as adding socks5 support for your http client
@scsibug Early on, I looked into this. No tor proxy daemons I could find supported websockets. I tested the most 'Tor-Proxy' and confirmed that this was true. @dr-bonez Maybe, I gave it a go and was unable to connect successfully. Unfortunately I timeboxed myself and ran out of time.
That's too bad. I guess I'll close this. If someone gets it working, I'm open to merging.
Thanks for the effort!
https://github.com/scsibug/nostr-rs-relay/pull/30 - @dr-bonez seems to have it working, check the PR
30
Do you think this patch is enough for working Tor support?
I do, but haven't personally tested it
If there is interest in Tor, and someone can test, I'm happy to merge. But I'd rather see that happen first, since I don't want someone else going down a rabbit hole thinking this should work.
@dskvr I'm curious what you're talking about. What sort of client are you using? Tor is a tcp based protocol, so nothing special needs to happen to support websockets. Were you using an http proxy for Tor instead of the recommended socks5 proxy?
@dr-bonez I did not test a socks5 proxy. Wish I could tell you more, it was about a month ago, was a short research spike and a lot has happened since then :D
Nothing needs to happen server side to support websockets over Tor. The referenced pr only matters for NIP-05 verification against onion services.
Your client needs to support tor in order for it to work. You can use a system wide socks proxy, or something like torsocks if your client doesn't support socks5 natively.
I can test this whenever someone comes up with a viable test scenario... Seems this would only be needed for "nip-05 verification against onion services"... how does one accomplish this?
@dr-bonez ^
This might help? https://nostrplebs.com
That's not hosted on a .onion so I'm not sure how much it would help
Are there plans to include tor support as there is in
nostr-ts-relay
?Great work btw, lean and mean.