GithubHelp home page GithubHelp logo

Comments (5)

jessebarton avatar jessebarton commented on September 26, 2024 1

@davrodpin I will go ahead and take a look at this and see how far along i can get. Thanks for the detailed explanation of what you would like to see happen with this change. Appreciate it very much! I'll keep you posted if i have questions and on progress that i make.

from mole.

davrodpin avatar davrodpin commented on September 26, 2024 1

Hi @ei8fdb,

This behaviour (auto reconnect if connection to SSH server drops) is something that should be default?

Yes, both Server Reconnect and Keep Alive should be enabled by default.
We want optional arguments for the amount of time mole will wait before trying to connect again and how many attempts mole should make once the server disconnects before giving up.

from mole.

jessebarton avatar jessebarton commented on September 26, 2024

I'm pretty new to open source but i'm willing to give this one a shot. Since its Hacktober! Any pointers on getting started with adding a feature like this I've worked with Go's crypto/ssh library a bit.

Looks like adding a Optional Flag to indicate consecutive attempts is a criteria for this before it times out completely. Is there any other criteria you can think of? Thanks!

from mole.

davrodpin avatar davrodpin commented on September 26, 2024

I'm pretty new to open source but i'm willing to give this one a shot. Since its Hacktober! Any pointers on getting started with adding a feature like this I've worked with Go's crypto/ssh library a bit.

Looks like adding a Optional Flag to indicate consecutive attempts is a criteria for this before it times out completely. Is there any other criteria you can think of? Thanks!

Thank you very much for considering contributing to the project, @jessebarton. And don't worry about being new to open source, this is my first project 😝

The more I think about this feature, the more I see a need for two different requirements:

  1. Server Reconnect: the app should try to reconnect to the ssh server whenever the connection gets dropped.
  2. Keep Alive: the app should keep sending synthetic packets to the ssh server to not allow the connection to time out.

Let's focus this issue on 1 and I will cover 2 on another one #26.

Every time the connection to the ssh gets dropped by any reason, the app should try to reconnect after some period of time.

By default, the reconnect interval should be 10 seconds and user could use the -reconnect-after flag to override this value.

Take a look on Tunnel#Start().
There is a select at the end of the method that is waiting for an error. Any problem while connecting to either the ssh server or the remote service is handled there. That might be the place to handle the retry logic, instead of letting the app to end.

from mole.

ei8fdb avatar ei8fdb commented on September 26, 2024

(Probably a silly question, so....)

This behaviour (auto reconnect if connection to SSH server drops) is something that should be default?

Thinking about all my SSH tunnels if any drop, I want them to reconnect. (A good usability heuristic - have sane defaults that make sense to users - users would want their SSH tunnel to reconnect if it drops. I assume.)

Hence - there probably isn't a need for this to be configurable in a UI? The most I'd expect is a configurable:

  • auto reconnect if connection drops

type-option?

from mole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.