Skip to content

Shizuku mode for Android 13+ #789

Open

Description

@Mygod

I heard its possible with Shizuku as state here 2dust/v2rayNG#5903

Android’s regular VpnService protects traffic originating from the Android device itself. Traffic forwarded by Android’s tethering stack does not normally enter that VPN, so clients connected through a hotspot or USB tethering can bypass v2rayNG entirely.
Root-based solutions can redirect forwarded traffic with firewall and policy-routing rules, but this is not available on locked, non-rooted devices.
This implementation uses Android’s test-network infrastructure through Shizuku to provide the tethering stack with a protected upstream network without requiring root.

Originally posted by @vincentng295 in #62

Activity

  1. eliotcougar commented on Jul 28, 2026

    @eliotcougar

    I am the co-author of the original implementation. The main author is GPT5.6 Sol.

    It is indeed possible, and it currently works well on my Pixel 9 pro. It is based on a hidden API that can change or disappear in the future, but that is unlikely, IMO. However, it's not very robust, and you have to pay attention to various scenarios where it can fail and start routing tethering traffic to eth0 instead of testtun. Even the official Google forums point out that it can "randomly" decide to attach to the wrong interface, in which case they recommend to "just try again".

    I'm not sure it's possible to attach testtun to another tun. You don't have much control over it without root. It is called testtun after all, it's not a fully supported API.

    Good luck, anyway.

  2. self-assigned this
    on Jul 28, 2026
  3. Mygod commented on Jul 28, 2026

    @Mygod
    OwnerAuthor

    Looks like for general VPN support, this needs a full userspace transparent proxy. Conveniently, this was implemented recently in #714. 🤔

  4. Mygod commented on Aug 26, 2026

    @Mygod
    OwnerAuthor

    WIP in #809. In my testing, it's 16x slower in download and 7x slower in upload compared to root mode in comparison.

    @eliotcougar Does that match what you are seeing?

  5. eliotcougar commented on Aug 26, 2026

    @eliotcougar

    WIP in #809. In my testing, it's 16x slower in download and 7x slower in upload compared to root mode in comparison.

    @eliotcougar Does that match what you are seeing?

    Just tested it right now... Speedtest.net, when using the same server, shows approximately the same speeds both on the phone, and on the tethered PC... On my shitty mobile connection it's not very high and a bit unstable...
    I've been using 2dust/v2rayNG#5903 multiple times over the USB, and with a Hotspot with no speed issues at all...

    Image Image
  6. eliotcougar commented on Aug 26, 2026

    @eliotcougar

    I can tell GPT5.6 to compare your code with theirs if you want. To identify the bottleneck... This testtun API is a bit tricky to work with.

  7. Mygod commented on Aug 27, 2026

    @Mygod
    OwnerAuthor

    Ok I think I had it found some issues with throughput as well.

    EDIT: Fixed in 2559e35.

  8. mattokar commented on Sep 4, 2026

    @mattokar

    Hello. Is there some beta build we can try before release?

  9. Mygod commented on Sep 4, 2026

    @Mygod
    OwnerAuthor

    @mattokar Hi, thanks for asking. Unfortunately, it looks like I will have quite limited time for continuing developing this in the near term future. #809 is as far as I can see working, but still needs more human work from me (manual review to reduce AI slop/overengineering). I cannot guarantee when a new alpha/beta release any time soon.

    As a compromise, I've released the apks under canary: https://github.com/Mygod/VPNHotspot/releases/tag/canary

    Feedback is welcome but I do not recommend anyone updating unless they need this feature.

  10. Mygod commented on Sep 4, 2026

    @Mygod
    OwnerAuthor

    Plus I have a lot planned (and not implemented yet) for the next alpha release, including allowing unrooted Shizuku users to use some of the existing functionalities like connected device monitoring. The current canary release only has VPN tethering working.

  11. eliotcougar commented on Sep 4, 2026

    @eliotcougar

    manual review to reduce AI slop/overengineering

    I've just got access to GPT-6 Astra two hours ago... It's currently reducing slop left by GPT5.6 Sol in Shizuku Rootless Tethering implementation in v2rayNG...
    It was like "What idiot wrote all this?"...

  12. Satoru-777 commented on Sep 14, 2026

    @Satoru-777

    Hi, I'm new to GitHub and to these kinds of projects, but I wanted to make a suggestion.

    Would it be possible to implement Shizuku compatibility in the VPN Hotspot app to allow sharing the VPN connection via hotspot without needing root access, similar to how the Shizzi app does it?

    I don't know if it's technically possible or if it would require significant changes to the app, but it would be a very useful feature, especially for devices that don't have root access.

    That's all. I hope you can read my comment. Thank you so much for creating and maintaining this wonderful app.

  13. marked VPN sharing without root #813 as a duplicate of this issue on Sep 14, 2026
  14. vincentng295 commented on Sep 20, 2026

    @vincentng295

    Hi, I'm new to GitHub and to these kinds of projects, but I wanted to make a suggestion.

    Would it be possible to implement Shizuku compatibility in the VPN Hotspot app to allow sharing the VPN connection via hotspot without needing root access, similar to how the Shizzi app does it?

    I don't know if it's technically possible or if it would require significant changes to the app, but it would be a very useful feature, especially for devices that don't have root access.

    That's all. I hope you can read my comment. Thank you so much for creating and maintaining this wonderful app.

    It's already implemented but WIP

  15. AHL8192 commented on Oct 3, 2026

    @AHL8192

    VPN Hotspot with shizuku will be awesome 😎
    (sorry I couldn't add value)

  16. AHL8192 commented on Nov 4, 2026

    @AHL8192

    Please check out this project and see if it helps with implementing shizuku support here or not.
    It shares vpn network without root and through shizuku
    small project I found online:

    https://github.com/carlelieser/shizzi/

  17. eliotcougar commented on Nov 4, 2026

    @eliotcougar

    20. Please check out this project and see if it helps with implementing shizuku support here or not.
    It shares vpn network without root and through shizuku
    small project I found online:
    https://github.com/carlelieser/shizzi/

    The main problem with test-tun <-> vpn app interconnect when they are in two different apps is that you cannot reliably catch the situation where your Hotspot suddenly skips test-tun and goes direct. It can happen for a variety of random reasons, like intermittent connection on your WiFi or USB, or something as basic as getting a phone call that switches you from LTE to 3G...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions