Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

[Feature] Auto reconnect on connection drop #159

Open
Atrate opened this issue Aug 4, 2019 · 14 comments
Open

[Feature] Auto reconnect on connection drop #159

Atrate opened this issue Aug 4, 2019 · 14 comments
Labels
enhancement New feature or request hacktoberfest Literally Hacktoberfest!

Comments

@Atrate
Copy link

Atrate commented Aug 4, 2019

Hello,

It could be a nice feature for Viscerion to be able to reconnect to the VPN after a connection drop.

This could be done by periodically pinging a server and also watching for the CONNECTIVITY_CHANGED broadcast intent

@msfjarvis
Copy link
Owner

The kernel backend does recover across connection drops and IP changes, much like mosh which the WireGuard author quotes on the project homepage as well.

@msfjarvis msfjarvis added the low-priority Not of immediate concern label Aug 5, 2019
@Atrate
Copy link
Author

Atrate commented Aug 5, 2019

From what I've seen it does so after a very long time, at least in my case

@msfjarvis
Copy link
Owner

From what I've seen it does so after a very long time, at least in my case

Hmm okay, will check in a bit.

@msfjarvis msfjarvis added enhancement New feature or request and removed low-priority Not of immediate concern labels Aug 5, 2019
@msfjarvis
Copy link
Owner

Is there any service online I can use for a keepalive ping target that works for everybody? I know there's a lot of restrictions in China and a significant portion of my userbase is currently in China so I would prefer to make something that's functional for them as well.

@Atrate
Copy link
Author

Atrate commented Aug 13, 2019

1.1.1.1? I don't know, but it shouldn't be blocked in China, wouldn't hurt for someone to test it.

The keepalive ping target could also be set to just be the VPN endpoint's IP. If it's unreachable due to some other factor, a user would usually also trigger a reconnect.

@msfjarvis
Copy link
Owner

Oh yes, endpoint IP would actually be perfect. Thanks for your input!

@msfjarvis msfjarvis added the hacktoberfest Literally Hacktoberfest! label Sep 26, 2019
@github-actions
Copy link

This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale label Nov 25, 2019
@Atrate
Copy link
Author

Atrate commented Nov 25, 2019

@github-actions[bot] Bump

@msfjarvis msfjarvis removed the stale label Nov 25, 2019
@msfjarvis
Copy link
Owner

This stale thing is just guilt trip via cron

@Sn0whax
Copy link

Sn0whax commented Dec 10, 2019

I'm not sure how related this is but its specific to my android device as the wireguard iOS devices I own do not exhibit an issue (on official app).

Device info:
S10 (SM-G9730), non root mode. Even in root mode, there's no kernel patch available.

That said, unless i use a keepalive of 4sec or less the device eventually stops receiving notifications.
I've tried the official wireguard app with similar issues. Since this is being ran in userspace it makes sense (kinda?) that the phone is killing the connection.

As long as the screen is on notifications appear to arrive timely while on wg. This implies there should be no firewall/whitelisting or things like that i need to tweak. I've tried removing any battery optimizations related to viscerion.

Thoughts?

@msfjarvis
Copy link
Owner

I'm not sure how related this is but its specific to my android device as the wireguard iOS devices I own do not exhibit an issue (on official app).

Device info:
S10 (SM-G9730), non root mode. Even in root mode, there's no kernel patch available.

That said, unless i use a keepalive of 4sec or less the device eventually stops receiving notifications.
I've tried the official wireguard app with similar issues. Since this is being ran in userspace it makes sense (kinda?) that the phone is killing the connection.

As long as the screen is on notifications appear to arrive timely while on wg. This implies there should be no firewall/whitelisting or things like that i need to tweak. I've tried removing any battery optimizations related to viscerion.

Thoughts?

I have this issue on my Samsung device as well (SM-M307FZBDINS), appears to be a thing in Samsung's userspace since the Pixel 2 has not been able to reproduce it. Maybe some of the fixes from https://dontkillmyapp.com/samsung will be able to alleviate the situation for you.

@Sn0whax
Copy link

Sn0whax commented Dec 10, 2019

I have this issue on my Samsung device as well (SM-M307FZBDINS), appears to be a thing in Samsung's userspace since the Pixel 2 has not been able to reproduce it. Maybe some of the fixes from https://dontkillmyapp.com/samsung will be able to alleviate the situation for you.

I've tried that as well, as well as playing with some doze settings with no luck.
I will keep trying, let's keep each other posted here of any fixes we may have.

@Atrate
Copy link
Author

Atrate commented Dec 10, 2019

@Fzndox If you have root, there is a last resort thing — make WireGuard/Viscerion a priviledged system app (move the apk to /system/priv-app)

@Sn0whax
Copy link

Sn0whax commented Dec 10, 2019

@Fzndox If you have root, there is a last resort thing — make WireGuard/Viscerion a priviledged system app (move the apk to /system/priv-app)

I tried it, still no luck. I'm at a loss.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request hacktoberfest Literally Hacktoberfest!
Projects
None yet
Development

No branches or pull requests

3 participants