/ appimage / torsocks
torsocks
 1  #!/bin/sh
 2  # Minimal torsocks wrapper for AppImage use inside bwrap sandbox.
 3  # Uses TORSOCKS_LIBRARY env var to find libtorsocks.so.
 4  
 5  SHLIB="${TORSOCKS_LIBRARY:-/usr/lib64/torsocks/libtorsocks.so}"
 6  
 7  if [ ! -f "$SHLIB" ]; then
 8      echo "ERROR: $SHLIB does not exist!" >&2
 9      exit 1
10  fi
11  
12  case "$LD_PRELOAD" in
13      *"$SHLIB"*) ;;
14      "") export LD_PRELOAD="$SHLIB" ;;
15      *)  export LD_PRELOAD="$SHLIB:$LD_PRELOAD" ;;
16  esac
17  
18  exec "$@"