eventlOwOp / zerotier-magisk

ZeroTier for magisk βœ… App controller βœ…
GNU General Public License v3.0
48 stars 7 forks source link
flutter-apps magisk-module zerotier zerotier-one
ZeroTier for Magisk Icon # ZeroTier for Magisk [[δΈ­ζ–‡](https://github.com/eventlOwOp/zerotier-magisk/blob/master/README_ZH.md) | English]

Run zerotier in the background after booting!

No conflicts with other Android VPN service!

Use Android App to control ZeroTier

Support for Private Root Servers

Requirements

  1. a version is built with Android NDK Toolchain, supporting api 28 (Android 9.0) and above.

  2. another version is build with GCC toolchain, linking to Linux Syscalls statically

Unofficial planet supported; SSO (zeroidc) supported in the version built with GCC for AArch64

AArch64 suppots ARMv8-A and above; Arm version supports ARMv7-A (compiling with -march=armv7-a)

Installation

  1. Download magisk module zip file from github release; install.
  2. Download controller app apk file from github release; install.
  3. Reboot your phone.
  4. Open controller app; enter your 16-character network id; join.
  5. Enjoy πŸ˜‹

Usage

Use Private Root Servers

Replace /data/adb/zerotier/home/planet with your own planet file.

Controller App

Does not need root privilege

Feature Supported?
status βœ…
start/stop βœ…
join/leave network βœ…
join/leave planet ❎
ZeroTier for Magisk Icon ZeroTier for Magisk Icon

Command line tools

Use zerotier.sh to start/stop or inspect status.

Usage: zerotier.sh {start|stop|restart|status}

Use zerotier-cli / zerotier-idtool for ZeroTierOne command line operations.

(zerotier-one not copied to /system/bin)

Files

/data/adb/zerotier
β”œβ”€β”€ home                                    # zerotier-one home directory
β”‚Β Β  β”œβ”€β”€ authtoken.secret                    # zerotier-one http interface authtoken
β”‚Β Β  β”œβ”€β”€ zerotier-one.pid                    # zerotier-one pid
β”‚Β Β  β”œβ”€β”€ zerotier-one.port                   # zerotier-one port
β”‚Β Β  └── ...
β”œβ”€β”€ lib                                     # only in NDK compiled module
β”‚Β Β  └── libc++_shared.so                    # NDK dynamic library
β”œβ”€β”€ run
β”‚Β Β  β”œβ”€β”€ daemon.log                          # service.sh log
β”‚Β Β  β”œβ”€β”€ pipe                                # named pipe to interact with service.sh
β”‚Β Β  β”œβ”€β”€ zerotier.log                        # zerotier-one log
β”‚Β Β  └── ...
β”œβ”€β”€ zerotier-cli -> zerotier-one            # zerotier-one command line interface
β”œβ”€β”€ zerotier-idtool -> zerotier-one         # zerotier-one id tool
β”œβ”€β”€ zerotier-one                            # zerotier-one executable
└── zerotier.sh

all the scripts and binaries are placed in /data/adb/zerotier/, and all copied to /system/bin (in PATH) to be executed directly (except zerotier-one)

zerotier.sh uses named pipe to communicate with service.sh, preventing ZeroTier to start as a subprocess of Shell.

log files are placed in run, daemon.log for service.sh and zerotier.log for ZeroTierOne.

Build binaries yourself

refer to .github/workflow/build-{gcc|ndk}.yml for detailed information.