From 197ec1f296ed98af676ead46851775383470da5c Mon Sep 17 00:00:00 2001 From: yunshu Date: Tue, 5 Aug 2025 23:06:48 +0800 Subject: [PATCH] Update server location instructions and improve install.sh logic README and translations updated to generalize server location from 'outside China' to 'overseas' or equivalent in multiple languages. install.sh updated to version 2.6.2, with improved logic for ws/grpc mode handling, conditional VLESS link generation, and removal of multi_user from config when deleting original config. These changes enhance clarity and configuration accuracy. --- README.md | 2 +- install.sh | 29 +++++++++++++++++------------ languages/en/README.md | 2 +- languages/fa/README.md | 2 +- languages/fr/README.md | 2 +- languages/ko/README.md | 2 +- languages/ru/README.md | 2 +- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 7230673..f1b0373 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ ## 准备工作 -* 准备一个服务器,在中国大陆境外运行、有公网ip。 +* 准备一个服务器,在境外运行、有公网ip。 * 安装 Reality 协议的,找好一个符合 Xray 要求的域名。 * 安装 TLS 版本的,准备一个域名,并将 A记录 添加好。 * 阅读[Xray官方说明](https://xtls.github.io),大概了解 Reality TLS WebSocket gRPC 及 Xray 相关信息,了解 Reality target 的域名要求。 diff --git a/install.sh b/install.sh index cea4693..0c66e0a 100644 --- a/install.sh +++ b/install.sh @@ -35,7 +35,7 @@ OK="${Green}[OK]${Font}" Error="${RedW}[$(gettext "错误")]${Font}" Warning="${RedW}[$(gettext "警告")]${Font}" -shell_version="2.6.1" +shell_version="2.6.2" shell_mode="$(gettext "未安装")" tls_mode="None" ws_grpc_mode="None" @@ -488,6 +488,7 @@ xray_reality_add_more_choose() { ;; *) reality_add_more="off" + ws_grpc_mode="None" ws_inbound_port_set grpc_inbound_port_set ws_path_set @@ -519,7 +520,7 @@ ws_grpc_qr() { ws_inbound_port_set() { if [[ "on" != ${old_config_status} ]]; then - if [[ ${ws_grpc_mode} == "onlyws" ]] || [[ ${ws_grpc_mode} == "all" ]]; then + if [[ ${ws_grpc_mode} == "onlyws" || ${ws_grpc_mode} == "all" ]] && [[ ${reality_add_more} != "off" ]]; then echo log_echo "${GreenBG} $(gettext "是否需要自定义") ws inbound_port [Y/${Red}N${Font}${GreenBG}]? ${Font}" read -r inbound_port_modify_fq @@ -541,7 +542,7 @@ ws_inbound_port_set() { grpc_inbound_port_set() { if [[ "on" != ${old_config_status} ]]; then - if [[ ${ws_grpc_mode} == "onlygRPC" ]] || [[ ${ws_grpc_mode} == "all" ]]; then + if [[ ${ws_grpc_mode} == "onlygRPC" || ${ws_grpc_mode} == "all" ]] && [[ ${reality_add_more} != "off" ]]; then echo log_echo "${GreenBG} $(gettext "是否需要自定义") gRPC inbound_port [Y/${Red}N${Font}${GreenBG}]? ${Font}" read -r inbound_port_modify_fq @@ -622,7 +623,7 @@ firewall_set() { ws_path_set() { if [[ "on" != ${old_config_status} ]] || [[ ${change_ws_path} == "yes" ]]; then - if [[ ${ws_grpc_mode} == "onlyws" ]] || [[ ${ws_grpc_mode} == "all" ]]; then + if [[ ${ws_grpc_mode} == "onlyws" || ${ws_grpc_mode} == "all" ]] && [[ ${reality_add_more} != "off" ]]; then echo log_echo "${GreenBG} $(gettext "是否需要自定义") ws $(gettext "伪装路径") [Y/${Red}N${Font}${GreenBG}]? ${Font}" read -r path_modify_fq @@ -655,7 +656,7 @@ ws_path_set() { grpc_path_set() { if [[ "on" != ${old_config_status} ]] || [[ ${change_grpc_path} == "yes" ]]; then - if [[ ${ws_grpc_mode} == "onlygRPC" ]] || [[ ${ws_grpc_mode} == "all" ]]; then + if [[ ${ws_grpc_mode} == "onlygRPC" || ${ws_grpc_mode} == "all" ]] && [[ ${reality_add_more} != "off" ]]; then echo log_echo "${GreenBG} $(gettext "是否需要自定义") gRPC $(gettext "伪装路径") [Y/${Red}N${Font}${GreenBG}]? ${Font}" read -r path_modify_fq @@ -1681,6 +1682,8 @@ xray_conf_add() { case $save_originxray_fq in [nN][oO] | [nN]) rm -rf ${xray_conf} + jq 'del(.multi_user)' "${xray_qr_config_file}" > "${xray_qr_config_file}.tmp" + mv "${xray_qr_config_file}.tmp" "${xray_qr_config_file}" log_echo "${OK} ${GreenBG} $(gettext "原配置文件已删除")! ${Font}" xray_conf_add ;; @@ -2353,13 +2356,15 @@ vless_qr_link_image() { fi elif [[ ${tls_mode} == "Reality" ]]; then vless_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction port)?security=reality&flow=xtls-rprx-vision&fp=chrome&pbk=$(info_extraction publicKey)&sni=$(info_extraction serverNames)&target=$(info_extraction target)&sid=$(info_extraction shortIds)#$(vless_urlquote $(info_extraction host))+Reality%E5%8D%8F%E8%AE%AE" - if [[ ${ws_grpc_mode} == "onlyws" ]]; then - vless_ws_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction ws_port)?path=%2f$(vless_urlquote $(info_extraction path))%3Fed%3D2048&encryption=none&type=ws#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADws%E5%8D%8F%E8%AE%AE" - elif [[ ${ws_grpc_mode} == "onlygRPC" ]]; then - vless_grpc_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction grpc_port)?serviceName=$(vless_urlquote $(info_extraction serviceName))&encryption=none&type=grpc#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADgrpc%E5%8D%8F%E8%AE%AE" - elif [[ ${ws_grpc_mode} == "all" ]]; then - vless_ws_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction ws_port)?path=%2f$(vless_urlquote $(info_extraction path))%3Fed%3D2048&encryption=none&type=ws#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADws%E5%8D%8F%E8%AE%AE" - vless_grpc_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction grpc_port)?serviceName=$(vless_urlquote $(info_extraction serviceName))&encryption=none&type=grpc#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADgrpc%E5%8D%8F%E8%AE%AE" + if [[ ${reality_add_more} == "on" ]]; then + if [[ ${ws_grpc_mode} == "onlyws" ]]; then + vless_ws_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction ws_port)?path=%2f$(vless_urlquote $(info_extraction path))%3Fed%3D2048&encryption=none&type=ws#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADws%E5%8D%8F%E8%AE%AE" + elif [[ ${ws_grpc_mode} == "onlygRPC" ]]; then + vless_grpc_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction grpc_port)?serviceName=$(vless_urlquote $(info_extraction serviceName))&encryption=none&type=grpc#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADgrpc%E5%8D%8F%E8%AE%AE" + elif [[ ${ws_grpc_mode} == "all" ]]; then + vless_ws_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction ws_port)?path=%2f$(vless_urlquote $(info_extraction path))%3Fed%3D2048&encryption=none&type=ws#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADws%E5%8D%8F%E8%AE%AE" + vless_grpc_link="vless://$(info_extraction id)@$(vless_urlquote $(info_extraction host)):$(info_extraction grpc_port)?serviceName=$(vless_urlquote $(info_extraction serviceName))&encryption=none&type=grpc#$(vless_urlquote $(info_extraction host))+%E5%8D%95%E7%8B%ADgrpc%E5%8D%8F%E8%AE%AE" + fi fi elif [[ ${tls_mode} == "None" ]]; then if [[ ${ws_grpc_mode} == "onlyws" ]]; then diff --git a/languages/en/README.md b/languages/en/README.md index 78ee127..566bbda 100644 --- a/languages/en/README.md +++ b/languages/en/README.md @@ -26,7 +26,7 @@ ## Preparation -* Prepare a server running outside China with a public IP. +* Prepare a server to be operated overseas, with a public IP address. * If installing Reality protocol, find a domain name that meets Xray's requirements. * If installing TLS version, prepare a domain name and add an A record. * Read the [Xray official documentation](https://xtls.github.io) to understand Reality TLS WebSocket gRPC and related information about Xray, including the domain name requirements for Reality target. diff --git a/languages/fa/README.md b/languages/fa/README.md index 0c32eaf..e25ddaf 100644 --- a/languages/fa/README.md +++ b/languages/fa/README.md @@ -26,7 +26,7 @@ ## آمادگی -* یک سرور آماده کنید که خارج از چین عمل می‌کند و IP عمومی دارد. +* یک سرور آماده کنید که در خارج از کشور فعالیت کند و دارای آدرس آی‌پی عمومی باشد. * برای نصب پروتکل Reality، یک دامنه را که به الزم معیارهای Xray منطبق است پیدا کنید. * برای نسخه TLS، یک دامنه آماده کنید و رکورد A را اضافه کنید. * [مستندات رسمی Xray](https://xtls.github.io) را بخوانید تا به طور کلی اطلاعات مربوط به Reality TLS WebSocket gRPC و اطلاعات مرتبط با Xray را واقع شوید و نیازهای دامنه برای هدف Reality را بشناسید. diff --git a/languages/fr/README.md b/languages/fr/README.md index 3cd5bea..eafa021 100644 --- a/languages/fr/README.md +++ b/languages/fr/README.md @@ -26,7 +26,7 @@ ## Préparation -* Préparer un serveur fonctionnant en dehors de la Chine continentale, disposant d'une IP publique. +* Préparez un serveur, qui fonctionnera à l'étranger et aura une adresse IP publique. * Pour l'installation de Reality, trouver un domaine conforme aux exigences de Xray. * Pour l'installation avec TLS, préparer un domaine et configurer correctement son enregistrement A. * Lire la documentation officielle de [Xray](https://xtls.github.io), pour comprendre les protocoles Reality, TLS, WebSocket, gRPC ainsi que les exigences sur le domaine utilisé pour Reality. diff --git a/languages/ko/README.md b/languages/ko/README.md index 83a4793..9a0da10 100644 --- a/languages/ko/README.md +++ b/languages/ko/README.md @@ -26,7 +26,7 @@ ## 준비 작업 -* 중국 외부에서 실행되는 서버, 공인 IP가 필요합니다. +* 서버를 준비하여, 해외에서 운영하고 공인 IP를 확보하십시오. * Reality 프로토콜 설치 시, Xray 요구 사항을 충족하는 도메인이 필요합니다. * TLS 버전 설치 시, 도메인이 필요하며 A레코드를 추가해야 합니다. * [Xray 공식 설명서](https://xtls.github.io)를 읽고 Reality TLS WebSocket gRPC 및 Xray 관련 정보를 이해하고, Reality target 도메인 요구 사항을 확인하세요. diff --git a/languages/ru/README.md b/languages/ru/README.md index d428ba4..32a4575 100644 --- a/languages/ru/README.md +++ b/languages/ru/README.md @@ -26,7 +26,7 @@ ## Подготовка -* Подготовьте сервер, запущенный за пределами Китая с публичным IP. +* Подготовьте сервер, который будет работать за границей и будет иметь публичный IP-адрес. * Если вы устанавливаете протокол Reality, найдите доменное имя, соответствующее требованиям Xray. * Если вы устанавливаете версию с TLS, подготовьте доменное имя и добавьте запись A. * Прочитайте [официальную документацию Xray](https://xtls.github.io), чтобы понять протоколы Reality TLS WebSocket gRPC и информацию о Xray, а также требования к доменному имени для целевого объекта Reality.