Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.1k stars 564 forks source link

Notification Support #10

Closed Zero3K closed 7 years ago

Zero3K commented 7 years ago

It would be nice if the app had a notification that provided some details of the connection.

rom1v commented 7 years ago

Android already display the "key logo" in the status bar, from where it is possible to disconnect. On some Android ROM, this is even a simple notification instead. Providing an additional notification to know the VPN state would be redundant IMO.

However, we planned to implement a notification in the case where the VPN is enabled but the connection to the relay server is lost (typically when the device has been unplugged), so that the user is warned of the problem and may disconnect the VPN easily.

Zero3K commented 7 years ago

That makes sense to me. Maybe it could even disconnect the VPN automatically when the USB cable is unplugged.

rom1v commented 7 years ago

Maybe it could even disconnect the VPN automatically when the USB cable is unplugged.

It would be more convenient, but it may lead to security issues in some cases IMO.

We don't detect "USB cable is unplugged", but rather "TCP connection is broken between the client and the relay server". If someone uses gnirehtet to force sensitive traffic to be forwarded to a local network so that it is never sent to "the internet" (using 4G connection for instance), then they don't want the VPN to be automatically turned off only because there is a problem on the TCP connection.

More generally, a VPN should not be automatically stopped.

Zero3K commented 7 years ago

Thanks for adding the notification you were writing about. I am closing this issue now since it has been taken care of.

rom1v commented 7 years ago

;-)

It's still in the dev branch (commit a1bb3c6ab653ebc91fcbf453effef82e564b2a18), it will be in the next release.

notification

Zero3K commented 7 years ago

That's the branch I am compiling from.