Closed cconstab closed 4 months ago
To emulate this in production I have used a simple shell loop.. Which is VERY ugly
@gkc I took a run through the code and I think I like the idea of exposing the scoket_connector defaultTimeout
which currently is a static const.
Then enabling srv to set the timeout of the listening socket and add that option to npt and perhaps sshnp.
Thoughts welcome.
@cconstab
Have started work on this
Experimented with several different ways on this. Have concluded that for now the best aka simplest approach is to add a keepalive loop in the npt client. Keeping at 3SP for implementation in PR88
Implemented in PR #1110 and tagged @cconstab as reviewer ... hopefully not much more to do here, the impl works fine for all of my test scenarios and shows no backwards compatibility issues in the e2e tests. Reducing to 0 SP for this sprint
Is your feature request related to a problem? Please describe.
sometimes TCP connections fail and that means sshnp/npt have to be re run. It would be great to have a flag to automatically retry if a connection fails. This would work well with client applications that auto retry as well for example RDP and OpenVPN, less so ssh
Describe the solution you'd like
--retry
if connection drops re establish it This would likely require a -l to also be in place so client applications "know" how to reconnectDescribe alternatives you've considered
Having a --listen option A port would listen for a connection and establish it on demand. This would prevent constant retry and no connection locally being established and the npt/sshnp constantly connecting and disconnecting as no client app connected to the listening socket. So perhaps a max number of consecutive timeouts being a configurable limit ?
I like this solution too, but perhaps a combination is worth thinking about.
Additional context
No response