Cryto Coding Collective

Projects / Tahoe-LAFS

Introduction

CrytoCC has several custom scripts and tools that are used for the CrytoCC Tahoe-LAFS storage grid. Anyone can freely download and (re)use these tools for whatever purpose they want to use it for. CrytoCC is at this point not directly involved in the development of Tahoe-LAFS itself.

tahoe.sh

tahoe.sh is a bash script for uploading files directly to the CrytoCC storage grid from a terminal, using the local web API. This script requires url.py for turning readcaps into public gateway URLs. To upload files to a Tahoe-LAFS storage grid and return the read URI directly, rather than a gateway URL, edit the script to output the contents of the CAP variable, rather than running url.py.

Requirements: cURL, bash, url.py, Tahoe-LAFS

Instructions: Download both tahoe.sh and url.py. Go to the local Tahoe-LAFS web API at http://localhost:3456/ and create a new directory. Go to the 'More info on this directory' page and copy the 'Directory writecap' into the URI variable in tahoe.sh. All files you upload will now be placed into this directory. Run './tahoe.sh' to view usage instructions.

Changelog:
v1.1 - No longer uses a temp file, 'filename' parameter is now optional (if not given, it will be derived from the original filename), no longer runs url.py when the upload fails.

Download v1.1: tahoe.sh v1.1

Download v1.0: tahoe.sh v1.0

url.py

url.py is a Python script to convert a file read URI into a gateway URL that can be given to anyone in order to download through any kind of browser or HTTP download application. The downloading user does not have to have Tahoe-LAFS installed to use these gateway links, and gateway links can be directly embedded into for example web pages. This script is automatically called by tahoe.sh after uploading.

Requirements: Python

Instructions: Download url.py. Run 'python url.py' for usage instructions.

Download: url.py

gateway.py

gateway.py is a Python script to provide a download-only gateway for Tahoe-LAFS nodes. This way a server can offer public downloads of files stored on the grid, without exposing the main web API to the public. The gateway URLs that are generated by url.py are compatible with this script (to run a gateway on your own domain, you would however have to edit url.py to use your domain rather than tahoe-gateway.cryto.net).

Requirements: Python, Twisted, Tahoe-LAFS

Instructions: Download gateway.py. Optionally edit the index and 404 page texts in the gateway.py file. Configure the Tahoe-LAFS API to only listen on localhost, thereby disabling outside access. Run 'python gateway.py' - the script will fork to the background, and your gateway is now accessible from port 3719. Do not run this script as root.

Download v1.1: gateway1.1.py (changelog)

Download v1.0: gateway.py