myfam ‒ A utility helping you maintaining your Tor family members configuration

If you run a bunch of Tor relay nodes, you maybe know the difficulty of maintaining the family members and keeping the relations to each other up to date. A small utility might help doing this.

To the Tor ecosystem it is important to know Tor relay nodes operated by the same organisation or administrators. The decision which circuit will be chosen is closely related to this configuration to avoid routing traffic multiple times over the same logical group.

In a torrc file this is handled by the parameter MyFamily which takes all the family members' fingerprints comma separated. It is, according to the Tor manual, allowed to maintain just one string with all members in it and configure each node with this single string. Although this has the flaw of self referencing. Also it is exhausting to do changes, such as add or remove fingerprints, in this long string, not to mention the failure potential.

To help out and make administration of multiple nodes easier, I wrote a small bash util that allows one to have one file with all the nicknames and fingerprints nicely and clearly formated in it. The script reads this file and prints out the unique fingerprint string for each node, without the nasty self referencing.

Simply maintain a list of all fingerprints and nicknames:

$ cat example/sample.txt 
01ABCDEF604669E636FFD5B503F382A4B7AD6NOT, myTorNode1  
ADBCDEFA49573D52A7B6F4A35750F161AAD89NOT, myTorNode2  
88CDEFAB980BF6E72092EE690E8C51C0AA4A5NOT, myTorNode3  
95DEFABCF23A6C851028C1AA88AD8593F659ENOT, myTorNode4  

And generate the new configuration string after every change from scratch with:

$ ./myfam example/sample.txt 
total nicknames 4 and total fingerprints 4

Nickname myTorNode1  
MyFamily ADBCDEFA49573D52A7B6F4A35750F161AAD89NOT,88CDEFAB980BF6E72092EE690E8C51C0AA4A5NOT,95DEFABCF23A6C851028C1AA88AD8593F659ENOT

Nickname myTorNode2  
MyFamily 01ABCDEF604669E636FFD5B503F382A4B7AD6NOT,88CDEFAB980BF6E72092EE690E8C51C0AA4A5NOT,95DEFABCF23A6C851028C1AA88AD8593F659ENOT

Nickname myTorNode3  
MyFamily 01ABCDEF604669E636FFD5B503F382A4B7AD6NOT,ADBCDEFA49573D52A7B6F4A35750F161AAD89NOT,95DEFABCF23A6C851028C1AA88AD8593F659ENOT

Nickname myTorNode4  
MyFamily 01ABCDEF604669E636FFD5B503F382A4B7AD6NOT,ADBCDEFA49573D52A7B6F4A35750F161AAD89NOT,88CDEFAB980BF6E72092EE690E8C51C0AA4A5NOT  

The script is free, open source and BSD licensed. You will find a copy here: