replace tb-updater / curl-prgrs

Information

ID: 644
PHID: PHID-TASK-gqswmrle4fryb2mgwkfs
Author: Patrick
Status at Migration Time: resolved
Priority at Migration Time: Normal

Description

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.

Comments


HulaHoop

2017-05-03 15:06:54 UTC


Patrick

2023-11-22 04:24:04 UTC