Skip to content
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

Orbot 16.2.0-BETA-3 tor-0.4.2.7 won't stop when VPN mode is on #329

Closed
n1m1 opened this issue May 2, 2020 · 3 comments
Closed

Orbot 16.2.0-BETA-3 tor-0.4.2.7 won't stop when VPN mode is on #329

n1m1 opened this issue May 2, 2020 · 3 comments
Labels
PLEASE TEST please test and post feedback

Comments

@n1m1
Copy link

n1m1 commented May 2, 2020

As per title.

If I push the stop button Orbot gets stuck in "TorService is shutting down". The logs just reports INFO about channelpadding.

However, this is not a huge problem. As a workaround, if I disable VPN mode and then push the stop button again, TorService shutdowns properly (the logs report "Orbot is deactivated").

I am running Orbot on Android 10, Pixel 3a, GrapheneOS.

@n8fr8 n8fr8 added the PLEASE TEST please test and post feedback label May 4, 2020
@n8fr8
Copy link
Member

n8fr8 commented May 4, 2020

@n1m1
Copy link
Author

n1m1 commented May 4, 2020

Hi thanks for notifying. Apparently 16.2.0-RC-1.tor-0.4.2.7 release does not fix the problem. I did a fresh install but Orbot still gets stuck in "TorService is shutting down" when I push the stop button. However the above mentioned workaround still works.

@bitmold
Copy link
Collaborator

bitmold commented May 22, 2020

In OrbotMainActivity there's this code which tells the service to stop Tor.

    private void stopTor() {
//        requestTorStatus();
        Intent intent = new Intent(this, OrbotService.class);
        stopService(intent);
    }

When the VPN is not running the call to stopService(intent) fires off the onDestroy() method in OrbotService but when the VPN is running onDestroy() is never called causing the application to never proceed past the "Stopping Tor" phase.

The reason for this is that OrbotVpnManager uses a ParcelFileDescriptor as an interface for Tun2Socks. Android's VPNService (which OrbotService derives from) will refuse to stop with outstanding interfaces open like that. This is why, as @n1m1 points out, when you disable the VPN before stopping tor, Orbot actually stops as intended since the interface was manually closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PLEASE TEST please test and post feedback
Projects
None yet
Development

No branches or pull requests

3 participants