Solutions to slow internet in Vietnam: Download Bitshare with great speed

Submitted by tomo on August 5, 2011 - 4:04am

The internet speed in Vietnam is back to dialup level.  There are rumors of another cable cut as well as maintenance that will last more than another week.  This after weeks of "undersea cable maintenance" after which we had awesome download speeds for awhile.  This means a lot of large transfers from sites outside of Vietnam are unbearably slow.  In the meantime, go buy your favorite movies or TV shows on DVD for 10,000 VND, it'll be quicker.

There is a time of day when speeds are much better.  It's in the wee hours of the morning, when most of the population has stopped downloading porn for the day.

If you're slightly resourceful you can take advantage of that window of high speed internet by downloading to a server outside Vietnam during the daytime and then downloading from there to your home PC at nighttime.

Don't have your own server? Virtual private servers are cheap, and having one also lets you have your own personal proxy server to access Facebook in Vietnam when it's down.

So the idea is the download to the overseas server during the day, then offload it at night.  But for many file uploading sites (like Rapidshare, Megaupload, etc.) you can't just hotlink to a file, so regular wget won't work.  

So I looked for ways around this.  Here's how to download Bitshare files to a server from the command line.

First, when hacking around in Bitshare's javascript code, I noticed they use the runde function that so many other file-sharing sites use to do their countdown.  I have no idea what runde means or if it's from a library or if everyone's just copying everyone else's code.  The countdown is also resource (cpu) expensive, as it's updating every fraction of a second.  In Chrome, if the tab isn't currently active, the browser will deprioritize javascript running in that window and so the timer will run really slow.

Fortunately, it's really easy to hack the timer.  In Chrome Developer's console, just enter:


You mean need to do it a few times depending on where in the timer update we are in when we reset the timer (it may be in the process of updating).  But you should eventually get it to 0.

You'll need the Chrome cookies.txt export extension to easily access your cookies from

Save your exported cookies to cookies.txt in your current directory on the server.  Then run the script with the current page URL, copy and paste the link for download that appears after you fill in the captcha, and enter the name of the file to download to (we could probably get this automatically from wget, feel free to send me a patch).

A variant on this should work for most file uploading sites which give you a download link after entering the captcha.  For ones where download begins when submitting the captcha form, it's a bit different.

Read the rest of this article...
The file has been renamed because I forgot Apache wouldn't allow downloading files with .sh extension.
© 2010-2014 Saigonist.