0

I have used torify for a while to ad hoc route the traffic of certain applications through Tor and just today noticed that the man page suggests using torsocks instead. Reading through the torsocks(1) man page I see the ability to do torsocks on and torsocks off to “encapsulate” a larger section of commands instead of having to preface each individual call with torsocks (or torify).

However. The given . torsocks on|off (or using source instead of the shorthand .) is not working in dash or in fish and seems to be relying on behaviour that appears to be specific to bash and zsh (though I didn’t test in other shells than these four).

I’ve used this simple script to test it with the various shells, changing the first line to whichever shell I was trying:

#!/usr/bin/dash
source torsocks on
torsocks show

Is there a way to source torsocks on|off in a shell that doesn’t do whatever it is bash/zsh is doing here?

1 Answer 1

0

Fish and Dash are specifically tailored shells, so quite a lot of functionality is trimmed or removed there. Just use a regular bash - this is that simple. In case of the embedded platform - where you're short in resources - just compile a C/C++ code to do so and save even more resources fulfilling the task, that's it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .