Page MenuHomePhabricator

replace tb-updater / curl-prgrs
Open, NormalPublic

Description

[curl-prgrs](https://github.com/Whonix/curl-scripts/blob/master/usr/lib/curl-scripts/curl-prgrs) causes high CPU and even may slow down downloads because of this.

Possible approaches to fix this:


a) Emulate curl options in python:

--fail --tlsv1.2 --proto =https --max-time 180

b) Emulate endless data attack protection.

if [ "$bytes" -gt "$CURL_PRGRS_MAX_FILE_SIZE_BYTES" ]; then
   exit 81
fi

c) Emulate environment variable CURL_PRGRS_EXEC processing.

(This is required to update the tb-updater msgcollector zenity progress bar.)

if [ "$CURL_PRGRS_EXEC" = "" ]; then
  true
else
  if [ "$percent_last" = "$percent" ]; then
    true
  else
    percent_last="$percent"
    eval $CURL_PRGRS_EXEC $percent
  fi
fi

[1] Keeping tb-updater has the advantage that it could relatively easily(*) transformed into a tpo-downloader, that can also fetch other software from torproject.org such as Tor Messenger.
(*) Time is an issue.

Details

Impact
Normal