in reply to Using SSH via SOCKS5 Proxy (Solution Posted)

The dante debian package provides a program called socksify which:
uses LD_PRELOAD environment variable to wrap all networking-related system calls so that programs can go thought a SOCKS server that was installed as part of a firewall.
I'd imagine something like socksify ./script.pl will do the trick.

If your program also needs to access some non-socksified subnet you'll need to split your program into two parts which talk via a pipe (or similar).

Wikipedia has an article which discusses the LD_PRELOAD mechanism.

-David

Replies are listed 'Best First'.
Re^2: Using SSH via SOCKS5 Proxy
by cmv (Chaplain) on Sep 11, 2007 at 19:23 UTC
    David-

    Thanks for the information & pointers. Now I think I understand what was being said to me.

    The problem with this solution is that I need to have a socksify program built for all my platforms (MacOS, SunOS, Windows, linux), and I'm not sure that socksify will build for all of them. This is why I like Net::SSH::Perl so much. The native perl code provides the ssh protocol directly, so my perl code is easily plopped onto a platform, and will mostly, "just run".

    I think the better long-term way is to somehow have the Net::SSH::Perl module make use of the Net::SOCKS module to provide this functionality, when requested. Maybe I'll just "dig-in" and see what happens. After all, how bad can I muck things up... right? :-)

    Many thanks for the reply!

    -Craig