From 27ccd24e34dd42a548f6a276b88ce84070fdc972 Mon Sep 17 00:00:00 2001 From: Misaka No <96560028+misakano7545@users.noreply.github.com> Date: Sat, 28 May 2022 08:04:33 +0800 Subject: [PATCH 1/3] Update install.sh (#405) --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 9f7348a..a492c93 100644 --- a/install.sh +++ b/install.sh @@ -244,14 +244,14 @@ function domain_check() { if [[ ${wgcfv4_status} =~ "on"|"plus" ]] || [[ ${wgcfv6_status} =~ "on"|"plus" ]]; then # 关闭wgcf-warp,以防误判VPS IP情况 wg-quick down wgcf >/dev/null 2>&1 - judge "已关闭 wgcf-warp" + print_ok "已关闭 wgcf-warp" fi local_ipv4=$(curl -s4m8 https://ip.gs) local_ipv6=$(curl -s6m8 https://ip.gs) if [[ -z ${local_ipv4} && -n ${local_ipv6} ]]; then # 纯IPv6 VPS,自动添加DNS64服务器以备acme.sh申请证书使用 echo -e nameserver 2a01:4f8:c2c:123f::1 > /etc/resolv.conf - judge "识别为 IPv6 Only 的 VPS,自动添加 DNS64 服务器" + print_ok "识别为 IPv6 Only 的 VPS,自动添加 DNS64 服务器" fi echo -e "域名通过 DNS 解析的 IP 地址:${domain_ip}" echo -e "本机公网 IPv4 地址: ${local_ipv4}" @@ -435,7 +435,7 @@ function acme() { sleep 2 if [[ -n $(type -P wgcf) && -n $(type -P wg-quick) ]]; then wg-quick up wgcf >/dev/null 2>&1 - judge "已启动 wgcf-warp" + print_ok "已启动 wgcf-warp" fi fi else @@ -443,7 +443,7 @@ function acme() { rm -rf "$HOME/.acme.sh/${domain}_ecc" if [[ -n $(type -P wgcf) && -n $(type -P wg-quick) ]]; then wg-quick up wgcf >/dev/null 2>&1 - judge "已启动 wgcf-warp" + print_ok "已启动 wgcf-warp" fi exit 1 fi From deddc03b032ed1527698556889b005eef07c1459 Mon Sep 17 00:00:00 2001 From: wulabing Date: Sat, 28 May 2022 09:48:36 +0800 Subject: [PATCH 2/3] Xray-0.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [fix] 修复部分 Debian/Ubuntu 系统安装后 nginx 无法启动的问题 --- install.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index a492c93..249ac74 100644 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ OK="${Green}[OK]${Font}" ERROR="${Red}[ERROR]${Font}" # 变量 -shell_version="0.1.9" +shell_version="0.2.0" github_branch="nginx_forward" xray_conf_dir="/usr/local/etc/xray" website_dir="/www/xray_web/" @@ -107,10 +107,15 @@ function system_check() { INS="apt install -y" # 清除可能的遗留问题 rm -f /etc/apt/sources.list.d/nginx.list - $INS lsb-release gnupg2 - - 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 @@ -123,10 +128,16 @@ function system_check() { 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} 不在支持的系统列表内" From 7d79ebe77c393185c6911ee39eaa16d077406ef4 Mon Sep 17 00:00:00 2001 From: wulabing Date: Sat, 28 May 2022 09:53:59 +0800 Subject: [PATCH 3/3] Xray-0.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [del] 删除站点伪装 默认返回403 Forbidden --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 249ac74..bacab2b 100644 --- a/install.sh +++ b/install.sh @@ -511,10 +511,10 @@ 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 +# 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() {