70-wget 530 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. set -e
  3. # We don't want the real binary to be in $PATH:
  4. # Also note that wget uses the executable name in some help/error messages,
  5. # so wget-real/etc. should be avoided.
  6. mkdir -p /usr/lib/wget
  7. dpkg-divert --add --rename --divert /usr/lib/wget/wget /usr/bin/wget
  8. # We don't want users or other applications using wget directly:
  9. cat > /usr/bin/wget << 'EOF'
  10. #!/bin/sh
  11. unset http_proxy
  12. unset HTTP_PROXY
  13. unset https_proxy
  14. unset HTTPS_PROXY
  15. exec torsocks /usr/lib/wget/wget --passive-ftp "$@"
  16. EOF
  17. chmod 755 /usr/bin/wget