Author: Federico Kereki
Suppose someone wants to send you a large file. They could try to send it via email, but many email servers impose limits on file size. They could try sending it over during an instant messenger or Internet Relay Chat session, but that’s slow, as the file actually gets transferred twice: once to the chat server, then to your machine. File transfer services like RapidShare and MegaUpload are fine, but not for confidential information. Of course, you could set up an FTP server on your box, but you don’t want to leave that door open all the time. Luckily, there’s now an easy solution: droopy.
Released in April and available as open source under the Python license, Droopy lets you quickly set up a Web server that gives clients only one thing to do: upload a file to your directory of choice. The upload is done directly, from PC to PC, and when it’s over, you can simply halt droopy, and no more uploads will be allowed. The other person need only open a certain URL and use the Web page to upload as many files as needed. Simplicity itself!
Installation and usage
Installation is easy, as droopy is just a Python script. (Of course, you will need to have Python available, but all distributions either include Python or make it easy to install.) Download the script and place it, for example, in /usr/bin; you will need root rights to do this. Make the droopy file executable (
chmod +x droopy) so you can execute it directly. In addition, open port 8000 in your firewall; otherwise, nobody will be able to connect to your machine.
Using droopy is simple, but note that the explanations at the Web site are not up-to-date. If you run
droopy -h or
droopy --help, you will get the following explanation:
usage: ./droopy [-m message] [-p picture] [-d directory] port example: ./droopy -m "Hi, this is Bob. You can send me a file." -p avatar.png
There are only three parameters. The
--message) parameter allows you to specify the message that should be shown to users who connect to the upload page. You can use HTML commands, but don’t go overboard: It’s just a file upload! The
--picture) parameter lets you add a picture to your page, and
--directory) lets you specify the download directory. According to the Web site, files are always downloaded to the current directory from which you start droopy, but with this parameter you can change that behavior.
If you have a fixed IP address and a domain of your own, you are done: Tell your friend to connect to http://yourOwnDomain:8000 and follow the instructions. If you don’t know your IP address, first open a browser at http://127.0.0.1:8000, and on the page you’ll see, click on “Discover the address of this page.” Note the result; that’s the address your friend will have to open. (Yes, you can also find your address in several other ways, such as by using ifconfig, but this way offers a simple solution for non-tech-savvy users.) Yet another way to specify a download site is by using DynDNS.
Now all your friend has to do is select a file and send it; afterward, a link will appear that allows the person to send more files. If somebody sends the same file over and over again, the files will be renamed in order to avoid them overwriting each other: Sending foo.bar three times would get foo.bar, foo-1.bar and foo-2.bar. After you get all files, use Ctrl-C to halt droopy, and that’s it.
A single-purpose tool that is easy to use and install, droopy offers a simple solution to a common problem and thus deserves being on your machine.
- Internet & WWW