Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect logic for VPN & proxy clients #1802

Open
0pcom opened this issue Apr 6, 2024 · 2 comments
Open

Reconnect logic for VPN & proxy clients #1802

0pcom opened this issue Apr 6, 2024 · 2 comments
Labels
apps edge case enhancement New feature or request

Comments

@0pcom
Copy link
Collaborator

0pcom commented Apr 6, 2024

Sometimes the proxy or vpn client will get disconnected for a moment, at which point the client will simply stop.

However, if one attempts to establish the connection again, often it is possible to quickly re-establish the transport and the connection to the proxy or vpn server by simply attempting to start the app again.

We should consider retry logic for such instances ; configurable via flag and / or a field in the visor config for that app.
...
Additionally, sometimes when starting the proxy or VPN clients, they are simply not going to start. In this instance, there is no way to cancel the retry loop that the visor gets stuck in.

@0pcom 0pcom added enhancement New feature or request edge case apps labels Apr 6, 2024
@0pcom
Copy link
Collaborator Author

0pcom commented Jun 29, 2024

to address this issue I suggest the following

  • flag to create a transport of the specified type to the specified key via vpn / proxy start before starting the proxy or vpn
  • a flag to specify the number of retries on connection errors - I.E. after the connection is successfully established - or retry n times and if n == -1 it's unlimited retries... n==0 would be the same as the default behavior, no retries.

the retry loop is encountered when attempting to establish a connection that isn't going to work. That needs a global setting, I think, possibly a config setting. Because it might be difficult to insert the logic otherwise.

@mrpalide
Copy link
Contributor

mrpalide commented Jun 30, 2024

List of tasks for handle this issue:

  • add field to transport creating data, like "app", that could be empty, but if was not empty, then each time check the app was not shutdown or something else. If it was shutdown, then cancel transport creating
  • add label for transport, if is related to app, and point to which app, like app:vpn-cleint for example
  • flag for retries on suddenly close connection, except close signal Ctrl+C
    • 0 : no retry
    • -1 : unlimited try
    • any positive number, like 3 as default value : number of retries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apps edge case enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants