Magic_V2Ray

Magisk KSU APatch

Take absolute control of your Android's network traffic with Magic_V2Ray by vincentng295. This systemless module integrates the powerful V2Ray core directly into your device's root environment, providing robust, transparent proxying and seamless censorship circumvention without the overhead of traditional VPN applications.

Transparent Routing

Experience unparalleled network freedom. Magic_V2Ray intercepts and routes traffic at the kernel level for maximum efficiency and stealth.

Native Core

Runs the native Linux V2Ray binary directly on Android, eliminating the UI rendering and battery overhead associated with standard proxy apps.

True Transparent Proxy

Utilizes iptables and TPROXY to seamlessly route all device traffic (or specific app traffic) through your configured V2Ray nodes.

100% Systemless

Deploys configuration scripts and binaries via overlay mounts, ensuring your core partitions remain untouched and OTA-ready.

Under the Hood: iptables Routing

Magic_V2Ray does not rely on Android's VpnService API. Instead, it executes shell scripts during the boot phase to establish custom iptables rules. These rules intercept outgoing TCP and UDP packets and redirect them to the V2Ray core's local inbound port.

# Conceptual iptables interception
iptables -t mangle -A V2RAY_TPROXY -p tcp -j TPROXY --on-port 12345 --tproxy-mark 1
ip rule add fwmark 1 table 100
# Service execution via root manager
exec /data/adb/modules/magic_v2ray/bin/v2ray run -c config.json

Frequently Asked Questions

You must manually edit the config.json file located inside the module directory (usually at /data/adb/modules/magic_v2ray/). Paste your standard V2Ray JSON configuration, ensuring the inbound port matches the module's routing script settings, then reboot or restart the service.

Yes, advanced users can modify the module's iptables script to exclude specific Android UIDs (app identifiers) from the proxy routing table, allowing local or banking apps to connect directly to the internet.

Module Info

  • Version latest
  • Module By
    vincentng295
  • Contributors vincentng295
  • Source Code View Repository
  • Tags
    #Magic_V2Ray #V2Ray #Proxy #VPN #Magisk Module #KernelSU #APatch #Systemless
  • Requirement
    Magisk KernelSU APatch
  • Latest Update