| Commit message (Collapse) | Author | Age |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Occurred when tor not running, torsocks run in debug/test mode, and
gethostbyaddr() fails.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Need more testing to be sure, but it looks like it works OK.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
These options are defunct:
1. socksdns (force dns lookups to use tcp)
torsocks does this by default, no reason to make it optional.
2. tordns (force dns lookups through tor)
torsocks does this by default, option has been a no-op for a
long time.
3. hostnames (resolve name of socks server if required)
potentially useful, but not really a good idea for tor.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Removing these supplementary utilities as they've been disabled
for some time now. They can be restored by popular demand if
necessary.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Solution found by Nicolas Pouillard (nicolas.pouillard@gmail.com).
However I am still not clear why this is necessary for just this
symbol on Linux.
To test that it works:
cd test/
gcc -fPIC -g -O2 -Wall -I. -o resinit resinit.c -lc -lresolv
cd ..
export TORSOCKS_DEBUG=2
torsocks test/resinit
Expected result:
12:45:33 libtorsocks(21307): Got res_send request
http://code.google.com/p/torsocks/issues/detail?id=3
|
| | |
|
| |
|
|
|
|
|
|
| |
If a DNS request is made to a DNS server on a local network over
TCP we need to reject it. So for now, reject all attempts to connect
to servers on the local network using torsocks. If torsocks is used
with programs that expect to use local network services - this will
probably break them. I'm not aware of any.
|
| |
|
|
|
| |
We already do this in usewithtor. Closes off
http://code.google.com/p/torsocks/issues/detail?id=5
|
| |
|
|
|
|
| |
Patch from Hicham Haouari.
Fixes build for Fedora 64-bit.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The SO_DOMAIN socket() option is Linux only. So revert to
inspecting the sock_addr_t in sendmsg() and sendto() but ensure
it is non-null before doing so.
Move the address inspection to the end of sendmsg() and sendto()
so that we can exit early if the socket is not SOCK_STREAM (i.e.
tcp).
|
| |
|
|
|
|
| |
Exit with an error code if Tor DNS is disabled in the configuration
or if we cannot reserve the deadpool address space for .onion
addresses.
|
| |
|
|
| |
Allow error logging by default.
|
| |
|
|
| |
No brackets for single-statement conditionals
|
| | |
|
| |
|
|
|
| |
This is a leftover from the tsocks days. We always want this option
enabled.
|
| |
|
|
|
| |
Debug output was printing on release builds and getting suppressed
on debug builds - which is the wrong way round!
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Exporting a global variable called 'progname' is not a good
idea if you are a library. Exporting global variables at all
is probably a bad idea.
For now, make the name less generic - it was causing crashes
when torsocks was used with dig.
Part of the fix for:
http://code.google.com/p/torsocks/issues/detail?id=15
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In sendmsg() and sendto() we were inspecting the sock_addr_t
structure to determine if the connection was Internet or not.
Since msg->msg_name is an optional value in sendmsg() and
sendto() this could result in crashes because we weren't ensuring
it was non-null.
Since it's optional we should have been inspecting the SO_DOMAIN
of the connection's socket anyway - it will always be there.
Part of the fix for:
http://code.google.com/p/torsocks/issues/detail?id=15
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by alex@ohmantics.net
Make torsocks fully compatible with Snow Leopard OSX.
Slim down the symbol hooking code considerably.
Alex's notes:
"http://developer.apple.com/mac/library/releasenotes/Darwin/SymbolVariantsRelNotes/index.html explains the one of the problems that people have run into. 64-bit applications
don't have the $UNIX2003 variants. For working 10.6 support, we'll need to
conditionalize the UNIX2003 variants off when compiling for 64-bit."
|
| |
|
|
|
|
|
| |
Some platforms need to explicitly include resolv.h so cater for
that.
Thanks to SwissTorExit for reporting and debugging assistance.
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Original Patch from Alex Rosenberg <alex@ohmantics.com>
1. Hook OSX-specific syscalls
-----------------------------
Mac OXS has a number of variants of each syscall. This patch adds
hooks for the following OSX variants:
select() : select_unix2003()
select_nocancel()
select_darwinextsn_nocancel()
select_darwinextsn()
poll(), connect(), sendmsg(), sendto(), close(): *_unix2003(),
*_nocancel()
getpeername(): *_unix2003()
2. Add Hooking Macros
--------------------
Move the symbol loading and checking out to macros of the form
[syscall]_PATCH:
PATCH_SELECT, PATCH_CONNECT, PATCH_CLOSE, PATCH_POLL,
PATCH_GETPEERNAME, PATCH_SENDTO, PATCH_SENDMSG
Rename the syshooks to functions of the form *_guts().
3. Miscellaneous
----------------
Add NONSTD_SOURCE define for Mac OSX.Defining _NONSTD_SOURCE
causes library and kernel calls to behave as closely
to Mac OS X 10.3's library and kernel calls as possible.
Use socklen_t instead of int.
Move get_environment() and get_config() to tsocks_init(),
rather than calling adhoc in the syscalls.
Differentiate between EISCONN and EINPROGRESS errors in
connect().
Original Patch from Alex Rosenberg <alex@ohmantics.com>
http://code.google.com/p/torsocks/issues/detail?id=2#c11
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Patch from alexr@ohmantics.com
Mac OSX uses the DYLD_INSERT_LIBRARIES and DYLD_FORCE_FLAT_NAMESPACE
environment variables to enable/perform syscall-hooking. Also, on
Mac OSX dynamically linked libraries use the '*.dylib' extension
rather than '*.so'. Alex's patches for torsocks.in and configure.in
ensure that we use the appropriate values for Max OSX. Ideally, we
wouldn't export DYLD_FORCE_FLAT_NAMESPACE on non-Mac OSX platforms
but it is harmless to do so. We'll leave that for another day.
The patch also fixes up the sed reg-exp to interpret the 'echo
DYLD_INSERT_LIBRARIES' output as well as that from LD_PRELOAD.
|
| | | |
|