securesocketfunneling / ssf

Secure Socket Funneling - Network tool and toolkit - TCP and UDP port forwarding, SOCKS proxy, remote shell, standalone and cross platform
https://securesocketfunneling.github.io/ssf/
Other
1.6k stars 234 forks source link

Automatic Reconection on Connection Closed #46

Closed thecek closed 7 years ago

thecek commented 7 years ago

Dear fellows,

I have a question regarding disconection on the ssfc side.

Eventually I get a disconection, for any reason, however I expected a conection retry every interval and wish to know if ssf has some feature on that (could not find at documentation at first)?

Appreciate any help.

Thanks

securesocketfunneling commented 7 years ago

Hello @thecek ,

Thanks for your issue. There is no reconnection mechanism in the current version. However, it should be possible to achieve this goal by wrapping ssfc into a script that relaunches the client after the end of its execution.

You are lucky, built-in reconnection will be part of the next version ;-)

We will keep this issue as a reminder.

lispler commented 7 years ago

I think I want to bump this one up.

I have ssfs -g running on a rented virtual server. My home server connects there from private/dynamic IP and exposes some services on well-known ports <1024.

Recently, I've been experiencing frequent "hick-ups" where the relay did not work anymore. ssfs refused to restart, telling me the port/address is busy. I had to wait a couple seconds to make it work. Not sure if a bash while loop would be able to fix this reliably, also because multiple ports are involved.

I'm guessing the OS thinks the socket is still in use although the connection is somehow broken. App-level reconnect feature could fix this, not sure.

While we are at it, logging via syslog would be useful to debug such cases..

securesocketfunneling commented 7 years ago

Hello,

SSF 3.0.0 is out and integrates automatic client reconnection. It also includes syslog logging.

Check it out and send us feedback!

lispler commented 6 years ago

Updated last week. Logged a couple reconnects already and working great so far. Thanks!