davrodpin/mole

New feature: Persistent Connection

Closed this issue · 6 comments

The app could keep sending a keep-alive packet to the ssh server to avoid connection time outs configured on the server side.

Those synthetic, null packets should be sent every 10 seconds by default, with a flag , -ka-interval, to allow the user to override this value.

In case the ssh server does not respond to the keep-alive packets, the app should keep trying to send them three (3) times before giving up and closing the connection. The number of attempts could be overridden by the user using the flag -ka-attempt.

$ mole -remote :443 -server example -ka-interval "5 seconds" -ka-attempt 10

Related-To: #24

Can I work on this @davrodpin ?

Can I work on this @davrodpin ?

Thanks for considering contributing to the project! The issue is yours.

How do you plan to implement it? I was thinking on opening new ssh channel to act as the keep-alive channel.

To be honest, I have no idea right now, but it looked pretty interesting. I have some experience writing command line utilities in Go, and this is pretty new for me. I will look up the code tomorrow, its kinda late over here. Is that ok with you? I am open to trying any ideas btw.

Hi @mukulrawat1986, you would need to understand how the crypto/ssh library and ssh works to implement this feature.
If you're not familiar with them, I would say this change will not be so straightforward and maybe you should consider another issue, but that is totally up to you 😄

Take your time and let me know if you need any help.

Thanks for letting me know. Any other issue you can suggest which I may try first? I would love to work with this so I can take my time and start from something small.

Thanks for letting me know. Any other issue you can suggest which I may try first? I would love to work with this so I can take my time and start from something small.

Maybe #31.