Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ecce393578 | ||
![]() |
aef6fe709e | ||
![]() |
6a637c5ce8 |
11
README.md
11
README.md
@@ -8,20 +8,27 @@
|
|||||||
|
|
||||||
## 包含内容
|
## 包含内容
|
||||||
|
|
||||||
- [V2Ray core](<https://github.com/v2fly/v2ray-core>): V2Ray核心代理程序
|
|
||||||
- 基于iptables的代理脚本
|
- 基于iptables的代理脚本
|
||||||
- [V2Manager](<https://github.com/yatsuki/v2manager>):管理核心程序以及iptables的APP
|
- [V2Manager](<https://github.com/yatsuki/v2manager>):管理核心程序以及iptables的APP
|
||||||
- [magisk-module-installer](https://github.com/topjohnwu/magisk-module-installer)
|
- [magisk-module-installer](https://github.com/topjohnwu/magisk-module-installer)
|
||||||
|
|
||||||
|
### 插件打包时一起打包的二进制文件
|
||||||
|
- [V2Ray core](<https://github.com/v2fly/v2ray-core>): V2Ray核心代理程序
|
||||||
|
- [v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat): V2Ray 路由规则文件加强版
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
目前还未合并至Magisk官方模块仓库,下载[zip](https://github.com/yatsuki/v2ray/releases)后自行在`Magisk Manager`中从本地安装
|
下载[zip](https://github.com/yatsuki/v2ray/releases)后自行在`Magisk Manager`中从本地安装。
|
||||||
|
|
||||||
|
### 插件更新
|
||||||
|
Magisk更新至24.0+之后取消了线上仓库,插件需要在`module.prop`中指定`updateJson`来检查新版本。本插件将使用[v2ray-release](https://github.com/yatsuki/v2ray-release)来检查更新。由于有32/64平台的区分,`updateJson`会在插件发布打包时指定。
|
||||||
|
|
||||||
## 配置文件(底层)
|
## 配置文件(底层)
|
||||||
|
|
||||||
- `/data/v2ray/config.json` V2Ray配置文件
|
- `/data/v2ray/config.json` V2Ray配置文件
|
||||||
- `/data/v2ray/appid.list` 需要代理的APP列表
|
- `/data/v2ray/appid.list` 需要代理的APP列表
|
||||||
- `/data/v2ray/softap.list` 需要代理的子网
|
- `/data/v2ray/softap.list` 需要代理的子网
|
||||||
|
- `/data/v2ray/manual` 停用开机启动
|
||||||
|
|
||||||
## 使用方法
|
## 使用方法
|
||||||
|
|
||||||
|
2
app
2
app
Submodule app updated: 0908cc917d...2eda7595de
12
customize.sh
12
customize.sh
@@ -10,22 +10,22 @@ mkdir -p /data/v2ray
|
|||||||
mkdir -p /data/v2ray/run
|
mkdir -p /data/v2ray/run
|
||||||
mkdir -p $MODPATH/scripts
|
mkdir -p $MODPATH/scripts
|
||||||
mkdir -p $MODPATH/system/bin
|
mkdir -p $MODPATH/system/bin
|
||||||
mkdir -p $MODPATH/system/app
|
# mkdir -p $MODPATH/system/app
|
||||||
mkdir -p $MODPATH/system/app/Stk
|
# mkdir -p $MODPATH/system/app/Stk
|
||||||
mkdir -p $MODPATH/system/etc
|
mkdir -p $MODPATH/system/etc
|
||||||
|
|
||||||
ui_print "- Install V2Ray core execute files"
|
ui_print "- Install V2Ray core execute files"
|
||||||
unzip -j -o "${ZIPFILE}" "v2ray/bin/v2ray" -d $MODPATH/system/bin >&2
|
unzip -j -o "${ZIPFILE}" "v2ray/bin/v2ray" -d $MODPATH/system/bin >&2
|
||||||
unzip -j -o "${ZIPFILE}" "v2ray/bin/geoip.dat" -d /data/v2ray >&2
|
unzip -j -o "${ZIPFILE}" "v2ray/bin/geoip.dat" -d /data/v2ray >&2
|
||||||
unzip -j -o "${ZIPFILE}" "v2ray/bin/geosite.dat" -d /data/v2ray >&2
|
unzip -j -o "${ZIPFILE}" "v2ray/bin/geosite.dat" -d /data/v2ray >&2
|
||||||
unzip -j -o "${ZIPFILE}" "v2ray/bin/v2manager.apk" -d $MODPATH/system/app/Stk >&2
|
# unzip -j -o "${ZIPFILE}" "v2ray/bin/v2manager.apk" -d $MODPATH/system/app/Stk >&2
|
||||||
unzip -j -o "${ZIPFILE}" 'v2ray/scripts/*' -d $MODPATH/scripts >&2
|
unzip -j -o "${ZIPFILE}" 'v2ray/scripts/*' -d $MODPATH/scripts >&2
|
||||||
unzip -j -o "${ZIPFILE}" 'service.sh' -d $MODPATH >&2
|
unzip -j -o "${ZIPFILE}" 'service.sh' -d $MODPATH >&2
|
||||||
unzip -j -o "${ZIPFILE}" 'uninstall.sh' -d $MODPATH >&2
|
unzip -j -o "${ZIPFILE}" 'uninstall.sh' -d $MODPATH >&2
|
||||||
|
|
||||||
# pm command was not working in install scipt?
|
# pm command was not working in install scipt?
|
||||||
ui_print "- Install V2Ray Manager APK"
|
# ui_print "- Install V2Ray Manager APK"
|
||||||
pm install $MODPATH/system/app/Stk/v2manager.apk
|
# pm install $MODPATH/system/app/Stk/v2manager.apk
|
||||||
|
|
||||||
rm "${download_v2ray_zip}"
|
rm "${download_v2ray_zip}"
|
||||||
# copy v2ray data and config
|
# copy v2ray data and config
|
||||||
@@ -59,4 +59,4 @@ set_perm $MODPATH/scripts/start.sh 0 0 0755
|
|||||||
set_perm $MODPATH/scripts/v2ray.service 0 0 0755
|
set_perm $MODPATH/scripts/v2ray.service 0 0 0755
|
||||||
set_perm $MODPATH/scripts/v2ray.tproxy 0 0 0755
|
set_perm $MODPATH/scripts/v2ray.tproxy 0 0 0755
|
||||||
set_perm $MODPATH/system/bin/v2ray ${inet_uid} ${inet_uid} 0755
|
set_perm $MODPATH/system/bin/v2ray ${inet_uid} ${inet_uid} 0755
|
||||||
set_perm /data/v2ray ${inet_uid} ${inet_uid} 0755
|
set_perm /data/v2ray ${inet_uid} ${inet_uid} 0755
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
id=v2ray
|
id=v2ray
|
||||||
name=V2ray for Android
|
name=V2ray for Android
|
||||||
version=2.0.1
|
version=2.1.0.0
|
||||||
versionCode=20220119
|
versionCode=20230529
|
||||||
author=ohnoku
|
author=ohnoku
|
||||||
description=V2ray core with service scripts for Android
|
description=V2ray core with service scripts for Android
|
||||||
|
@@ -7,7 +7,7 @@ run_path="${data_path}/run"
|
|||||||
pid_file="${run_path}/${bin_name}.pid"
|
pid_file="${run_path}/${bin_name}.pid"
|
||||||
error_log="${run_path}/error.log"
|
error_log="${run_path}/error.log"
|
||||||
conf_file="${data_path}/config.json"
|
conf_file="${data_path}/config.json"
|
||||||
bin_opts="-config ${conf_file}"
|
bin_opts="run -c ${conf_file}"
|
||||||
iptables_wait="iptables"
|
iptables_wait="iptables"
|
||||||
|
|
||||||
|
|
||||||
@@ -80,9 +80,9 @@ start_service() {
|
|||||||
elif [ -f ${conf_file} ] && ${bin_path} ${bin_opts} -test ; then
|
elif [ -f ${conf_file} ] && ${bin_path} ${bin_opts} -test ; then
|
||||||
echo "[Info]: Starting ${bin_name} service."
|
echo "[Info]: Starting ${bin_name} service."
|
||||||
mkdir -p ${run_path}
|
mkdir -p ${run_path}
|
||||||
chown -R inet:inet ${data_path}
|
# chown -R inet:inet ${data_path}
|
||||||
chown inet:inet ${bin_path}
|
# chown inet:inet ${bin_path}
|
||||||
chmod 6755 ${bin_path}
|
# chmod 6755 ${bin_path}
|
||||||
nohup ${bin_path} ${bin_opts} &>${error_log} &
|
nohup ${bin_path} ${bin_opts} &>${error_log} &
|
||||||
echo -n $! > ${pid_file}
|
echo -n $! > ${pid_file}
|
||||||
if wait_v2ray_listen ; then
|
if wait_v2ray_listen ; then
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
#!/system/bin/sh
|
#!/system/bin/sh
|
||||||
|
|
||||||
route_id="1130"
|
# route_id="1130"
|
||||||
inet_uid="3003"
|
inet_uid="3003"
|
||||||
net_raw_uid="3004"
|
root_uid="0"
|
||||||
|
# net_raw_uid="3004"
|
||||||
route_name="v2ray"
|
route_name="v2ray"
|
||||||
proxy_port="65535"
|
proxy_port="65535"
|
||||||
proxy_mark="0x20151130"
|
# proxy_mark="0x20151130"
|
||||||
table_file="/data/misc/net/rt_tables"
|
# table_file="/data/misc/net/rt_tables"
|
||||||
appid_file="/data/v2ray/appid.list"
|
appid_file="/data/v2ray/appid.list"
|
||||||
softap_file="/data/v2ray/softap.list"
|
softap_file="/data/v2ray/softap.list"
|
||||||
iptables_wait="iptables"
|
iptables_wait="iptables"
|
||||||
@@ -152,6 +153,7 @@ proxy_app_tcp_iptables() {
|
|||||||
${iptables_wait} -t nat -N APP_TCP_PROXY
|
${iptables_wait} -t nat -N APP_TCP_PROXY
|
||||||
## bypass v2ray program
|
## bypass v2ray program
|
||||||
${iptables_wait} -t nat -A APP_TCP_PROXY -m owner --uid-owner ${inet_uid} -j RETURN
|
${iptables_wait} -t nat -A APP_TCP_PROXY -m owner --uid-owner ${inet_uid} -j RETURN
|
||||||
|
${iptables_wait} -t nat -A APP_TCP_PROXY -m owner --uid-owner ${root_uid} -j RETURN
|
||||||
## white-list mode
|
## white-list mode
|
||||||
if [ "${app_proxy_mode}" = "pick" ] ; then
|
if [ "${app_proxy_mode}" = "pick" ] ; then
|
||||||
## proxy all apps network
|
## proxy all apps network
|
||||||
|
Reference in New Issue
Block a user