gnirehtet icon indicating copy to clipboard operation
gnirehtet copied to clipboard

Add option to stop the service upon disconnect

Open kmod-midori opened this issue 4 years ago • 11 comments

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.

kmod-midori avatar Jul 23 '21 12:07 kmod-midori

Thank you :+1: That will be useful :)

However, I will not be able to review this before next month.

rom1v avatar Jul 23 '21 13:07 rom1v

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)

kmod-midori avatar Jul 23 '21 14:07 kmod-midori

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!

ungive avatar Jan 08 '22 18:01 ungive

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.

kmod-midori avatar Jan 10 '22 02:01 kmod-midori

hello, please give me a compiled version of this PR, I don't understand how to compile this project

Serega007RU avatar May 02 '23 10:05 Serega007RU

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

Linus789 avatar May 19 '23 19:05 Linus789

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?

Serega007RU avatar May 20 '23 05:05 Serega007RU

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.

Linus789 avatar May 20 '23 11:05 Linus789

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

Serega007RU avatar Jul 08 '23 09:07 Serega007RU