diff --git a/README.MD b/README.MD index 9646692..e386dfb 100644 --- a/README.MD +++ b/README.MD @@ -89,6 +89,18 @@ https://bandwagonhost.com/aff.php?aff=63939 https://justmysocks.net/members/aff.php?aff=17621 +您可以使用我的 DMIT AFF 购买 VPS + +https://www.dmit.io/aff.php?aff=3957 + +您可以使用我的 Vultr AFF 创建新的 Vultr 账号并使用 + +https://www.vultr.com/?ref=6881279 + +您可以通过 USDT 支持我,感谢您的支持 +TRC20:TFannfnajNGYsMTuVDcXfZXXPbcaxAEffa + + ## Stargazers over time [![Stargazers over time](https://starchart.cc/wulabing/Xray_onekey.svg)](https://starchart.cc/wulabing/Xray_onekey) diff --git a/install.sh b/install.sh index 8ab89e4..7a0df4c 100644 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ OK="${Green}[OK]${Font}" ERROR="${Red}[ERROR]${Font}" # 变量 -shell_version="1.3.8" +shell_version="1.3.9" github_branch="main" xray_conf_dir="/usr/local/etc/xray" website_dir="/www/xray_web/" @@ -98,21 +98,33 @@ function system_check() { INS="apt install -y" # 清除可能的遗留问题 rm -f /etc/apt/sources.list.d/nginx.list - $INS lsb-release gnupg2 ca-certificates - - echo "deb http://nginx.org/packages/debian $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list - curl -fsSL https://nginx.org/keys/nginx_signing.key | apt-key add - + # nginx 安装预处理 + $INS curl gnupg2 ca-certificates lsb-release debian-archive-keyring + curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ + | tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null + echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ + http://nginx.org/packages/debian `lsb_release -cs` nginx" \ + | tee /etc/apt/sources.list.d/nginx.list + echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ + | tee /etc/apt/preferences.d/99nginx apt update + elif [[ "${ID}" == "ubuntu" && $(echo "${VERSION_ID}" | cut -d '.' -f1) -ge 18 ]]; then print_ok "当前系统为 Ubuntu ${VERSION_ID} ${UBUNTU_CODENAME}" INS="apt install -y" # 清除可能的遗留问题 rm -f /etc/apt/sources.list.d/nginx.list - $INS lsb-release gnupg2 + # nginx 安装预处理 + $INS curl gnupg2 ca-certificates lsb-release ubuntu-keyring + curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ + | tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null + echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ + http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ + | tee /etc/apt/sources.list.d/nginx.list + echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ + | tee /etc/apt/preferences.d/99nginx - echo "deb http://nginx.org/packages/ubuntu $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list - curl -fsSL https://nginx.org/keys/nginx_signing.key | apt-key add - apt update else print_error "当前系统为 ${ID} ${VERSION_ID} 不在支持的系统列表内" @@ -467,7 +479,7 @@ function generate_certificate() { fi echo $signedcert | jq '.certificate[]' | sed 's/\"//g' | tee $cert_dir/self_signed_cert.pem echo $signedcert | jq '.key[]' | sed 's/\"//g' >$cert_dir/self_signed_key.pem - openssl x509 -in $cert_dir/self_signed_cert.pem -noout || print_error "生成自签名证书失败" && exit 1 + openssl x509 -in $cert_dir/self_signed_cert.pem -noout || (print_error "生成自签名证书失败" && exit 1) print_ok "生成自签名证书成功" chown nobody.$cert_group $cert_dir/self_signed_cert.pem chown nobody.$cert_group $cert_dir/self_signed_key.pem @@ -476,10 +488,12 @@ function generate_certificate() { function configure_web() { rm -rf /www/xray_web mkdir -p /www/xray_web - wget -O web.tar.gz https://raw.githubusercontents.com/wulabing/Xray_onekey/main/basic/web.tar.gz - tar xzf web.tar.gz -C /www/xray_web - judge "站点伪装" - rm -f web.tar.gz +# 不在进行页面伪装 访问首页默认403 Forbidden + +# wget -O web.tar.gz https://raw.githubusercontents.com/wulabing/Xray_onekey/main/basic/web.tar.gz +# tar xzf web.tar.gz -C /www/xray_web +# judge "站点伪装" +# rm -f web.tar.gz } function xray_uninstall() {