Add option to stop the service upon disconnect
A new option -s is added so that we have the option to stop the client when the cable is unplugged, the default secure behavior is kept.
Tested on macOS with my Pixel on Android 10.
Fixes #51, fixes #234, fixes #388.
Thank you :+1: That will be useful :)
However, I will not be able to review this before next month.
That’s fine. In the meantime I’ll make the Java server part of this change ready (I did not do that since I only use the Rust version)
This does not close the app, when it is running on a work profile that was created with Island (I don't know if this behaves the same with work profiles that were created with different methods).
See #408 for instructions to get gnirehtet to function on a work profile.
Edit: Perhaps this happens because I started the GnirehtetActivity manually, but I'm not sure. I just wanted to point this out, in case something ever gets implemented that also starts the app on work profiles, while this is merged into the codebase!
That should be done with the same way Gnirehtet is started in a work profile, otherwise the option to stop the service is sent to the main profile. (If you start the activity manually, there is no way for us to specify this, since the Android application does not really have a UI). Work profile support would be needed in many parts of the relay for this to work.
hello, please give me a compiled version of this PR, I don't understand how to compile this project
For those who are interested: I made a custom Gnirehtet app where you can activate a setting to stop the service on disconnect. Link: https://github.com/Linus789/gnirehtetx
For those who are interested: I made a custom Gnirehtet app where you can activate a setting to stop the service on disconnect. Link: https://github.com/Linus789/gnirehtetx
Why isn't it a fork?
Why isn't it a fork?
There is no good reason why it isn’t a fork. For some reason I just didn’t think of that.
Why isn't it a fork?
There is no good reason why it isn’t a fork. For some reason I just didn’t think of that.
It's bad that your repository is not a fork. This suggests that you have viruses or you are doing something fraudulent. If it were a fork, it would be easy to check your changes in the code, but this is not the case. Therefore, I do not want to download your solution because of suspected viruses. Maintain your git properly