Thread

🛡️
#Amethyst Tricks How to run a private relay over Tor on Android. With the latest Amethyst supporting outbox & Tor this is more feasible than ever. Host one of your outbox relays on your phone, totally under your control. 🔹Citrine setup Go to the settings tab. image Fill things in as appropriate. Leave the network related settings default. image Under "Accept events that refer to" add your npub. This will keep extraneous events from clogging your relay, but still allow DM to function. Note: If you add your npub to "Accept events signed by" your DM partner will not be able to send messages to your relay. You would need to add their npub as well. Maybe a security feature? 🔹Orbot setup In orbot got to more > hosted onion services. Add a new service. Citrine uses port 4869, so set that for both ports. Name it anything. "Nostr" will do. You will need to restart orbot after you save. Then you can go back and copy your onion service address. You'll need it for the next step. 🔹Amethyst Setup Add ws://ONIONADDRESS:4869 as Outbox and DM relays in Amethyst. image Also add ws://127.0.0.1:4869 as a local relay. image You should be able to check the relay info in Amethyst by clicking on the icon. It should now reflect what you have set in Citrine! image 😎👌 Software required

Replies (35)

I don't understand 🤔 So you run a nostr relay on your phone, on the same device as your nostr client, but they will connect to each other via Tor? Why would you do that? Or maybe the primary motivation is to allow other people - your followers specifically - to connect via Tor? Does that mean that I should keep my phone connected all the time, in order that my relay remain accessible all the time? I'd like to run such a relay on my Raspberry Pi. Any tips?
I entirely agree on this one. I'm someone who likes explicit control over my firewall and incoming/outgoing connections. I wouldn't want to be connecting to a bunch of random servers (relays), you never know which ones could poison your device. One buffer overflow in the client code (meaning the websocket client library or parsing code itself) and you have a RCE vulnerability. The same goes for incoming connections. I assume there is a localhost optimization.
One could setup a malicious relay could be built to trigger a known RCE vuln and every nostr client with the vuln would be pwned XD For example, in my dream world, noscrypt becomes ubiquitous, there is an overflow somewhere that can be triggered by a malicious relay connection, now all nostr users running noscrypt are pwned simply by connecting to that relay. Same could be said for NDK, or aedile or any framework with a known vuln.
🛡️
You lack imagination. You could run an old Android phone as a cheap & easy self hosted relay. Self hosted DMs over Tor, leaving no trace of your messages on large relays. Android is transitioning to be a desktop OS as well, making the power issues of phone use less of an issue. It's basically the same as nostr-relay-tray with the proxy settings enabled. I've been running that for a few days as well, it makes a fine outbox relay.