v2ray core
Go to file
Xu Tianliang ecce393578 某些机型下系统流量会以root用户请求,修复此机型下open too many files报错 2023-06-04 15:19:50 +08:00
.github/workflows chore:引用v2ray-release脚本进行打包 2022-02-23 19:46:15 +08:00
META-INF/com/google/android [v1.0.12] Only proxy assignation DNS to improve China DNS resolution speed. 2020-06-11 11:26:06 +08:00
app@2eda7595de feat:更新版本v2.0.1.02 2022-02-23 20:19:46 +08:00
v2ray 某些机型下系统流量会以root用户请求,修复此机型下open too many files报错 2023-06-04 15:19:50 +08:00
.gitattributes Magisk Module Installer 2019-03-28 10:00:56 -04:00
.gitmodules style:app子模组路径指向至Github 2022-01-18 12:32:14 +08:00
README.md docs:更新插件说明(Magisk 24.0+) 2022-02-23 20:17:36 +08:00
customize.sh 某些机型下系统流量会以root用户请求,修复此机型下open too many files报错 2023-06-04 15:19:50 +08:00
module.prop 某些机型下系统流量会以root用户请求,修复此机型下open too many files报错 2023-06-04 15:19:50 +08:00
service.sh [v1.0.11] Use new magisk module installer, fix bug in magisk 20.4 NOT auto run service.sh. 2020-03-26 05:23:33 +08:00
uninstall.sh feat:卸载插件时删除管理apk 2022-01-18 14:47:35 +08:00

README.md

V2ray Magisk模块

基于Magisk的V2Ray代理使用iptables转发相较于VPN模式更为省电、无感。

历史版本

本版本是fork自v2ray-for-android。由于源项目年久失修,在使用时需要大幅度自行调整内容。就将自己的改动保存到了自己的仓库。 本仓库删除了历史遗留的二进制大文件,直接检出旧版本不保证能正常使用,有需要匹配旧设备以及查看历史内容的需求请在源仓库查看。

包含内容

插件打包时一起打包的二进制文件

安装

下载zip后自行在Magisk Manager中从本地安装。

插件更新

Magisk更新至24.0+之后取消了线上仓库,插件需要在module.prop中指定updateJson来检查新版本。本插件将使用v2ray-release来检查更新。由于有32/64平台的区分updateJson会在插件发布打包时指定。

配置文件(底层)

  • /data/v2ray/config.json V2Ray配置文件
  • /data/v2ray/appid.list 需要代理的APP列表
  • /data/v2ray/softap.list 需要代理的子网
  • /data/v2ray/manual 停用开机启动

使用方法

通过命令行

启动停止V2Ray进程

V2ray的进程可以通过下面的脚本来进行管理默认情况下V2Ray进程将开机自动运行:

/data/adb/modules/v2ray/script/v2ray.service (start|stop|restart|status)

使用iptables代理应用

代理iptables规则可以通过下面的脚本管理同V2Ray进程一样默认情况下iptables规则将开机自动运行:

/data/adb/modules/v2ray/script/v2ray.tproxy (enable|disable|renew)
  • 全局代理 在appid.list编辑内容:
0
  • 分应用代理 在appid.list指定需要代理应用的UID例:
10131

UID可以通过应用包名在/data/system/packages.list中找到:

lavender:/ $ pm list package -3 
package:com.vanced.android.youtube # 应用 Vanced Youtube
lavender:/ $ grep 'com.vanced.android.youtube' /data/system/packages.list
com.vanced.android.youtube 10131 0 /data/user/0/com.vanced.android.youtube ....
# 10131即是应用Vanced Youtube的UID
  • 代理热点子网 在softap.list中指定热点子网IP即可也可以使用网段例:
192.168.43.0/24

各种机型的ROM中打开热点时子网网段并不一致请根据实际情况编辑

关闭代理的开机自启

/data/v2ray/目录下新建空白文件manual即可

touch /data/v2ray/manaual

通过管理应用

请参照v2manager页面

Transparent proxy

What is "Transparent proxy"

"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".

-- Transparent proxy explanation in Wikipedia

Working principle

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 ... )

卸载

  1. 删除v2manager应用 pm uninstall co.lintian.v2manager
  2. 在Magisk Manager中停用并删除本插件
  3. 删除v2ray目录 rm -rf /data/v2ray

Project V

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.

License

The MIT License (MIT)