-
Notifications
You must be signed in to change notification settings - Fork 358
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
Added support for automatically disconnecting from a tunnel when connected to a specified Wi-Fi network. #58
base: master
Are you sure you want to change the base?
Conversation
…one of specified Wi-Fi networks Signed-off-by: asivery <[email protected]>
Signed-off-by: asivery <[email protected]>
Signed-off-by: asivery <[email protected]>
Can you add a use case for this in the PR description? You've explained how and what but not why, which is a necessity for something this big. Was this feature discussed somewhere prior to implementation? I can't seem to find anything on the mailing list. |
Signed-off-by: asivery <[email protected]>
@msfjarvis I've added an explanation. I didn't discuss this feature on any mailing list, because I wasn't aware there was a mailing list. If needed, I can close this PR here, and first discuss it on the mailing list. |
I am waiting for this for a year now. Nice work. If this works then only the automatic connecting to the tunnel if you disconnect from the SSID is missing. |
827495b
to
4ba8794
Compare
…o blocked network Signed-off-by: asivery <[email protected]>
@msfjarvis if you search the web on how to automatically disable WireGuard on local wifi, you will get a ton of hits where people are looking for exactly this feature. |
Will this ever get implemented? I'd like to automatically disconnect from my home VPN, when I'm at home.. And not rely on third party apps to do that. |
@msfjarvis and @zx2c4 Can we get this reviewed and merged? So many people would love this feature, and are looking toward other apps to solve it. I've experienced this with iphones and it's a dream. |
…eboot Signed-off-by: asivery <[email protected]>
I'd really love to see this merged BUT I wonder if the opposite functionality - reconnecting the VPN tunnel once the device leaves the configured networks - is also available? |
Hey, what's the state of this? |
I just want to add support for this. The iOS client has it, the android one should too. It's so useful to just disconnect automatically when home and then reconnect when I leave. |
For folks who are waiting, I've since uninstalled this app and use WG Tunnel as it has this feature. Until this pr gets merged, you can too. https://play.google.com/store/apps/details?id=com.zaneschepke.wireguardautotunnel |
Thanks for the Tipp. I looked at the app and now I am awitching to it permanently too. It is much better and had more features than I need. 👍 |
@msfjarvis I'm curious what's needed to get this integrated into the app? This feature is already present in the iOS and MacOS versions, and there's plenty of easily discovered discussion out there on why users would want this feature. |
Added support for automatically disconnecting from a tunnel when connected to a specified Wi-Fi network.
How does this work for users?
Now when editing a tunnel, there's a field in which the user can enter the names of networks, connecting to which will cause this tunnel to be disconnected.
There's also a checkbox that will enable or disable this functionality for this particular tunnel.
What changes were made to previous components to support this?
These values are stored in the WgQuick config as comments following the scheme
ADD;key;value
:Limitations and possible points for future improvement
Why was this added?
If NAT hairpinning doesn't work correctly in a Wi-Fi network, and there is a tunnel to that same network open, all packets will go through Wireguard, and eventually get dropped. With this feature active, the Wireguard app will terminate the tunnel once the user connects to that network, and, as a result, the user will still have an internet connection.
This is already a feature in the iOS app, but there it has more features (it can f.ex. auto-connect to a tunnel when connected to a certain network).