From 8dcf6a1552693b2d6d4ab33b924fed224de0a4f1 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sun, 13 Nov 2022 13:38:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9d?= =?UTF-8?q?ns=E8=AF=81=E4=B9=A6=E7=94=B3=E8=AF=B7=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E3=80=81=E5=85=BC=E5=AE=B9=E5=90=8C=E4=B8=80=E4=B8=AA=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E5=A4=9A=E5=8F=B0=E6=9C=BA=E5=99=A8=E6=90=AD=E5=BB=BA?= =?UTF-8?q?dns=E7=94=B3=E8=AF=B7=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 3bce91e..dafd7d0 100644 --- a/install.sh +++ b/install.sh @@ -1216,13 +1216,14 @@ selectAcmeInstallSSL() { acmeInstallSSL() { if [[ "${dnsSSLStatus}" == "true" ]]; then - sudo "$HOME/.acme.sh/acme.sh" --issue -d "*.${dnsTLSDomain}" -d "${dnsTLSDomain}" --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please --standalone -k ec-256 --server "${sslType}" ${installSSLIPv6} 2>&1 | tee -a /etc/v2ray-agent/tls/acme.log >/dev/null + sudo "$HOME/.acme.sh/acme.sh" --issue -d "*.${dnsTLSDomain}" -d "${dnsTLSDomain}" --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please -k ec-256 --server "${sslType}" ${installSSLIPv6} 2>&1 | tee -a /etc/v2ray-agent/tls/acme.log >/dev/null local txtValue= txtValue=$(tail -n 10 /etc/v2ray-agent/tls/acme.log | grep "TXT value" | awk -F "'" '{print $2}') if [[ -n "${txtValue}" ]]; then echoContent green " ---> 请手动添加DNS TXT记录" echoContent yellow " ---> 添加方法请参考此教程,https://github.com/mack-a/v2ray-agent/blob/master/documents/dns_txt.md" + echoContent yellow " ---> 如同一个域名多台机器安装通配符证书,请添加多个TXT记录,不需要修改以前添加的TXT记录" echoContent green " ---> name:_acme-challenge" echoContent green " ---> value:${txtValue}" echoContent yellow " ---> 添加完成后等请等待1-2分钟" @@ -1231,7 +1232,7 @@ acmeInstallSSL() { if [[ "${addDNSTXTRecordStatus}" == "y" ]]; then local txtAnswer= txtAnswer=$(dig +nocmd "_acme-challenge.${dnsTLSDomain}" txt +noall +answer | awk -F "[\"]" '{print $2}') - if [[ "${txtAnswer}" == "${txtValue}" ]]; then + if echo "${txtAnswer}" | grep -q "${txtValue}"; then echoContent green " ---> TXT记录验证通过" echoContent green " ---> 生成证书中" sudo "$HOME/.acme.sh/acme.sh" --renew -d "*.${dnsTLSDomain}" -d "${dnsTLSDomain}" --yes-I-know-dns-manual-mode-enough-go-ahead-please --ecc --server "${sslType}" ${installSSLIPv6} 2>&1 | tee -a /etc/v2ray-agent/tls/acme.log >/dev/null @@ -1327,7 +1328,7 @@ installTLS() { if [[ "${installDNSACMEStatus}" == "true" ]]; then echo if [[ -d "$HOME/.acme.sh/*.${dnsTLSDomain}_ecc" && -f "$HOME/.acme.sh/*.${dnsTLSDomain}_ecc/*.${dnsTLSDomain}.key" && -f "$HOME/.acme.sh/*.${dnsTLSDomain}_ecc/*.${dnsTLSDomain}.cer" ]]; then - sudo "$HOME/.acme.sh/acme.sh" --installcert -d "*.${dnsTLSDomain}" --fullchainpath "/etc/v2ray-agent/tls/${tlsDomain}.crt" --keypath "/etc/v2ray-agent/tls/${tlsDomain}.key" --ecc >/dev/null + sudo "$HOME/.acme.sh/acme.sh" --installcert -d "*.${dnsTLSDomain}" --fullchainpath "/etc/v2ray-agent/tls/${tlsDomain}.crt" --keypath "/etc/v2ray-agent/tls/${tlsDomain}.key" --ecc >/dev/null fi elif [[ -d "$HOME/.acme.sh/${tlsDomain}_ecc" && -f "$HOME/.acme.sh/${tlsDomain}_ecc/${tlsDomain}.key" && -f "$HOME/.acme.sh/${tlsDomain}_ecc/${tlsDomain}.cer" ]]; then @@ -2156,7 +2157,6 @@ addClientsHysteria() { local uuids= uuids=$(echo "${previousClients}" | jq -r [.[].id]) - if [[ "${frontingType}" == "02_trojan_TCP_inbounds" ]]; then uuids=$(echo "${previousClients}" | jq -r [.[].password]) fi @@ -5432,7 +5432,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.6.11" + echoContent green "当前版本:v2.6.12" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus