Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#2 Default to local connections

Shane Hathaway

I'd like to use tsocks + ssh as a simple way to reach
servers in a private network through a firewall. This
turns out to work well, with one small exception:
tsocks.conf provides no way to make local connections
by default. That is to say, most connections don't
need to go through the socks server.

My solution is to make local connections when no server
is specified. My tsocks.conf looks like this:

path {
reaches =
server =

Note that there is no default server nor any 'local'
directives. Next, I run a socks server using simple ssh:

ssh -D 1080

To connect to boxes inside the corporate firewall, all
I have to do is:

tsocks ssh

However, if I try to use "tsocks ssh" to connect to
anything outside 10.0.0.x, tsocks complains that no
default server is specified. In this case, I want to
make a local connection.

I've attached a patch that seems to solve the problem
well. Please let me know what you think.


  • Shane Hathaway
    Shane Hathaway

    Patch to default to a local connection