v2ray core
This is a v2ray module for Magisk, and includes binaries for arm, arm64, x86, x64.
V2Ray service script and Android transparent proxy iptables script
You can download the release installer zip file and install it via the Magisk Manager App.
V2ray config file is store in
/data/v2ray/config.json.
Please make sure the config is correct. You can check it by running a command :
export V2RAY_LOCATION_ASSET=/data/v2ray; v2ray -test -config /data/v2ray/config.jsonin android terminal or ssh.
dnscrypt-proxy config file is store in
/data/v2ray/dnscrypt-proxy/folder, you can update cn domains list via running the shell script
update-rules.shor if you dislike the default rules, you can edit them by yourself. ( If you want to disable dnscrypt-proxy, just delete the config file
/data/v2ray/dnscrypt-proxy/dnscrypt-proxy.toml)
Tips: Please notice that the default configuration has already set inbounds section to cooperate work with transparent proxy script. It is recommended that you only edit the first element of outbounds section to your proxy server and edit file
/data/v2ray/appid.listto select which App to proxy.
/data/v2ray/appid.list.
Each App's uid should separate by space or just one App's uid per line. ( for Android App's uid , you can search App's package name in file
/data/system/packages.list, or you can look into some App like Shadowsocks. )
If you expect all Apps proxy by V2Ray with transparent proxy, just write a single number
0in file
/data/v2ray/appid.list.
If you expect all Apps proxy by V2Ray with transparent proxy EXCEPT specific Apps, write down
#bypassat the first line then these Apps' uid separated as above in file
/data/v2ray/appid.list.
Transparent proxy won't take effect until the V2Ray service start normally and file
/data/v2ray/appid.listis not empty.
/data/v2ray/softap.listor empty it.
192.168.43.0/24, and USB subnet is
192.168.42.0/24. If your device is not conform to it , please write down the subnet you want proxy in
/data/v2ray/softap.list. ( You can run command
ip addrto search the subnet )
If you want to control V2Ray by running command totally, just add a file
/data/v2ray/manual. In this situation, V2Ray service won't start on boot automatically and you cann't manage service start/stop via Magisk Manager App.
V2Ray service script is
$MODDIR/scripts/v2ray.service.
For example, in my environment ( Magisk version: 18100 ; Magisk Manager version v7.1.1 )
/sbin/.magisk/img/v2ray/scripts/v2ray.service start- Stop service :
/sbin/.magisk/img/v2ray/scripts/v2ray.service stop
Transparent proxy script is
$MODDIR/scripts/v2ray.tproxy.
For example, in my environment ( Magisk version: 18100 ; Magisk Manager version v7.1.1 )
/sbin/.magisk/img/v2ray/scripts/v2ray.tproxy enable- Disable Transparent proxy :
/sbin/.magisk/img/v2ray/scripts/v2ray.tproxy disable
"A 'transparent proxy' is a proxy that does not modify the request or response beyond what is required for proxy authentication and identification". "A 'non-transparent proxy' is a proxy that modifies the request or response in order to provide some added service to the user agent, such as group annotation services, media type transformation, protocol reduction, or anonymity filtering".
This module also contains a simple script that helping you to make transparent proxy via iptables. In fact , the script is just make some REDIRECT and TPROXY rules to redirect app's network into 65535 port in localhost. And 65535 port is listen by v2ray inbond with dokodemo-door protocol. In summarize, the App proxy network path is looks like :
Android App ( Google, Facebook, Twitter ... )
⇕ ( TCP & UDP network protocol )
Android system iptables [ localhost inside ]
⇕ ( REDIRECT & TPROXY iptables rules )
[ 127.0.0.1:65535 Inbond ] -- V2Ray -- [ Outbond ]
⇕ ( Shadowsocks, Vmess )
Proxy Server ( SS, V2Ray) [ Internet outside ]
⇕ ( HTTP, TCP, ... other application protocol )
App Server ( Google, Facebook, Twitter ... )
rm -rf /data/v2ray.
Project V is a set of network tools that help you to build your own computer network. It secures your network connections and thus protects your privacy. See ProjectV website for more information.