DISCLAIMER I am not associated with tunnlr, other than being a user.
Tunnlr offers a cheap ssh tunnelling service($5/month), free for the first 90 days. It can be used as a proxy for secure browsing while on open wireless connections, and also to quickly share files and webpages from your machine.
First you will need to sign up. Once you have your account you will need 3 pieces of information to make this script work.
#1 is your tunnlr username, which will be something like tunnlr####. You can find this under the Need Help? link at the bottom of the page.
#2 is your tunnlr web address, which you can find on your tunnlr home page after you login. It is something like http://web1.tunnlr.com:#####.
#3 your port # from the end of the web address needs to go in the ssh line of the script.
You will probably want to set up ssh keys as well, tunnlr has info on their site.
Change the values in the following script, I put it in ~/bin/share2web. Now if you have files to share, want to show a client a page you are working on, etc, all you have to do is navigate to the directory and run share2web. They can access the files until you exit the script.
#!/bin/bash echo "Starting HTTP server" python -m SimpleHTTPServer 54321 > /dev/null 2>&1 & server_pid=$! echo $server_pid echo "Starting tunnel" ssh -nNt -g -R :#####:127.0.0.1:54321 email@example.com > /dev/null 2>&1 & tunnel_pid=$! echo $tunnel_pid echo "Files are now available at http://web1.tunnlr.com:#####" echo "Press any key to kill server and tunnel" read -n 1 -s echo "Killing $server_pid" kill $server_pid echo "Killing $tunnel_pid" kill $tunnel_pid
If you don't want to use tunnlr, and have your own server this is pretty easy to set up. I have even done it with a desktop and dynamic DNS. I'll leave these options for people to experiment with
Last edited by hardran3 (2011-05-02 20:47:21)
hardran3 you should check out pagekite - something similar to your post - but sharing amongst friends would be cheaper this way (once out of beta)
this and dropship or some fork of it by now
if you happen to test pagekite lemme know how it goes - haven't got my hands on it it but it is very promising - a de-centralized version would be the shit
Pagekite looks interesting, I may have to investigate. Dropship is doomed for failure I fear. Dropbox will fight it by changing their system, and with lawyers.
This little script is nice because all you need is ssh access to an internet facing server to use it. All the tools (ssh and python) are already there on most linux systems. I have used this previously with my home PC and dynamic DNS.