I am new to whonix. I have tried unsuccessfully many times since Saturday to download tor browser to my workstation.
My host has torbrowser installed on it and connects to torbrowser just fine there. My whonix gateway is running tor just fine. My whonix workstation is connecting to the intenet through my whonix gatreway just fine. I just can’t seem to get torbrowser downloaded my whonix workstation.
I have whonix running on virtual box and unless I am mistaken my version of whonix is 13.
Manually update: Tor Browser: Manual Download
(Debugging information: curl_status_message:  - [Operation timeout. The specified time-out period was reached according to the conditions.])
I tried suggestions found in this thread to take care of it-- "Tor Browser Downloader" cancels the download with an error message Those suggestions did not work. Can someone help me get torbrowser downloaded? I am using the torbrowser download button on my whonix workstation, and I have also tried it through the command line. Neither option has worked to get it downloaded. I get the same error message for both procedures. I have also tried running apt-get update && apt-get dist-upgrade and that has not worked either. I don’t know what else to do.
I looked at another topiic in the forums that looked llike it would be similar to mine and followed a suggestion there. The topic was tor browser dosnt install - #8 by sonny The suggestion was to run the following command in a console to see if the cause could be determined that way:
Type: "whonix" <enter> for help.
user@host:~$ time curl.anondist-orig --fail --proxy socks5h://user:firstname.lastname@example.org:9115 --tlsv1.2 --proto =https --max-time 3600 --output /home/user/.cache/tb/files/tor-browser-linux64-6.0.1_en-US.tar.xz https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux64-6.0.1_en-US.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 66.2M 100 66.2M 0 0 358k 0 0:03:09 0:03:09 --:--:-- 168k
Any thoughts on what might be happening and why I can’t get torbrowser to download?
Actually, you can resume downloads from dist.torproject.org.
If you make a request, for example with: curl -s -D - https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz -o /dev/null, you get response headers like these:
HTTP/1.1 200 OK
[…] Last-Modified: Fri, 03 Jun 2016 10:02:48 GMT ETag: “43becf4-5345cd32b0200” Accept-Ranges: bytes Content-Length: 71036148
You can request the missing part using a range-request like this: curl --header "If-Unmodified-Since: Fri, 03 Jun 2016 10:02:48 GMT" --header 'If-Match: "43becf4-5345cd32b0200"' --header "Range: bytes=71000000-71036147" -s -D - https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz -o /dev/null, which will request only the missing bytes (where 71000000 is the number of bytes you have already downloaded) if the resource has not been modified.
With the above commits (which will land in Whonix 14 or if you update tb-updater from source code), it will be easier to resume download for the biggest downloaded file, i.e. the tbb archive file. The other files are smaller and more likely to change, i.e. shasum file and gpg signature. The smaller files are always deleted while the big file is overwritten by curl in normal mode. What about the “non-normal mode”… It will be possible to experiment with injecting command line options for curl. For example.
CURL_OPTS="-C -" update-torbrowser
Which however does not work. Once that works, a command line parameter --resume can be added. (Making that the default will not be a good idea, as download resumption could continuously fail.)
The download resumption examples posted by @Lobster are good to know, but a bit complicated, a bit too complicated to automate them within tb-updater.
If we assume that the file does not change between the initial download and resumption you can skip the checks with if-match and if-unmodified-since (the file will be verified via gpg anyway), the end offset is also optional, so you could simplify it to just curl --range "71000000-" -o /tmp/remaining (you might want to check if the response status is 206 Partial Content), then you concatenate both files and that’s it.
you are suggesting the download should be split into a two downloads using fixed values?
No, 71000000 was just an example.
When your downloads gets interrupted you have already downloaded a certain number of bytes (eg. 12345), you insert the number of bytes you have downloaded in your range-request like --range "12345-" and the response will contain all bytes beginning from offset 12345.
You could avoid this splitting entirely and append directly with curl --range "71000000-" http://example.com >> /file/to/resume, but I think that way you can’t check the response code before appending.
Oh, I didn’t see that option. -C - does work on my system:
curl -C - -o tor-browser-linux32-6.0.1_en-US.tar.xz https://dist.torproject.org/torbrowser/6.0.1/tor-browser-linux32-6.0.1_en-US.tar.xz ** Resuming transfer from byte position 25100288 % Total % Received % Xferd Average Speed Time Time Time Current
The update-torbrowser progress bar slows up downloading Tor Browser a lot. This is a bug that I just now noticed. Therefore, try downloading Tor Browser without the progress bar. You can do that by using the following command. (@bsess)