This tutorial assumes that there are at least two separate installations of retroTunnel on the server, such as:


/Users/whatever/Sites/rt_tom
/Users/whatever/Sites/rt_jerry


The paths are unimportant and they're going to be different on your server anyway, so don't get too hung up on them. The only parts that matter are rt_tom and rt_jerry. These are the retroTunnel installations for each user.

Each retroTunnel user has a "share.txt" file which specifies who they want to share with, and who they allow to share with them. A "share.txt" file is structured like this:


myDisplayName:Tom
downloadFrom:rt_jerry


In this minimal share file, rt_tom has set his name to be displayed as Tom, and he makes a request to download files from rt_jerry's inbox/outbox. Now this is rt_jerry's share file:


myDisplayName:Jerry 
allowDownload:rt_tom


Here, rt_jerry has set his display name to Jerry and gives Tom permission to download files from his inbox/outbox. 

Now Tom doesn't just want to just download from Jerry, he wants to upload to him as well, and Jerry gives him permission(note that uploading comes with no safeties - if you upload a file with the same name as another file in someone's inbox, then that file will be overwritten without warning, but presumedly you have enough respect for whoever you're sharing with not to overwrite anything that you shouldn't, and vice versa):


myDisplayName:Tom
downloadFrom:rt_jerry
uploadTo:rt_jerry


myDisplayName:Jerry
allowDownload:rt_tom
allowUpload:rt_tom


And thus Tom can upload to and download from Jerry, but it's a one-way street. Jerry can't upload to or download from Tom. So let's make it a two-way street:


myDisplayName:Tom
downloadFrom:rt_jerry
uploadTo:rt_jerry
allowDownload:rt_jerry
allowUpload:rt_jerry


myDisplayName:Jerry
downloadFrom:rt_tom
uploadTo:rt_tom
allowDownload:rt_tom
allowUpload:rt_tom


It's mutual now. Tom and Jerry can both download from and upload to each other. But what if there are more than two users? Here's an example of a retroTunnel user who lets 3 other users download from him:


myDisplayName:Shaggy
allowDownload:rt_scooby,rt_velma,rt_veronica


The syntax for share files is fairly strict. myDisplayName must always come first. The other parameters can go in any order, however. Spaces after ":" and "," are not allowed. Neither are blank lines. This is good:


myDisplayName:Larry
allowDownload:rt_moe,rt_curly
allowUpload:rt_moe,rt_curly


This is bad:


myDisplayName: Larry

allowDownload: rt_moe, rt_curly

allowUpload: rt_moe, rt_curly


There's just one more parameter to cover: shareWaybackCache.


myDisplayName:Larry
shareWaybackCache:rt_moe


myDisplayName:Curly
shareWaybackCache:rt_moe


The Wayback Machine is very, very fragile and it'll likely break if Larry, Moe, and Curly all attempt to connect to it simultaneously. The solution(more or less) is for them to share a single Wayback Machine cache.

When they share a cache, they connect to the Wayback Machine sequentially. That is, Moe connects first, then Larry connects when Moe's done using it, then Curly connects, etc. It also means that they share cached pages, reducing the need to connect to the Wayback Machine at all.

I decided not to implement permissions for cache sharing because I didn't really see a reason to, so Larry and Curly don't need permission to use Moe's cache. 

Also, while multiple people can use one shared cache, it's impossible for one person to use multiple shared caches. Larry, for example, can use Moe's cache or he can use Shemp's cache, but he can't use both.

None of this can truly prevent the Wayback Machine from breaking because nothing can, but it does reduce the likelihood of it breaking, which is the best that can be done. 

If the Wayback cache stops working, go to it(it's the wb directory in the retroTunnel installation) and delete the wblock file. PHP should do this automatically but "should" isn't the same as "will". 