From f922794f91c85266bb9fc7cb05d895957a00cc41 Mon Sep 17 00:00:00 2001 From: iVAN <88724353+ivan-hc@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:50:09 +0100 Subject: [PATCH] Update APP-MANAGER - fix https://github.com/AppImageCommunity/AppImageUpdate/issues/244 --- APP-MANAGER | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/APP-MANAGER b/APP-MANAGER index 2e4937a84..6edb761b8 100755 --- a/APP-MANAGER +++ b/APP-MANAGER @@ -1,6 +1,6 @@ #!/usr/bin/env bash -AMVERSION="9.4.2-1" +AMVERSION="9.4.2-2" # Determine main repository and branch AMREPO="https://raw.githubusercontent.com/ivan-hc/AM/main" @@ -942,11 +942,24 @@ _update_determine_apps_version_changes() { fi } +_update_torsocks_handler() { + torsocks_congif_file=$(find /etc -type f -name torsocks.conf 2>/dev/null) + if [ -n "$torsocks_congif_file" ]; then + if grep -q "^#AllowOutboundLocalhost 1" "$torsocks_congif_file"; then + [ ! -f "$AMDATADIR"/torsocks.conf ] && cat "$torsocks_congif_file" > "$AMDATADIR"/torsocks.conf + sed -i 's/^#AllowOutboundLocalhost 1/AllowOutboundLocalhost 1/g' "$AMDATADIR"/torsocks.conf + export TORSOCKS_CONF_FILE="$AMDATADIR"/torsocks.conf + sleep 1 + fi + fi +} + _update_run_updater() { if grep -q "api.github.com" "$argpath"/AM-updater; then GH_API_ALLOWED=$(curl -Ls $HeaderAuthWithGITPAT https://api.github.com/repos/ivan-hc/AM/releases/latest | sed 's/[()",{} ]/\n/g' | grep "^ivan-hc" | head -1) if [ -z "$GH_API_ALLOWED" ]; then if command -v torsocks 1>/dev/null; then + _update_torsocks_handler if [ -z "$debug_update" ]; then torsocks "$argpath"/AM-updater >/dev/null 2>&1 else