From e1ff4d189dfbce870b6f429526889c9471069895 Mon Sep 17 00:00:00 2001
From: mack-a <57424792+mack-a@users.noreply.github.com>
Date: Sat, 16 Aug 2025 16:41:06 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E5=A4=8DM?=
=?UTF-8?q?L-DSA-65=20=E6=97=A0=E6=B3=95=E8=AE=BF=E9=97=AE=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E3=80=81=E4=BF=AE=E6=94=B9README?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 2 +
README.md | 124 ++++++++++++---------------------
documents/en/README_EN.md | 142 ++++++++++++--------------------------
install.sh | 69 +++++++++---------
4 files changed, 128 insertions(+), 209 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8333e92..a8213f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
.idea
fodder/.DS_Store
.DS_Store
+GEMINI.md
+GEMINI.zh-CN.md
diff --git a/README.md b/README.md
index 2de8626..8b69d9c 100644
--- a/README.md
+++ b/README.md
@@ -1,107 +1,69 @@
-# Xray-core/sing-box 一键脚本快速安装
+# v2ray-agent
- [感谢 JetBrains 提供的非商业开源软件开发授权](https://www.jetbrains.com/?from=v2ray-agent)
-- [Thanks for non-commercial open source development authorization by JetBrains](https://www.jetbrains.com/?from=v2ray-agent)
-- [English Version](https://github.com/mack-a/v2ray-agent/blob/master/documents/en/README_EN.md)
-- [VPS选购攻略,避坑指南](https://www.v2ray-agent.com/archives/1679975663984)
-- [Telegram频道](https://t.me/v2rayAgentChannel)、[Telegram群组](https://t.me/technologyshare)、[官方网站](https://www.v2ray-agent.com/)、[备用网站](https://www.592083.xyz/)
-- [RackNerd低价 联通AS4837套餐,年付10美起](https://www.v2ray-agent.com/archives/racknerdtao-can-zheng-li-nian-fu-10mei-yuan)
-- [搬瓦工优质套餐推荐](https://www.v2ray-agent.com/archives/2023nian-ban-wa-gong-ji-fang-tui-jian)
-- [DMIT优质套餐推荐](https://www.v2ray-agent.com/archives/1679159868033)
-- **请给个⭐支持一下**
+[](https://www.gnu.org/licenses/agpl-3.0)
+[](https://t.me/v2rayAgentChannel)
+[](https://t.me/technologyshare)
+[](https://www.v2ray-agent.com/)
+[](documents/en/README_EN.md)
-# 一、项目介绍
-
-## 核心
-
-- Xray-core
-- sing-box
-
-## 协议
-
-> 以下均使用TLS,支持多种协议组合
-
-- VLESS(Reality、Vision(TCP)、WS、gRPC、XHTTP)
-- VMess(TCP、WS、HTTPUpgrade)
-- Trojan(TCP、gRPC)
-- Hysteria2(sing-box)
-- Tuic(sing-box)
-- NaiveProxy(sing-box)
-- AnyTLS(sing-box)
+Xray-core/sing-box 一键脚本快速安装
## 功能
-- 支持不同核心之间的配置读取
-- 支持个性化安装单个协议
-- [支持无域名版本的VLESS Reality搭建](https://www.v2ray-agent.com/archives/1708584312877)
-- [支持多种分流用于解锁(wireguard、IPv6、Socks5、DNS、VMess(ws)、SNI反向代理)](https://www.v2ray-agent.com/archives/ba-he-yi-jiao-ben-yu-ming-fen-liu-jiao-cheng)
-- [支持批量添加CDN节点并配合ClashMeta自动优选](https://www.v2ray-agent.com/archives/1684858575649)
-- 支持普通证书和通配符证书自动申请及更新
-- [支持订阅以及多VPS组合订阅](https://www.v2ray-agent.com/archives/1681804748677)
-- 支持批量新增端口[仅支持Xray-core]
-- 支持核心的升级以及回退
-- 支持自主更换伪装站点
-- 支持BT下载管理以及域名黑名单管理
+* **多核心支持:** 支持 Xray-core 和 sing-box.
+* **多协议支持:** 支持 VLESS, VMess, Trojan, Hysteria2, Tuic, NaiveProxy 等多种协议.
+* **自动TLS:** 自动申请和续订 SSL 证书.
+* **易于管理:** 提供简单的菜单来管理用户、端口和配置.
+* **订阅支持:** 生成和管理订阅链接.
+* **分流管理:** 提供wireguard、IPv6、Socks5、DNS、VMess(ws)、SNI反向代理,可用于解锁流媒体、规避IP验证等作用.
+* **目标域名管理:** 提供域名黑名单管理,可用于禁止访问指定网站.
+* **BT下载管理:** 可用于禁止下载P2P相关内容.
+* **更多内容请访问[官方网站](https://www.v2ray-agent.com/categories/jiao-cheng)、[备用](https://www.592083.com/categories/jiao-cheng)**
-# 二、使用指南
+## 快速开始
-- [八合一脚本从入门到精通](https://www.v2ray-agent.com/archives/1710141233)
-- [脚本快速搭建教程](https://www.v2ray-agent.com/archives/1682491479771)
-- [垃圾VPS大救星,hysteria2最新协议一键搭建](https://www.v2ray-agent.com/archives/1697162969693)
-- [Tuic V5性能提升及使用方法](https://www.v2ray-agent.com/archives/1687167522196)
-- [Cloudflare优选IP、自动选择最快节点教程](https://www.v2ray-agent.com/archives/1684858575649)
-- [脚本使用注意事项](https://www.v2ray-agent.com/archives/1679931532764)
-- [脚本异常处理](https://www.v2ray-agent.com/archives/1684115970026)
-
-# 三、线路推荐
-
-- [VPS选购指南,避坑指南](https://www.v2ray-agent.com/archives/1679975663984)
-
-## 1.高端
-
-- [CN2 GIA](https://www.v2ray-agent.com/tags/cn2-gia)
-- [AS9929](https://www.v2ray-agent.com/tags/as9929)
-- [日本软银](https://www.v2ray-agent.com/tags/ruan-yin)
-
-## 2.性价比
-
-- [AS4837](https://www.v2ray-agent.com/tags/as4837)
-- [CMI](https://www.v2ray-agent.com/tags/cmi)
-
-# 四、安装使用
-
-## 1.下载脚本
-
-- 支持快捷方式启动,安装完毕后,shell输入【**vasma**】即可打开脚本,脚本执行路径[**/etc/v2ray-agent/install.sh**]
-
-- Github
+### 安装
```
-wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
+bash wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
```
-- 官方网站【备用】
+### 使用
+
+安装后,运行以下命令可再次打开管理菜单:
```
-wget -P /root -N --no-check-certificate "https://www.v2ray-agent.com/v2ray-agent/install.sh" && chmod 700 /root/install.sh && /root/install.sh
+vasma
```
-## 2.使用
+## 文档和指南
-# 五、反馈和建议
+* [八合一脚本从入门到精通](https://www.v2ray-agent.com/archives/1710141233)
+* [脚本快速搭建教程](https://www.v2ray-agent.com/archives/1682491479771)
+* [脚本使用注意事项](https://www.v2ray-agent.com/archives/1679931532764)
+* [脚本异常处理](https://www.v2ray-agent.com/archives/1684115970026)
+* [VPS选购攻略](https://www.v2ray-agent.com/archives/1679975663984)
+* [垃圾VPS大救星,hysteria2最新协议一键搭建](https://www.v2ray-agent.com/archives/1697162969693)
+* [RackNerd低价 联通AS4837套餐,年付10美起](https://www.v2ray-agent.com/archives/racknerdtao-can-zheng-li-nian-fu-10mei-yuan)
+* [搬瓦工优质套餐推荐](https://www.v2ray-agent.com/archives/2023nian-ban-wa-gong-ji-fang-tui-jian)
+* [DMIT优质套餐推荐](https://www.v2ray-agent.com/archives/1679159868033)
-- 提交[issue](https://github.com/mack-a/v2ray-agent/issues)、[加入](https://t.me/technologyshare)群聊
+## 社区与支持
-# 六、捐赠
+* **Telegram:** [频道](https://t.me/v2rayAgentChannel) | [群组](https://t.me/technologyshare)
+* **网站:** [官网](https://www.v2ray-agent.com/) | [备用](https://www.592083.xyz/)
+* **反馈:** [提交 issue](https://github.com/mack-a/v2ray-agent/issues)
-- 感谢您对开源项目的关注和支持。如果您觉得这个项目对您有帮助,欢迎通过以下方式进行捐赠。
+## 捐赠
-- [购买VPS捐赠](https://www.v2ray-agent.com/categories/vps)
+感谢您对开源项目的关注和支持。如果您觉得这个项目对您有帮助,欢迎通过以下方式进行捐赠。
-- [通过虚拟币向我捐赠](https://www.v2ray-agent.com/1679123834836)
+* [购买VPS捐赠](https://www.v2ray-agent.com/categories/vps)
+* [通过虚拟币向我捐赠](https://www.v2ray-agent.com/1679123834836)
-# 七、许可证
+## 许可证
-[AGPL-3.0](https://github.com/mack-a/v2ray-agent/blob/master/LICENSE)
+本项根据 [AGPL-3.0 许可证](LICENSE) 授权.
diff --git a/documents/en/README_EN.md b/documents/en/README_EN.md
index b5a1045..bea3a4d 100644
--- a/documents/en/README_EN.md
+++ b/documents/en/README_EN.md
@@ -1,119 +1,69 @@
# v2ray-agent
-> [Thanks for non-commercial open source development authorization by JetBrains](https://www.jetbrains.com/?from=v2ray-agent)
+- [Thanks to JetBrains for providing non-commercial open source software development authorization](https://www.jetbrains.com/?from=v2ray-agent)
-> [Thanks for non-commercial open source development authorization by JetBrains]( https://www.jetbrains.com/?from=v2ray-agent)
-> [English Version](https://github.com/mack-a/v2ray-agent/blob/master/documents/en/README_EN.md)
+[](https://www.gnu.org/licenses/agpl-3.0)
+[](https://t.me/v2rayAgentChannel)
+[](https://t.me/technologyshare)
+[](https://www.v2ray-agent.com/)
+[](documents/en/README_EN.md)
-- [Cloudflare Optimization Solution](https://github.com/mack-a/v2ray-agent/blob/master/documents/optimize_V2Ray.md)
-- [Traffic Relay](https://github.com/mack-a/v2ray-agent/blob/master/documents/traffic_relay.md)
-- [manual self-build tutorial](https://github.com/mack-a/v2ray-agent/blob/master/documents/Cloudflare_install_manual.md)
-- [ssh introductory tutorial](https://www.v2ray-agent.com/2020-12-16-ssh%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B)
-
-- [TG group](https://t.me/technologyshare), [TG channel-update notification](https://t.me/v2rayAgentChannel), [blog address](https://www.v2ray-agent.com/)
-- **Please give a ⭐ support**
-
-* * *
-
-# Catalog
-
-- [1.Script installation](#1vlesstcptlsvlesswstlsvmesstcptlsvmesswstlstrojan-camouflage site-five-in-one coexistence script)
- - [Features](#Features)
- - [Notes](#Notes)
- - [Installation Script](#installation-script)
-
-* * *
-
-# 1.Eight-in-one coexistence script+ Mock Site
-
-- [Cloudflare Getting Started Tutorial](https://github.com/mack-a/v2ray-agent/blob/master/documents/cloudflare_init.md)
+Xray-core/sing-box One-click Quick Install Script
## Features
-- Support [Xray-core[XTLS]](https ://github.com/XTLS/Xray-core), [v2ray-core](https://github.com/v2fly/v2ray-core)
-- support VLESS/VMess/trojan protocol
-- supports VLESS/Trojan prepending [VLESS XTLS -> Trojan XTLS], [Trojan XTLS -> VLESS XTLS]
-- Support mutual reading of configuration files between different cores
-- Trojan+TCP+xtls-rprx-direct
-- Support Debian, Ubuntu, Centos systems and mainstream CPU architectures.
-- Support any combination of installation, support for multi-user management, support for DNS streaming media unlock, support for adding multiple ports, [support any door to unlock Netflix](https://github.com/mack-a/v2ray-agent/blob/master/documents/netflix/dokodemo-unblock_netflix.md)
-- support to keep tls certificate after uninstall
-- support for IPv6, [IPv6 note](https://github.com/mack-a/v2ray-agent/blob/master/documents/ipv6_help.md)
-- Support WARP offload, IPv6 offload
-- Support BT download management, log management, domain name blacklist management, core management, camouflage site management
-- [Support custom certificate installation](https://github.com/mack-a/v2ray-agent/blob/master/documents/install_tls.md)
-## Supported installation types
+* **Multi-core Support:** Supports Xray-core and sing-box.
+* **Multi-protocol Support:** Supports various protocols like VLESS, VMess, Trojan, Hysteria2, Tuic, NaiveProxy.
+* **Automatic TLS:** Automatically applies for and renews SSL certificates.
+* **Easy Management:** Provides a simple menu to manage users, ports, and configurations.
+* **Subscription Support:** Generates and manages subscription links.
+* **Traffic Splitting Management:** Provides wireguard, IPv6, Socks5, DNS, VMess(ws), SNI reverse proxy, which can be used to unlock streaming media, evade IP verification, etc.
+* **Target Domain Management:** Provides domain name blacklist management, which can be used to prohibit access to specified websites.
+* **BT Download Management:** Can be used to prohibit the download of P2P-related content.
+* **For more content, please visit the [Official Website](https://www.v2ray-agent.com/categories/jiao-cheng), [Backup](https://www.592083.com/categories/jiao-cheng)**
-- VLESS+TCP+TLS
-- VLESS+TCP+xtls-rprx-direct
-- VLESS+gRPC+TLS [support CDN, IPv6, delay Low]
-- VLESS+WS+TLS [support CDN, IPv6]
-- Trojan+TCP+TLS [**recommended**]
-- Trojan+gRPC+TLS [support CDN, IPv6, low latency]
-- VMess+WS+TLS [support CDN, IPv6]
+## Quick Start
-## Route recommendation
+### Installation
-- [CN2 GIA](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation_aff.md#1cn2-gia)
-- Shanghai CN2+HK
-- [AS9929]( https://github.com/mack-a/v2ray-agent/blob/master/documents/donation_aff.md#2%E8%81%94%E9%80%9A-as9929a%E7%BD%91)
-- [AS4837](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation_aff.md#3%E8%81%94%E9%80%9A-as4837%E6%99%AE%E9%80%9A%E6%B0%91%E7%94%A8%E7%BD%91)
-- [Unicom Japan Softbank](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation_aff.md#4%E8%81%94%E9%80%9A-%E6%97%A5%E6%9C%AC%E8%BD%AF%E9%93%B6)
-- Unicom+ Taiwan TFN
-- China Unicom+NTT
-- Guangzhou Mobile/Zhushift+HKIX/CMI/NTT
-- Guangzhou Mobile/CN2+Cloudflare+ Global
-- Guangzhou Mobile/CN2/South Union+Hong Kong AZ+Global
-- Transit+cloudflare+Landing Machine【Kela Global】
+```
+bash wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
+```
-## Precautions
+### Usage
-- **Modify Cloudflare->SSL/TLS->Overview->Full**
-- **Cloudflare ---> Clouds parsed by A record must be gray [if not gray, it will affect the automatic renewal certificate of scheduled tasks]**
-- **If you use CDN and direct connection at the same time, turn off Yunduo + self-selected IP, refer to the above [Cloudflare optimization plan](https://github.com/mack-a/v2ray-agent/blob/master/documents/optimize_V2Ray.md)**
-- **Use the pure system to install, if you have installed it with other scripts and you cannot modify the error yourself, please reinstall the system and try to install again**
-- wget: command not found [**Here you need to do it manually Install wget**]
- , if you have not used Linux, [click to view](https://github.com/mack-a/v2ray-agent/tree/master/documents/install_tools.md) installation tutorial
-- does not support non- root account
-- **If you find Nginx-related problems, please uninstall the self-compiled nginx or reinstall the system**
-- **In order to save time, please bring detailed screenshots or follow the template specifications for feedback, no screenshots or issues that do not follow the specifications Will be closed directly**
-- **Not recommended for GCP users**
-- **Oracle Cloud has an additional firewall that needs to be set manually**
-- **Centos and lower versions of the system are not recommended, if the Centos installation fails, please switch to Debian10 and try again, the script no longer supports Centos6 , Ubuntu 16.x**
-- **[If you don't understand the usage, please check the script usage guide first](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md)**
-- ** Oracle Cloud only supports Ubuntu**
-- **If you use gRPC to forward through cloudflare, you need to allow gRPC in cloudflare settings, path: cloudflare Network->gRPC**
-- **gRPC is currently in beta and may not work for the client you use Compatible, if you can't use it, please ignore **
-- ** The problem that the lower version script cannot be started when upgrading the higher version, [please click this link to view the solution](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md#4%E4%BD%8E%E7%89%88%E6%9C%AC%E5%8D%87%E7%BA%A7%E9%AB%98%E7%89%88%E6%9C%AC%E5%90%8E%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%E6%A0%B8%E5%BF%83)**
+After installation, run the following command to open the management menu again:
-## Donate
+```
+vasma
+```
-[You can use my AFF to buy VPS donation-blog](https://www.v2ray-agent.com/%E6%82%A8%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%E6%88%91%E7%9A%84AFF%E8%B4%AD%E4%B9%B0vps%E6%8D%90%E8%B5%A0)
+## Documentation and Guides
-[You can use my AFF to buy VPS donations - Github](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation_aff.md)
+* [From Beginner to Master with the 8-in-1 Script](https://www.v2ray-agent.com/archives/1710141233)
+* [Quick Script Setup Tutorial](https://www.v2ray-agent.com/archives/1682491479771)
+* [Script Usage Precautions](https://www.v2ray-agent.com/archives/1679931532764)
+* [Script Exception Handling](https://www.v2ray-agent.com/archives/1684115970026)
+* [VPS Purchasing Guide](https://www.v2ray-agent.com/archives/1679975663984)
+* [Junk VPS Savior, one-click setup of the latest hysteria2 protocol](https://www.v2ray-agent.com/archives/1697162969693)
+* [RackNerd Low-cost Unicom AS4837 Package, starting from $10/year](https://www.v2ray-agent.com/archives/racknerdtao-can-zheng-li-nian-fu-10mei-yuan)
+* [Recommended High-Quality Bandwagon Host Packages](https://www.v2ray-agent.com/archives/2023nian-ban-wa-gong-ji-fang-tui-jian)
+* [Recommended High-Quality DMIT Packages](https://www.v2ray-agent.com/archives/1679159868033)
-[Support donations to me via virtual currency](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation.md)
+## Community & Support
-## Installation script
+* **Telegram:** [Channel](https://t.me/v2rayAgentChannel) | [Group](https://t.me/technologyshare)
+* **Website:** [Official](https://www.v2ray-agent.com/) | [Backup](https://www.592083.xyz/)
+* **Feedback:** [Submit an issue](https://github.com/mack-a/v2ray-agent/issues)
-- supports shortcut startup, after installation, enter [**vasma**] in the shell You can open the script, the script execution path [**/etc/v2ray-agent/install.sh**]
+## Donation
-- Latest Version [recommended]
+Thank you for your attention and support for this open source project. If you find this project helpful, you are welcome to donate in the following ways.
-```
-wget -P/root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/shell/install_en.sh" && mv /root/install_en.sh /root/install.sh && chmod 700 /root/install.sh &&/root/install.sh
-```
+* [Donate by purchasing a VPS](https://www.v2ray-agent.com/categories/vps)
+* [Donate to me via cryptocurrency](https://www.v2ray-agent.com/1679123834836)
+## License
-# example image
-
-
-
-# licence
-
-[AGPL-3.0](https://github.com/mack-a/v2ray-agent/blob/master/LICENSE)
-
-## Stargazers over time
-
-[](https://starchart.cc/mack-a/v2ray-agent)
+This project is licensed under the [AGPL-3.0 License](LICENSE).
diff --git a/install.sh b/install.sh
index 9a63fda..d7f710f 100644
--- a/install.sh
+++ b/install.sh
@@ -699,7 +699,7 @@ allowPort() {
type=tcp
fi
# 如果防火墙启动状态则添加相应的开放端口
- if systemctl status ufw 2>/dev/null | grep -q "active (exited)"; then
+ if dpkg -l | grep -q "^[[:space:]]*ii[[:space:]]\+ufw"; then
if ufw status | grep -q "Status: active"; then
if ! ufw status | grep -q "$1/${type}"; then
sudo ufw allow "$1/${type}"
@@ -728,7 +728,7 @@ allowPort() {
checkUFWAllowPort "$1"
fi
fi
- elif systemctl status netfilter-persistent 2>/dev/null | grep -q "active (exited)"; then
+ elif dpkg -l | grep -q "^[[:space:]]*ii[[:space:]]\+netfilter-persistent" && systemctl status netfilter-persistent 2>/dev/null | grep -q "active (exited)"; then
local updateFirewalldStatus=
if ! iptables -L | grep -q "$1/${type}(mack-a)"; then
updateFirewalldStatus=true
@@ -4226,7 +4226,8 @@ initXrayConfig() {
if [[ -n "${uuid}" ]]; then
currentClients='[{"id":"'${uuid}'","add":"'${add}'","flow":"xtls-rprx-vision","email":"'${customEmail}'"}]'
- echoContent yellow "\n ${customEmail}:${uuid}"
+ echoContent green "\n ${customEmail}:${uuid}"
+ echo
fi
# log
@@ -5380,12 +5381,10 @@ EOF
publicKey=${singBoxVLESSRealityPublicKey}
fi
echoContent yellow " ---> 通用格式(VLESS+reality+uTLS+Vision)"
- # &pqv=${realityMldsa65Verify}
- echoContent green " vless://${id}@$(getPublicIP):${port}?encryption=none&security=reality&type=tcp&sni=${realityServerName}&fp=chrome&pbk=${publicKey}&sid=6ba85179e30d4fc2&flow=xtls-rprx-vision#${email}\n"
+ echoContent green " vless://${id}@$(getPublicIP):${port}?encryption=none&security=reality&pqv=${realityMldsa65Verify}&type=tcp&sni=${realityServerName}&fp=chrome&pbk=${publicKey}&sid=6ba85179e30d4fc2&flow=xtls-rprx-vision#${email}\n"
echoContent yellow " ---> 格式化明文(VLESS+reality+uTLS+Vision)"
- # ,pqv=${realityMldsa65Verify}
- echoContent green "协议类型:VLESS reality,地址:$(getPublicIP),publicKey:${publicKey},shortId: 6ba85179e30d4fc2,serverNames:${realityServerName},端口:${port},用户ID:${id},传输方式:tcp,账户名:${email}\n"
+ echoContent green "协议类型:VLESS reality,地址:$(getPublicIP),publicKey:${publicKey},shortId: 6ba85179e30d4fc2,pqv=${realityMldsa65Verify},serverNames:${realityServerName},端口:${port},用户ID:${id},传输方式:tcp,账户名:${email}\n"
cat <>"/etc/v2ray-agent/subscribe_local/default/${user}"
vless://${id}@$(getPublicIP):${port}?encryption=none&security=reality&pqv=${realityMldsa65Verify}&type=tcp&sni=${realityServerName}&fp=chrome&pbk=${publicKey}&sid=6ba85179e30d4fc2&flow=xtls-rprx-vision#${email}
EOF
@@ -9223,7 +9222,6 @@ subscribe() {
echoContent skyBlue "-------------------------备注---------------------------------"
echoContent yellow "# 查看订阅会重新生成本地账号的订阅"
- # echoContent yellow "# 添加账号或者修改账号需要重新查看订阅才会重新生成对外访问的订阅内容"
echoContent red "# 需要手动输入md5加密的salt值,如果不了解使用随机即可"
echoContent yellow "# 不影响已添加的远程订阅的内容\n"
@@ -9486,30 +9484,37 @@ initRealityKey() {
# 初始化 mldsa65Seed
initRealityMldsa65() {
echoContent skyBlue "\n生成Reality mldsa65\n"
- if [[ -n "${currentRealityMldsa65}" && -z "${lastInstallationConfig}" ]]; then
- read -r -p "读取到上次安装记录,是否使用上次安装时的Seed/Verify ?[y/n]:" historyMldsa65Status
- if [[ "${historyMldsa65Status}" == "y" ]]; then
- realityMldsa65Seed=${currentRealityMldsa65Seed}
- realityMldsa65Verify=${currentRealityMldsa65Verify}
+ if /etc/v2ray-agent/xray/xray tls ping "${realityServerName}:${realityDomainPort}" 2>/dev/null | grep -q "X25519MLKEM768"; then
+ length=$(/etc/v2ray-agent/xray/xray tls ping "${realityServerName}:${realityDomainPort}" | grep "Certificate chain's total length:" | awk '{print $5}')
+ if [ "$length" -gt 3500 ]; then
+ if [[ -n "${currentRealityMldsa65}" && -z "${lastInstallationConfig}" ]]; then
+ read -r -p "读取到上次安装记录,是否使用上次安装时的Seed/Verify ?[y/n]:" historyMldsa65Status
+ if [[ "${historyMldsa65Status}" == "y" ]]; then
+ realityMldsa65Seed=${currentRealityMldsa65Seed}
+ realityMldsa65Verify=${currentRealityMldsa65Verify}
+ fi
+ elif [[ -n "${currentRealityMldsa65Seed}" && -n "${lastInstallationConfig}" ]]; then
+ realityMldsa65Seed=${currentRealityMldsa65Seed}
+ realityMldsa65Verify=${currentRealityMldsa65Verify}
+ fi
+ if [[ -z "${realityMldsa65Seed}" ]]; then
+ # if [[ "${selectCoreType}" == "2" || "${coreInstallType}" == "2" ]]; then
+ # realityX25519Key=$(/etc/v2ray-agent/sing-box/sing-box generate reality-keypair)
+ # realityPrivateKey=$(echo "${realityX25519Key}" | head -1 | awk '{print $2}')
+ # realityPublicKey=$(echo "${realityX25519Key}" | tail -n 1 | awk '{print $2}')
+ # echo "publicKey:${realityPublicKey}" >/etc/v2ray-agent/sing-box/conf/config/reality_key
+ # else
+ realityMldsa65=$(/etc/v2ray-agent/xray/xray mldsa65)
+ realityMldsa65Seed=$(echo "${realityMldsa65}" | head -1 | awk '{print $2}')
+ realityMldsa65Verify=$(echo "${realityMldsa65}" | tail -n 1 | awk '{print $2}')
+ # fi
+ fi
+ # echoContent green "\n Seed:${realityMldsa65Seed}"
+ # echoContent green "\n Verify:${realityMldsa65Verify}"
fi
- elif [[ -n "${currentRealityMldsa65Seed}" && -n "${lastInstallationConfig}" ]]; then
- realityMldsa65Seed=${currentRealityMldsa65Seed}
- realityMldsa65Verify=${currentRealityMldsa65Verify}
+ else
+ echoContent green " 目标域名不支持X25519MLKEM768,忽略ML-DSA-65。"
fi
- if [[ -z "${realityMldsa65Seed}" ]]; then
- # if [[ "${selectCoreType}" == "2" || "${coreInstallType}" == "2" ]]; then
- # realityX25519Key=$(/etc/v2ray-agent/sing-box/sing-box generate reality-keypair)
- # realityPrivateKey=$(echo "${realityX25519Key}" | head -1 | awk '{print $2}')
- # realityPublicKey=$(echo "${realityX25519Key}" | tail -n 1 | awk '{print $2}')
- # echo "publicKey:${realityPublicKey}" >/etc/v2ray-agent/sing-box/conf/config/reality_key
- # else
- realityMldsa65=$(/etc/v2ray-agent/xray/xray mldsa65)
- realityMldsa65Seed=$(echo "${realityMldsa65}" | head -1 | awk '{print $2}')
- realityMldsa65Verify=$(echo "${realityMldsa65}" | tail -n 1 | awk '{print $2}')
- # fi
- fi
-# echoContent green "\n Seed:${realityMldsa65Seed}"
-# echoContent green "\n Verify:${realityMldsa65Verify}"
}
# 检查reality域名是否符合
checkRealityDest() {
@@ -9669,8 +9674,8 @@ initXrayRealityConfig() {
echoContent skyBlue "\n进度 $1/${totalProgress} : 初始化 Xray-core reality配置"
initXrayRealityPort
initRealityKey
- initRealityMldsa65
initRealityClientServersName
+ initRealityMldsa65
}
# 修改reality域名端口等信息
updateXrayRealityConfig() {
@@ -9937,7 +9942,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者:mack-a"
- echoContent green "当前版本:v3.4.22"
+ echoContent green "当前版本:v3.4.23"
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus