transconnect is a nifty utility allowing transparent TCP net access over a proxy, including authentication. In its current version 1.3-Beta on sourceforge, compiling on Mac OS X fails, however. Here’s how to build and use it on OS X 10.4:
- Edit libcpath.h to define the correct libc:
#ifndef TCONN_LIBC_PATH#define TCONN_LIBC_PATH "/usr/lib/libc.dylib"#endif
- Introduce a new target “mac” (or whatever) in the Makefile, anywhere among the other targets:
mac: tconn.cglibtool gcc -o tconn.o -c tconn.clibtool -dynamic tconn.o -o tconn.dylib -ldl -lSystemStubs
- That sould suffice for building it:
$ make mac$ make install
- Now set the environment variable. LD_PRELOAD, as given in the docs, is not correct for Mac OS. Replace it by DYLD_INSERT_LIBRARIES and also set DYLD_FORCE_FLAT_NAMESPACE:
$ export -p DYLD_INSERT_LIBRARIES="$HOME/.tconn/tconn.dylib"$ export -p DYLD_FORCE_FLAT_NAMESPACE="1"
- Configure tconn.conf as usual.
I got virtually all necessary info from Thomas Strömberg’s Preloading shared libraries in Mac OS X.