feat(脚本): 修复ML-DSA-65 无法访问问题、修改README

master
mack-a 2025-08-16 16:41:06 +08:00
parent 144f06ebf1
commit e1ff4d189d
4 changed files with 128 additions and 209 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
.idea .idea
fodder/.DS_Store fodder/.DS_Store
.DS_Store .DS_Store
GEMINI.md
GEMINI.zh-CN.md

124
README.md
View File

@ -1,107 +1,69 @@
# Xray-core/sing-box 一键脚本快速安装 # v2ray-agent
- [感谢 JetBrains 提供的非商业开源软件开发授权](https://www.jetbrains.com/?from=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)
- **请给个⭐支持一下** [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Telegram Channel](https://img.shields.io/badge/Telegram-Channel-blue)](https://t.me/v2rayAgentChannel)
[![Telegram Group](https://img.shields.io/badge/Telegram-Group-blue)](https://t.me/technologyshare)
[![Official Website](https://img.shields.io/badge/Website-v2ray--agent.com-blue)](https://www.v2ray-agent.com/)
[![English Version](https://img.shields.io/badge/English-Version-blue)](documents/en/README_EN.md)
# 一、项目介绍 Xray-core/sing-box 一键脚本快速安装
## 核心
- 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, VMess, Trojan, Hysteria2, Tuic, NaiveProxy 等多种协议.
- [支持无域名版本的VLESS Reality搭建](https://www.v2ray-agent.com/archives/1708584312877) * **自动TLS:** 自动申请和续订 SSL 证书.
- [支持多种分流用于解锁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) * **订阅支持:** 生成和管理订阅链接.
- 支持普通证书和通配符证书自动申请及更新 * **分流管理:** 提供wireguard、IPv6、Socks5、DNS、VMess(ws)、SNI反向代理可用于解锁流媒体、规避IP验证等作用.
- [支持订阅以及多VPS组合订阅](https://www.v2ray-agent.com/archives/1681804748677) * **目标域名管理:** 提供域名黑名单管理,可用于禁止访问指定网站.
- 支持批量新增端口[仅支持Xray-core] * **BT下载管理:** 可用于禁止下载P2P相关内容.
- 支持核心的升级以及回退 * **更多内容请访问[官方网站](https://www.v2ray-agent.com/categories/jiao-cheng)、[备用](https://www.592083.com/categories/jiao-cheng)**
- 支持自主更换伪装站点
- 支持BT下载管理以及域名黑名单管理
# 二、使用指南 ## 快速开始
- [八合一脚本从入门到精通](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) 授权.

View File

@ -1,119 +1,69 @@
# v2ray-agent # 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) [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Telegram Channel](https://img.shields.io/badge/Telegram-Channel-blue)](https://t.me/v2rayAgentChannel)
[![Telegram Group](https://img.shields.io/badge/Telegram-Group-blue)](https://t.me/technologyshare)
[![Official Website](https://img.shields.io/badge/Website-v2ray--agent.com-blue)](https://www.v2ray-agent.com/)
[![English Version](https://img.shields.io/badge/English-Version-blue)](documents/en/README_EN.md)
- [Cloudflare Optimization Solution](https://github.com/mack-a/v2ray-agent/blob/master/documents/optimize_V2Ray.md) Xray-core/sing-box One-click Quick Install Script
- [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)
## Features ## 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 ## Quick Start
- 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]
## 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】
## Precautions
- **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)**
## Donate
[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)
[You can use my AFF to buy VPS donations - Github](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation_aff.md)
[Support donations to me via virtual currency](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation.md)
## Installation script
- supports shortcut startup, after installation, enter [**vasma**] in the shell You can open the script, the script execution path [**/etc/v2ray-agent/install.sh**]
- Latest Version [recommended]
``` ```
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 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
``` ```
### Usage
# example image After installation, run the following command to open the management menu again:
<img src="https://raw.githubusercontent.com/mack-a/v2ray-agent/master/fodder/install/install.jpg" width=700> ```
vasma
```
# licence ## Documentation and Guides
[AGPL-3.0](https://github.com/mack-a/v2ray-agent/blob/master/LICENSE) * [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)
## Stargazers over time ## Community & Support
[![Stargazers over time](https://starchart.cc/mack-a/v2ray-agent.svg)](https://starchart.cc/mack-a/v2ray-agent) * **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)
## Donation
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.
* [Donate by purchasing a VPS](https://www.v2ray-agent.com/categories/vps)
* [Donate to me via cryptocurrency](https://www.v2ray-agent.com/1679123834836)
## License
This project is licensed under the [AGPL-3.0 License](LICENSE).

View File

@ -699,7 +699,7 @@ allowPort() {
type=tcp type=tcp
fi 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 "Status: active"; then
if ! ufw status | grep -q "$1/${type}"; then if ! ufw status | grep -q "$1/${type}"; then
sudo ufw allow "$1/${type}" sudo ufw allow "$1/${type}"
@ -728,7 +728,7 @@ allowPort() {
checkUFWAllowPort "$1" checkUFWAllowPort "$1"
fi fi
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= local updateFirewalldStatus=
if ! iptables -L | grep -q "$1/${type}(mack-a)"; then if ! iptables -L | grep -q "$1/${type}(mack-a)"; then
updateFirewalldStatus=true updateFirewalldStatus=true
@ -4226,7 +4226,8 @@ initXrayConfig() {
if [[ -n "${uuid}" ]]; then if [[ -n "${uuid}" ]]; then
currentClients='[{"id":"'${uuid}'","add":"'${add}'","flow":"xtls-rprx-vision","email":"'${customEmail}'"}]' currentClients='[{"id":"'${uuid}'","add":"'${add}'","flow":"xtls-rprx-vision","email":"'${customEmail}'"}]'
echoContent yellow "\n ${customEmail}:${uuid}" echoContent green "\n ${customEmail}:${uuid}"
echo
fi fi
# log # log
@ -5380,12 +5381,10 @@ EOF
publicKey=${singBoxVLESSRealityPublicKey} publicKey=${singBoxVLESSRealityPublicKey}
fi fi
echoContent yellow " ---> 通用格式(VLESS+reality+uTLS+Vision)" echoContent yellow " ---> 通用格式(VLESS+reality+uTLS+Vision)"
# &pqv=${realityMldsa65Verify} 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 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 yellow " ---> 格式化明文(VLESS+reality+uTLS+Vision)" echoContent yellow " ---> 格式化明文(VLESS+reality+uTLS+Vision)"
# pqv=${realityMldsa65Verify} echoContent green "协议类型:VLESS reality地址:$(getPublicIP)publicKey:${publicKey}shortId: 6ba85179e30d4fc2pqv=${realityMldsa65Verify}serverNames${realityServerName},端口:${port}用户ID:${id},传输方式:tcp账户名:${email}\n"
echoContent green "协议类型:VLESS reality地址:$(getPublicIP)publicKey:${publicKey}shortId: 6ba85179e30d4fc2serverNames${realityServerName},端口:${port}用户ID:${id},传输方式:tcp账户名:${email}\n"
cat <<EOF >>"/etc/v2ray-agent/subscribe_local/default/${user}" cat <<EOF >>"/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} 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 EOF
@ -9223,7 +9222,6 @@ subscribe() {
echoContent skyBlue "-------------------------备注---------------------------------" echoContent skyBlue "-------------------------备注---------------------------------"
echoContent yellow "# 查看订阅会重新生成本地账号的订阅" echoContent yellow "# 查看订阅会重新生成本地账号的订阅"
# echoContent yellow "# 添加账号或者修改账号需要重新查看订阅才会重新生成对外访问的订阅内容"
echoContent red "# 需要手动输入md5加密的salt值如果不了解使用随机即可" echoContent red "# 需要手动输入md5加密的salt值如果不了解使用随机即可"
echoContent yellow "# 不影响已添加的远程订阅的内容\n" echoContent yellow "# 不影响已添加的远程订阅的内容\n"
@ -9486,30 +9484,37 @@ initRealityKey() {
# 初始化 mldsa65Seed # 初始化 mldsa65Seed
initRealityMldsa65() { initRealityMldsa65() {
echoContent skyBlue "\n生成Reality mldsa65\n" echoContent skyBlue "\n生成Reality mldsa65\n"
if [[ -n "${currentRealityMldsa65}" && -z "${lastInstallationConfig}" ]]; then if /etc/v2ray-agent/xray/xray tls ping "${realityServerName}:${realityDomainPort}" 2>/dev/null | grep -q "X25519MLKEM768"; then
read -r -p "读取到上次安装记录是否使用上次安装时的Seed/Verify [y/n]:" historyMldsa65Status length=$(/etc/v2ray-agent/xray/xray tls ping "${realityServerName}:${realityDomainPort}" | grep "Certificate chain's total length:" | awk '{print $5}')
if [[ "${historyMldsa65Status}" == "y" ]]; then if [ "$length" -gt 3500 ]; then
realityMldsa65Seed=${currentRealityMldsa65Seed} if [[ -n "${currentRealityMldsa65}" && -z "${lastInstallationConfig}" ]]; then
realityMldsa65Verify=${currentRealityMldsa65Verify} 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 fi
elif [[ -n "${currentRealityMldsa65Seed}" && -n "${lastInstallationConfig}" ]]; then else
realityMldsa65Seed=${currentRealityMldsa65Seed} echoContent green " 目标域名不支持X25519MLKEM768忽略ML-DSA-65。"
realityMldsa65Verify=${currentRealityMldsa65Verify}
fi 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域名是否符合 # 检查reality域名是否符合
checkRealityDest() { checkRealityDest() {
@ -9669,8 +9674,8 @@ initXrayRealityConfig() {
echoContent skyBlue "\n进度 $1/${totalProgress} : 初始化 Xray-core reality配置" echoContent skyBlue "\n进度 $1/${totalProgress} : 初始化 Xray-core reality配置"
initXrayRealityPort initXrayRealityPort
initRealityKey initRealityKey
initRealityMldsa65
initRealityClientServersName initRealityClientServersName
initRealityMldsa65
} }
# 修改reality域名端口等信息 # 修改reality域名端口等信息
updateXrayRealityConfig() { updateXrayRealityConfig() {
@ -9937,7 +9942,7 @@ menu() {
cd "$HOME" || exit cd "$HOME" || exit
echoContent red "\n==============================================================" echoContent red "\n=============================================================="
echoContent green "作者mack-a" echoContent green "作者mack-a"
echoContent green "当前版本v3.4.22" echoContent green "当前版本v3.4.23"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent" echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c" echoContent green "描述:八合一共存脚本\c"
showInstallStatus showInstallStatus