Skip to content

Commit d128a45

Browse files
committed
update Module v3.4.0
1 parent 6f0f4cd commit d128a45

22 files changed

+421
-202
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Declare files that will always have LF line endings on checkout.
22
META-INF/** text eol=lf
3+
webroot/** text eol=lf
34
xray/etc/** text eol=lf
45
xray/scripts/** text eol=lf
56

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ English | [简体中文](README_zh_CN.md)
44

55
~~A fork from [V2ray for Android](https://github.com/Magisk-Modules-Repo/v2ray)~~
66

7-
This is a Magisk module for Xray/V2ray/Sing-box/Mihomo(Clash.Meta), and includes xrayhelper binaries for arm64, x64.
7+
This is a Magisk module for Xray/V2ray/Sing-box/Mihomo/Hysteria2, and includes xrayhelper binaries for arm64, x64.
88

99
## Disclaimer
1010

@@ -20,17 +20,19 @@ Download the module zip from [Release](https://github.com/Asterisk4Magisk/Xray4M
2020

2121
This module does not contain binaries such as [Xray-core](https://github.com/XTLS/Xray-core), When installing, the relevant files are downloaded automatically. If your network has poor access to Github, please consider using a network proxy or choose not install core online.
2222

23-
If your device don't have volume keys, you can create file `/sdcard/xray4magisk.setup`, first line of the file will determine the core type, `xray` for Xray, `v2ray` for V2ray, `sing-box` for Sing-box and `mihomo` for Mihomo(Clash.Meta), any other content will skip core installation; second line of the file will control whether to overwrite old config files, `keep` will preserve them, otherwise will be overwritten.
23+
If your device don't have volume keys, you can create file `/sdcard/xray4magisk.setup`, first line of the file will determine the core type, `xray` for Xray, `v2ray` for V2ray, `sing-box` for Sing-box, `mihomo` for Mihomo and `hysteria2` for Hysteria2, any other content will skip core installation; second line of the file will control whether to overwrite old config files, `keep` will preserve them, otherwise will be overwritten.
2424

2525
## Config
2626

2727
- The xrayhelper config file is stored in `/data/adb/xray/xrayhelper.yml`
2828
- The xray config file is stored in `/data/adb/xray/confs/*.json`
29-
- The v2ray config file is stored in `/data/adb/xray/v2ray.v5.json`
29+
- The v2ray config file is stored in `/data/adb/xray/v2rayconfs/config.json`
3030
- The sing-box config file is stored in `/data/adb/xray/singconfs/*.json`
31-
- The mihomo(clash.meta) template config file is stored in `/data/adb/xray/mihomoconfs/template.yaml`
31+
- The mihomo template config file is stored in `/data/adb/xray/mihomoconfs/template.yaml`
32+
- The hysteria2 config file is stored in `/data/adb/xray/hy2confs/config.yaml`
33+
- The adguardhome config file is stored in `/data/adb/xray/adghomeconfs/config.yaml`, and the default username and password are both `xray4magisk`
3234

33-
Tip: The default config already sets the inbounds section to work with transparent proxy scripts. It is recommended that use xrayhelper to manage your proxy server, for advanced configurations please refer to the appropriate official documentation, such as [Xray](https://xtls.github.io/), [V2ray](https://www.v2fly.org/), [Sing-box](https://sing-box.sagernet.org/), [Mihomo](https://wiki.metacubex.one/)
35+
Tip: The default config already sets the inbounds section to work with transparent proxy scripts. It is recommended that use xrayhelper to manage your proxy server, for advanced configurations please refer to the appropriate official documentation, such as [Xray](https://xtls.github.io/), [V2ray](https://www.v2fly.org/), [Sing-box](https://sing-box.sagernet.org/), [Mihomo](https://wiki.metacubex.one/) and [Hysteria2](https://hysteria.network/)
3436

3537
## Usage
3638

README_zh_CN.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
~~该项目 fork 自 [V2ray for Android](https://github.com/Magisk-Modules-Repo/v2ray)~~
66

7-
本项目为 Xray/V2ray/Sing-box/Mihomo(Clash.Meta) 的 Magisk 模块,支持 arm64, x64 架构。
7+
本项目为 Xray/V2ray/Sing-box/Mihomo/Hysteria2 的 Magisk 模块,支持 arm64, x64 架构。
88

99
## 免责声明
1010

@@ -18,19 +18,21 @@
1818

1919
[Release](https://github.com/Asterisk4Magisk/Xray4Magisk/releases) 下载模块压缩包,然后通过 [Magisk](https://github.com/topjohnwu/Magisk) 进行安装
2020

21-
注意:这个模块不包含任何核心的二进制文件,安装时,联网下载相关文件,若您的网络访问Github速度不佳,建议在模块安装过程中开启网络代理或者选择不在线安装Core并在模块安装成功后手动安装Core、配置XrayHelper
21+
注意:这个模块不包含任何核心的二进制文件,安装时,联网下载相关文件,若您的网络访问Github速度不佳,建议在模块安装过程中开启网络代理或者选择不在线安装 Core 并在模块安装成功后手动安装 Core、配置 XrayHelper
2222

23-
如果你的设备没有音量键,可以创建文件 `/sdcard/xray4magisk.setup`,该文件的第一行将决定在线安装的核心类型,`xray` 表示使用 Xray,`v2ray` 表示使用 V2ray,`sing-box` 表示使用 Sing-box,`mihomo` 表示使用 Mihomo(Clash.Meta),其他任意内容将跳过核心安装;该文件的第二行将决定是否覆盖旧配置文件,`keep`表示保留旧配置文件,其他内容将会覆盖配置文件。
23+
如果你的设备没有音量键,可以创建文件 `/sdcard/xray4magisk.setup`,该文件的第一行将决定在线安装的核心类型,`xray` 表示使用 Xray,`v2ray` 表示使用 V2ray,`sing-box` 表示使用 Sing-box,`mihomo` 表示使用 Mihomo`hysteria2` 表示使用 Hysteria2,其他任意内容将跳过核心安装;该文件的第二行将决定是否覆盖旧配置文件,`keep`表示保留旧配置文件,其他内容将会覆盖配置文件。
2424

2525
## 配置文件
2626

2727
- XrayHelper 配置文件保存在 `/data/adb/xray/xrayhelper.yml`
2828
- Xray 核心的配置文件保存在 `/data/adb/xray/confs/*.json`
29-
- V2ray 核心的配置文件保存在 `/data/adb/xray/v2ray.v5.json`
29+
- V2ray 核心的配置文件保存在 `/data/adb/xray/v2rayconfs/config.json`
3030
- Sing-box 核心的配置文件保存在 `/data/adb/xray/singconfs/*.json`
31-
- Mihomo(Clash.Meta) 核心的模板配置文件保存在 `/data/adb/xray/mihomoconfs/template.yaml`
31+
- Mihomo 核心的模板配置文件保存在 `/data/adb/xray/mihomoconfs/template.yaml`
32+
- Hysteria2 核心的配置文件保存在 `/data/adb/xray/hy2confs/config.yaml`
33+
- AdGuardHome 的配置文件保存在 `/data/adb/xray/adghomeconfs/config.yaml`,默认 WebUI 用户名密码均为 `xray4magisk`
3234

33-
提示:默认配置已经设置了 inbounds 部分来配合透明代理脚本工作。建议您使用 xrayhelper 管理代理服务器,进阶配置请参考相应官方文档,如 [Xray](https://xtls.github.io/)[V2ray](https://www.v2fly.org/)[Sing-box](https://sing-box.sagernet.org/)以及 [Mihomo](https://wiki.metacubex.one/)
35+
提示:默认配置已经设置了 inbounds 部分来配合透明代理脚本工作。建议您使用 xrayhelper 管理代理服务器,进阶配置请参考相应官方文档,如 [Xray](https://xtls.github.io/)[V2ray](https://www.v2fly.org/)[Sing-box](https://sing-box.sagernet.org/) [Mihomo](https://wiki.metacubex.one/) 以及 [Hysteria2](https://hysteria.network/)
3436

3537
## 使用方法
3638

changelog.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
## Changelog
22
### Module
3-
- use xrayhelper v1.3.4
4-
- use xray4magisk-ksu-webui v0.0.1
3+
- use xrayhelper v1.4.0
4+
- use xray4magisk-ksu-webui v0.0.2
5+
- add hysteria2 config
6+
- add AdGuardHome config
57

6-
### XrayHelper v1.3.4
7-
- vmess json Unmarshal str convert fix
8-
- set subprocess group ID for common.External
9-
- console based restful api for kernelsu webui
10-
- some other shareurl changes
8+
### XrayHelper v1.4.0
9+
- tproxy method no longer check ipv6 connection
10+
- save raw data from v2rayNg subscribe when decode base64 failed
11+
- custom User-Agent for http requests send by xrayhelper
12+
- add hysteria2 support
13+
- add adguardhome support
1114

12-
### xray4magisk-ksu-webui v0.0.1
13-
- initial version
15+
### xray4magisk-ksu-webui v0.0.2
16+
- sync XrayHelper v1.4.0

customize.sh

+45-16
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,19 @@ VKSEL=chooseport
6262

6363
installCore() {
6464
case "$1" in
65+
xray)
66+
sed -i 's/coreType: .*/coreType: xray/g' ${module_path}/xrayhelper.yml
67+
sed -i 's/corePath: .*/corePath: \/data\/adb\/xray\/bin\/xray/g' ${module_path}/xrayhelper.yml
68+
sed -i 's/coreConfig: .*/coreConfig: \/data\/adb\/xray\/confs\//g' ${module_path}/xrayhelper.yml
69+
ui_print "- Install geodata asset"
70+
su -c ${module_path}/bin/xrayhelper -c ${module_path}/xrayhelper.yml update geodata
71+
ui_print "- Install xray core"
72+
su -c ${module_path}/bin/xrayhelper -c ${module_path}/xrayhelper.yml update core
73+
;;
6574
v2ray)
6675
sed -i 's/coreType: .*/coreType: v2ray/g' ${module_path}/xrayhelper.yml
6776
sed -i 's/corePath: .*/corePath: \/data\/adb\/xray\/bin\/v2ray/g' ${module_path}/xrayhelper.yml
68-
sed -i 's/coreConfig: .*/coreConfig: \/data\/adb\/xray\/v2ray.v5.json/g' ${module_path}/xrayhelper.yml
77+
sed -i 's/coreConfig: .*/coreConfig: \/data\/adb\/xray\/v2rayconfs\/config.json/g' ${module_path}/xrayhelper.yml
6978
ui_print "- Install geodata asset"
7079
su -c ${module_path}/bin/xrayhelper -c ${module_path}/xrayhelper.yml update geodata
7180
ui_print "- Install v2ray core"
@@ -88,13 +97,11 @@ installCore() {
8897
ui_print "- Install mihomo core"
8998
su -c ${module_path}/bin/xrayhelper -c ${module_path}/xrayhelper.yml update core
9099
;;
91-
xray)
92-
sed -i 's/coreType: .*/coreType: xray/g' ${module_path}/xrayhelper.yml
93-
sed -i 's/corePath: .*/corePath: \/data\/adb\/xray\/bin\/xray/g' ${module_path}/xrayhelper.yml
94-
sed -i 's/coreConfig: .*/coreConfig: \/data\/adb\/xray\/confs\//g' ${module_path}/xrayhelper.yml
95-
ui_print "- Install geodata asset"
96-
su -c ${module_path}/bin/xrayhelper -c ${module_path}/xrayhelper.yml update geodata
97-
ui_print "- Install xray core"
100+
hysteria2)
101+
sed -i 's/coreType: .*/coreType: hysteria2/g' ${module_path}/xrayhelper.yml
102+
sed -i 's/corePath: .*/corePath: \/data\/adb\/xray\/bin\/hysteria2/g' ${module_path}/xrayhelper.yml
103+
sed -i 's/coreConfig: .*/coreConfig: \/data\/adb\/xray\/hy2confs\/config.yaml/g' ${module_path}/xrayhelper.yml
104+
ui_print "- Install hysteria2 core"
98105
su -c ${module_path}/bin/xrayhelper -c ${module_path}/xrayhelper.yml update core
99106
;;
100107
*)
@@ -111,7 +118,7 @@ installCore_VK() {
111118
if $VKSEL; then
112119
ui_print
113120
ui_print "- Please select your core"
114-
ui_print "* VOL+ = xray/v2ray, VOL- = sing-box/mihomo *"
121+
ui_print "* VOL+ = xray/v2ray, VOL- = sing-box/mihomo/hysteria2 *"
115122
if $VKSEL; then
116123
ui_print
117124
ui_print "- Please select xray or v2ray"
@@ -123,12 +130,19 @@ installCore_VK() {
123130
fi
124131
else
125132
ui_print
126-
ui_print "- Please select sing-box or mihomo"
127-
ui_print "* VOL+ = sing-box, VOL- = mihomo *"
133+
ui_print "- Please select your core"
134+
ui_print "* VOL+ = sing-box/mihomo, VOL- = hysteria2 *"
128135
if $VKSEL; then
129-
installCore sing-box
136+
ui_print
137+
ui_print "- Please select sing-box or mihomo"
138+
ui_print "* VOL+ = sing-box, VOL- = mihomo *"
139+
if $VKSEL; then
140+
installCore sing-box
141+
else
142+
installCore mihomo
143+
fi
130144
else
131-
installCore mihomo
145+
installCore hysteria2
132146
fi
133147
fi
134148
else
@@ -140,9 +154,6 @@ releaseConfig() {
140154
ui_print "- Release xrayhelper config"
141155
unzip -j -o "${ZIPFILE}" 'xray/etc/xrayhelper.yml' -d ${module_path} >&2
142156

143-
ui_print "- Release v2ray v5 config"
144-
unzip -j -o "${ZIPFILE}" 'xray/etc/v2ray.v5.json' -d ${module_path} >&2
145-
146157
ui_print "- Release xray configs"
147158
if [ ! -d ${module_path}/confs ]; then
148159
mkdir -p ${module_path}/confs
@@ -153,6 +164,12 @@ releaseConfig() {
153164
unzip -j -o "${ZIPFILE}" 'xray/etc/confs/policy.json' -d ${module_path}/confs >&2
154165
unzip -j -o "${ZIPFILE}" 'xray/etc/confs/routing.json' -d ${module_path}/confs >&2
155166

167+
ui_print "- Release v2ray v5 config"
168+
if [ ! -d ${module_path}/v2rayconfs ]; then
169+
mkdir -p ${module_path}/v2rayconfs
170+
unzip -j -o "${ZIPFILE}" 'xray/etc/v2rayconfs/config.json' -d ${module_path}/v2rayconfs >&2
171+
fi
172+
156173
ui_print "- Release sing-box configs"
157174
if [ ! -d ${module_path}/singconfs ]; then
158175
mkdir -p ${module_path}/singconfs
@@ -167,6 +184,18 @@ releaseConfig() {
167184
mkdir -p ${module_path}/mihomoconfs
168185
fi
169186
unzip -j -o "${ZIPFILE}" 'xray/etc/mihomoconfs/template.yaml' -d ${module_path}/mihomoconfs >&2
187+
188+
ui_print "- Release hysteria2 configs"
189+
if [ ! -d ${module_path}/hy2confs ]; then
190+
mkdir -p ${module_path}/hy2confs
191+
fi
192+
unzip -j -o "${ZIPFILE}" 'xray/etc/hy2confs/config.yaml' -d ${module_path}/hy2confs >&2
193+
194+
ui_print "- Release adguardhome configs"
195+
if [ ! -d ${module_path}/adghomeconfs ]; then
196+
mkdir -p ${module_path}/adghomeconfs
197+
fi
198+
unzip -j -o "${ZIPFILE}" 'xray/etc/adghomeconfs/config.yaml' -d ${module_path}/adghomeconfs >&2
170199
}
171200

172201
installModule() {

module.prop

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id=xray4magisk
22
name=Xray4Magisk
3-
version=Module v3.3.4, Helper v1.3.4
4-
versionCode=20240602
3+
version=Module v3.4.0, Helper v1.4.0
4+
versionCode=20240617
55
author=Asterisk4Magisk
66
description=System Proxy
77
updateJson=https://raw.githubusercontent.com/Asterisk4Magisk/Xray4Magisk/master/update.json

update.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "Module v3.3.4",
3-
"versionCode": 20240602,
4-
"zipUrl": "https://github.com/Asterisk4Magisk/Xray4Magisk/releases/download/v3.3.4/Xray4Magisk-3.3.4.zip",
2+
"version": "Module v3.4.0",
3+
"versionCode": 20240617,
4+
"zipUrl": "https://github.com/Asterisk4Magisk/Xray4Magisk/releases/download/v3.4.0/Xray4Magisk-3.4.0.zip",
55
"changelog": "https://raw.githubusercontent.com/Asterisk4Magisk/Xray4Magisk/master/changelog.md"
66
}

0 commit comments

Comments
 (0)