[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-talk] torsocks, usewithtor, torify questions - end the confusion!
On Sun, Jul 22, 2012 at 11:34 PM, adrelanos <adrelanos@xxxxxxxxxx> wrote:
> Just use usewithtor.
Why? I was under impression that "torify" is still the generic wrapper.
Anyway, let's summarize briefly, since proliferation of related
scripts is indeed confusing:
packages:
+ tsocks: LD_PRELOAD=libtsocks.so hack for tunneling TCP via SOCKS
+ torsocks (supercedes tsocks): LD_PRELOAD=libtorsocks.so hack, as above
configuration:
+ libtsocks.so: reads TSOCKS_CONF_FILE
[default=/etc/socks/tsocks.conf] (and _USERNAME/_PASSWORD, etc.)
environment variables
+ libtorsocks.so: reads TORSOCKS_CONF_FILE
[default=/etc/torsocks.conf], as above
wrappers:
+ tsocks (tsocks package): runs command with LD_PRELOAD=libtsocks.so
+ torsocks (torsocks package): runs command with LD_PRELOAD=libtorsocks.so
+ torify (tor package): runs torsocks if available, otherwise runs
tsocks with TSOCKS_CONF_FILE=/etc/tor/tor-tsocks.conf
+ usewithtor (torsocks package): runs torsocks with (redundant)
TORSOCKS_CONF_FILE=/etc/torsocks.conf
So, for instance, the following commands are equivalent (ignoring that
tsocks is outdated, and assuming similar /etc/tor/tor-tsocks.conf and
/etc/torsocks.conf):
+ TSOCKS_CONF_FILE=/etc/tor/tor-tsocks.conf
LD_PRELOAD=/lib/libtsocks.so curl -x "" cmyip.com
+ TSOCKS_CONF_FILE=/etc/tor/tor-tsocks.conf tsocks curl -x "" cmyip.com
+ ln -sf /etc/tor/tor-tsocks.conf /etc/socks/tsocks.conf &&
LD_PRELOAD=/lib/libtsocks.so curl -x "" cmyip.com
+ ln -sf /etc/tor/tor-tsocks.conf /etc/socks/tsocks.conf && tsocks
curl -x "" cmyip.com
+ LD_PRELOAD=/usr/lib/torsocks/libtorsocks.so curl -x "" cmyip.com
+ torsocks curl -x "" cmyip.com
+ usewithtor curl -x "" cmyip.com
To me it seems like "usewithtor" should be removed from torsocks
package (its warning for missing /etc/torsocks.conf is duplicated by
libtorsocks.so anyway), "torsocks" is fine as a torsocks package-owned
abstraction for LD_PRELOAD, and "torify" is the tor package-owned
wrapper that should be used by applications.
--
Maxim Kammerer
Liberté Linux: http://dee.su/liberte
_______________________________________________
tor-talk mailing list
tor-talk@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk