http://ysshlyesehcnscptskrpai4iupxccuvfcpbxk37kclbs3rsaqmolzaid.onion/torify.html
The way torify works is that it injects its own function calls instead of the TCP system calls, so if a program is using normal TCP, then they will instead be going to Tor. It does this my setting the LD_PRELOAD environment variable to point to its own library, and then running COMMAND, which causes the dynamic linker (ld.so) to use the torify librarty for certain system calls (socket system calls, especially TCP sockets).