What's the deal with Tor and Nostr relays? Do relays need to do anything special in order to be accessed from a web client that is loaded in Tor browser?
Discussion
Nostrudel breaks the least over TOR
You need to create a Tor hidden service that points traffic to your relay ip and port. For example:
SOCKSPort 0
Log notice stdout
HiddenServiceDir /var/lib/tor/nostr/
HiddenServiceVersion 3
HiddenServicePort 80 [ip address of your relay service]:7777 [typical for nostr relay]
Are you saying this would be running on the machine that runs the relay? So that Tor traffic can find the relay?
Does the client UI then need to open websockets to the Tor URL, rather than the clearweb URL?
> Are you saying this would be running on the machine that runs the relay?
It can, doesn't have to. If it's on the same machine, use the local ip (127.0.0.1):7777.
> So that Tor traffic can find the relay?
Tor traffic finds the Tor hidden service. The hidden service forwards the traffic to your relay
> Does the client UI then need to open websockets to the Tor URL, rather than the clearweb URL?
Not 100% sure on this. I think the Tor browser takes care of this for you. I'm able to get it working with Nostrudel on the Tor browser.
my (maybe limited) understanding of hidden services is that it's sort of the opposite: from the outside, they are found by public key, and once the request hits the tor layer on the server, its routed to the local (normal) webserver to satisfy the request. and the response goes back the other way.
Still trying to figure out how this works wrt relay clearweb URLs and how that connects to hidden services...
t Ynostr:npub1pc57ls4rad5kvsp733suhzl2d4u9y7h4upt952a2pucnalc59teq33dmza 4 sharing/*****