aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug51807
-rwxr-xr-xcontrib/torify.in25
2 files changed, 29 insertions, 3 deletions
diff --git a/changes/bug5180 b/changes/bug5180
new file mode 100644
index 0000000000..86698b42fc
--- /dev/null
+++ b/changes/bug5180
@@ -0,0 +1,7 @@
+ o Removed features:
+
+ - The "torify" script no longer supports the "tsocks" sockifier
+ tool, since it doesn't support DNS and UDP right for Tor.
+ Everyone should be using torsocks instead. Fixes bug 3530 and bug
+ 5180. Based on a patch by "ugh".
+
diff --git a/contrib/torify.in b/contrib/torify.in
index a5e1474e1d..54acfed654 100755
--- a/contrib/torify.in
+++ b/contrib/torify.in
@@ -37,6 +37,25 @@ case $1 in -v|--verbose)
shift
esac
-exec torsocks "$@"
-echo "$0: Failed to exec torsocks $@" >&2
-exit 1
+# taken from Debian's Developer's Reference, 6.4
+pathfind() {
+ OLDIFS="$IFS"
+ IFS=:
+ for p in $PATH; do
+ if [ -x "$p/$*" ]; then
+ IFS="$OLDIFS"
+ return 0
+ fi
+ done
+ IFS="$OLDIFS"
+ return 1
+}
+
+if pathfind torsocks; then
+ exec torsocks "$@"
+ echo "$0: Failed to exec torsocks $@" >&2
+ exit 1
+else
+ echo "$0: torsocks not found in your PATH. Perhaps it isn't installed? (tsocks is no longer supported, for security reasons.)" >&2
+fi
+