Not system-wide though, and possibly incompletely and with bugs. The entire socket API is far from being simple to wrap like this, especially when you consider that it includes all the various IO functions (read/write, send/recv, recvmsg/sendmsg), nonblocking operation with select, poll, epoll, the p* versions of these with special behavior with respect to signals, the integration of these polling functions with non-wrapped fds, various socket options, splice functions, thread safety, shutdown semantics...
It shouldn't be hard to find a program which runs fine with tun2socks but breaks completely or subtly with tsocks.
It shouldn't be hard to find a program which runs fine with tun2socks but breaks completely or subtly with tsocks.