Swirly Mein Kopf

Thursday, December 19. 2013

My contribution to XKCD’s #949

Digital World

Randall Munroe rightly put shame on all the geeks in the world when he pointed out that transferring files over the internet is still an unsolved problem.

I am a big fan of FileTea’s approach to transferring files, where they are streamed from browser to browser, without registration and without being stored on some central server, and where closing the browser tab reliably cleans up the transfer. But I wanted something that works from the command line, so I created a small tool called share-file that will use SSH port forwarding to serve the files from a local, embedded web server at a publicly available port, as shown in these screenshots:

It works without additional dependencies (but better with python-magic installed) and requires a publicly available SSH server configured with GatewayPorts clientspecified. For more details, see the README, and to try it out, simply fetch it with git clone git://git.nomeata.de/share-file.git.

BTW, if someone implements a command line client for FileTea, I’ll happily dump share-file for it.

Trackbacks


No Trackbacks

Comments

Display comments as (Linear | Threaded)

*Sending files over Jabber/XMPP is simple enough :p
#1 Jan (Homepage) on 2013-12-19 15:43 (Reply)
*Yes, and it would be great if everyone would use Jabber. (And does it really work even in difficult NAT situations? I only used it rarely so far...)
#1.1 Joachim Breitner (Homepage) on 2013-12-19 15:52 (Reply)
*python -m SimpleHTTPServer ?
#2 xu on 2013-12-19 16:26 (Reply)
*I’m basically doing that, only that the webserver is available on a different host. Usually, my laptop is not publicly available, so python -m SimpleHTTPServer alone will not help.
#2.1 Joachim Breitner (Homepage) on 2013-12-19 16:30 (Reply)
*I did not know about filetea. I am the author of Fipes [1] a web application that seems to solve the problem in the exact same way.

I think there is no technical difficulties to solve the 949 problem (however we can argue on the definition of "fixing" here).
We need to make people more aware of the fact that free software solutions exist.

Anyway, congrats for this simple solution, using ssh here is quite clever :)

[1] https://github.com/tOkeshu/fipes/
#3 tOkeshu (Homepage) on 2013-12-19 16:56 (Reply)
*Got a simple one you can try at

https://github.com/brechin/FileTeaSend
#4 Jason on 2013-12-19 20:26 (Reply)
*If I had found that before I wouldn’t have created share-file... thx for it!
#4.1 Joachim Breitner (Homepage) on 2013-12-20 00:02 (Reply)
*It only existed after I read the post on HN this morning. It was a fun challenge, and I'm glad you can put it to some use.
#4.1.1 Jason on 2013-12-20 04:48 (Reply)
*btsync has pretty much solved it.
#5 technimad on 2013-12-19 21:42 (Reply)
*Hi,
I had a similar idea for Emails, but never got around to actually implement it. I thought it would be a good idea to strip of binary attachments, put them on a webserver and replace them with a link to the file. To avoid potential security risks, the link to the file should be a shaXXX sum. Of course, if someone wanted real security, they should encrypt their files.
I think your solution is a step to that direction. It could probably be easily used as a postfix filter.
How do you generate your links (the AYLD.. part?)
#6 jrk on 2014-01-10 12:53 (Reply)
*I think e-mail attachments are a bit different. For example, when do you know when you can stop serving the file?

I use

''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(8))

to generate the random string.
#6.1 Joachim Breitner (Homepage) on 2014-01-10 13:00 (Reply)
*Oh my, I completely forgot about this, sorry.
Several solutions for obsolete files come to my mind.

- Provide the sender with a deletion link
- Provide the receiver with a deletion link
- Provide both, sender & receiver, with a deletion link; do reference counting for multiple deletion links
- Automatically delete the file after X amount of time
- If the email is kept on the same server (e.g. by imap) keep a database of email/file references and delete the file when the email is deleted

Would be fun to implement something like this, if I had the time. :)
#6.1.1 jrk on 2014-05-26 20:11 (Reply)

Add Comment



To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Gravatar, Favatar, Identica author images supported.
What is the first name of the owner of this blog? / Wie heißt der Betreiber dieses Blogs mit Vornamen?
 
 
Nach oben