Adding hidden services through control socket
Okay, first off, I should say: 1) I'm relatively new to Tor and 2) I don't know C that well.
A while back, I thought that it was a bad idea to have the hidden service hostname/privkey being written to the filesystem, unless it's either a tmpfs or an encrypted volume. For programs like Torchat (or alike), it would seem better to be able to hide the private key/hostname in an encrypted file (for example) versus in a filesystem.
In the patch, I have added an ADDSERVICE command (after it's authenticated), and its arguments are: [hostname] [private key] [vport0] [rport0] [vport1] [rport1] ... [vport*] [rport*]
I wasn't sure about which status codes to use, so I just used whatever. The code is rather inefficient, frankly because I'm awful at C and I'm probably causing a memory leak by not freeing some memory.
Trac:
Username: kevinevans