diff --git a/README.MD b/README.MD index 874128c..b4af288 100644 --- a/README.MD +++ b/README.MD @@ -1,5 +1,5 @@ -## Xray 基于 Nginx 的 VLESS + XTLS 一键安装脚本 Project_Xray +## Xray 基于 Nginx 的 VLESS + XTLS 一键安装脚本 Project_Xray > 感谢 JetBrains 提供的非商业开源软件开发授权! @@ -18,7 +18,7 @@ VLESS + XTLS + nginx + Web ``` -wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/Xray_onekey/xray/install.sh" && chmod +x install.sh && bash install.sh +wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/Xray_onekey/main/install.sh" && chmod +x install.sh && bash install.sh ``` ### 注意事项 diff --git a/install.sh b/install.sh index fe12cac..66c8b19 100644 --- a/install.sh +++ b/install.sh @@ -24,8 +24,8 @@ OK="${Green}[OK]${Font}" ERROR="${Red}[ERROR]${Font}" # 变量 -shell_version="1.1.0" -github_branch="xray" +shell_version="1.1.1" +github_branch="main" version_cmp="/tmp/version_cmp.tmp" xray_conf_dir="/usr/local/etc/xray" website_dir="/www/xray_web/" @@ -70,7 +70,7 @@ function system_check() { if [[ "${ID}" == "centos" && ${VERSION_ID} -ge 7 ]]; then print_ok "当前系统为 Centos ${VERSION_ID} ${VERSION}" INS="yum install -y" - wget -N -P /etc/yum.repos.d/ https://raw.githubusercontent.com/wulabing/Xray_onekey/xray/basic/nginx.repo + wget -N -P /etc/yum.repos.d/ https://raw.githubusercontent.com/wulabing/Xray_onekey/${github_branch}/basic/nginx.repo elif [[ "${ID}" == "debian" && ${VERSION_ID} -ge 9 ]]; then print_ok "当前系统为 Debian ${VERSION_ID} ${VERSION}" INS="apt install -y" @@ -168,7 +168,7 @@ function dependency_install() { ${INS} jq if ! command -v jq; then - wget -P /usr/bin https://raw.githubusercontent.com/wulabing/Xray_onekey/xray/binary/jq && chmod +x /usr/bin/jq + wget -P /usr/bin https://raw.githubusercontent.com/wulabing/Xray_onekey/${github_branch}/binary/jq && chmod +x /usr/bin/jq judge "安装 jq" fi } @@ -228,7 +228,7 @@ function port_exist_check() { fi } function update_sh() { - ol_version=$(curl -L -s https://raw.githubusercontent.com/wulabing/Xray_onekey/main/install.sh | grep "shell_version=" | head -1 | awk -F '=|"' '{print $3}') + ol_version=$(curl -L -s https://raw.githubusercontent.com/wulabing/Xray_onekey/${github_branch}/install.sh | grep "shell_version=" | head -1 | awk -F '=|"' '{print $3}') echo "$ol_version" >$version_cmp echo "$shell_version" >>$version_cmp if [[ "$shell_version" != "$(sort -rV $version_cmp | head -1)" ]]; then @@ -236,7 +236,7 @@ function update_sh() { read -r update_confirm case $update_confirm in [yY][eE][sS] | [yY]) - wget -N --no-check-certificate https://raw.githubusercontent.com/wulabing/Xray_onekey/main/install.sh + wget -N --no-check-certificate https://raw.githubusercontent.com/wulabing/Xray_onekey/${github_branch}/install.sh print_ok "更新完成" exit 0 ;; @@ -271,7 +271,7 @@ function modify_tls_version() { function configure_nginx() { nginx_conf="/etc/nginx/conf.d/${domain}.conf" - cd /etc/nginx/conf.d/ && rm -f ${domain}.conf && wget -O ${domain}.conf https://raw.githubusercontent.com/wulabing/Xray_onekey/xray/config/web.conf + cd /etc/nginx/conf.d/ && rm -f ${domain}.conf && wget -O ${domain}.conf https://raw.githubusercontent.com/wulabing/Xray_onekey/${github_branch}/config/web.conf sed -i "/server_name/c \\\tserver_name ${domain};" ${nginx_conf} judge "Nginx config modify" @@ -308,7 +308,7 @@ function modify_port() { } function configure_xray() { - cd /usr/local/etc/xray && rm -f config.json && wget -O config.json https://raw.githubusercontent.com/wulabing/Xray_onekey/xray/config/xray_xtls-rprx-direct.json + cd /usr/local/etc/xray && rm -f config.json && wget -O config.json https://raw.githubusercontent.com/wulabing/Xray_onekey/${github_branch}/config/xray_xtls-rprx-direct.json modify_UUID modify_port tls_type