flxn / tor-relay-configurator

The tor-relay.co configurator
https://tor-relay.co/
MIT License
52 stars 15 forks source link

Add possibility for Familymembers #3

Open sistein opened 5 years ago

sistein commented 5 years ago

Spinning up multiple instances makes it necessary to add the Family to each node. Would be great to have it automatically configured.

acl1704 commented 5 years ago

Adding a field for manually pasting in a comma-separated string of fingerprints seems possible, but automatically adding MyFamily fingerprints when spinning up say, 5 nodes at the same time, likely isn't possible. I don't believe fingerprints are generated until tor bootstraps for the first time and private keys are created.

sistein commented 5 years ago

As far as I have understood the family stuff one identical member is enough. So after spinning up one Tornode copying its Family-ID to all the others should be enough.

acl1704 commented 5 years ago

Each relay doesn't need to list itself as a family fingerprint, but each relay must list all others it's related to, and those fingerprints wouldn't be available until after the script is run and tor is started. Seems like something that regardless would need operator input of all fingerprints anyways. Sounds easy enough to make an optional input on the installation page. Script would append those into the torrc and restart the service.

I can attest to this being a useful feature, having spun up 10 nodes recently. Though I'm not sure how much time this would save. Still have to either wait for the relays to show up in the consensus or copy the fingerprints locally. Then just copy paste the same line and reset tor.

flxn commented 5 years ago

I have an idea on how to automate the family option. Recently I added some graphs to display the bandwidth and number of nodes over time. For this I needed a database with all nodes that are created with tor-relay.co.

We could now look up the stored nodes that have the same contact information as the one provided in the ContactInfo field and automatically populate the family list. Of course this can only work for nodes where "Enable statistics" is checked so that I can identify them. And the user has to use the same value in the contact field every time. Additionally I could add an API for querying the nodes by contact info and the install script could set up a cronjob that auto-updates the family list.

irl commented 5 years ago

You can pre-generate the relay keys before deploying them to allow you to have the family pre-populated. You might want to look at what ansible-relayor does here.

sistein commented 4 years ago

Any news on this? Would be great to have this :-) .

If it helps we could also add something like a userid to track it

flxn commented 4 years ago

Sry, haven't done anything about it since my last post.

Can you think about problems that could arise from matching via the user provided contact info? Of course the user would have to give the exact same value every time they set up a new node which is certainly not the best way. Giving each user a unique ID would make it more robust but then you have to remember it and enter it the next time.

I would like to avoid any form of user accounts on the site, although that would probably be the easiest-to-use solution for beginners.