Browse Source

Merge pull request #4489 from acmesh-official/dev

sync
pull/4515/head
neil 2 years ago committed by GitHub
parent
commit
d4befeb536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/dockerhub.yml
  2. 17
      acme.sh
  3. 4
      dnsapi/dns_vultr.sh

4
.github/workflows/dockerhub.yml

@ -43,9 +43,9 @@ jobs:
- name: checkout code - name: checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- name: login to docker hub - name: login to docker hub
run: | run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

17
acme.sh

@ -1856,10 +1856,11 @@ _inithttp() {
_ACME_CURL="$_ACME_CURL -g " _ACME_CURL="$_ACME_CURL -g "
fi fi
#from curl 7.76: return fail on HTTP errors but keep the body #don't use --fail-with-body
if _contains "$(curl --help http 2>&1)" "--fail-with-body"; then ##from curl 7.76: return fail on HTTP errors but keep the body
_ACME_CURL="$_ACME_CURL --fail-with-body " #if _contains "$(curl --help http 2>&1)" "--fail-with-body"; then
fi # _ACME_CURL="$_ACME_CURL --fail-with-body "
#fi
fi fi
if [ -z "$_ACME_WGET" ] && _exists "wget"; then if [ -z "$_ACME_WGET" ] && _exists "wget"; then
@ -4023,7 +4024,7 @@ _ns_purge_cf() {
#checks if cf server is available #checks if cf server is available
_ns_is_available_cf() { _ns_is_available_cf() {
if _get "https://cloudflare-dns.com" "" 1 >/dev/null 2>&1; then if _get "https://cloudflare-dns.com" "" 10 >/dev/null; then
return 0 return 0
else else
return 1 return 1
@ -4031,7 +4032,7 @@ _ns_is_available_cf() {
} }
_ns_is_available_google() { _ns_is_available_google() {
if _get "https://dns.google" "" 1 >/dev/null 2>&1; then if _get "https://dns.google" "" 10 >/dev/null; then
return 0 return 0
else else
return 1 return 1
@ -4047,7 +4048,7 @@ _ns_lookup_google() {
} }
_ns_is_available_ali() { _ns_is_available_ali() {
if _get "https://dns.alidns.com" "" 1 >/dev/null 2>&1; then if _get "https://dns.alidns.com" "" 10 >/dev/null; then
return 0 return 0
else else
return 1 return 1
@ -4063,7 +4064,7 @@ _ns_lookup_ali() {
} }
_ns_is_available_dp() { _ns_is_available_dp() {
if _get "https://doh.pub" "" 1 >/dev/null 2>&1; then if _get "https://doh.pub" "" 10 >/dev/null; then
return 0 return 0
else else
return 1 return 1

4
dnsapi/dns_vultr.sh

@ -78,7 +78,7 @@ dns_vultr_rm() {
return 1 return 1
fi fi
_record_id="$(echo "$response" | tr '{}' '\n' | grep '"TXT"' | grep -- "$txtvalue" | tr ',' '\n' | grep -i 'id' | cut -d : -f 2)" _record_id="$(echo "$response" | tr '{}' '\n' | grep '"TXT"' | grep -- "$txtvalue" | tr ',' '\n' | grep -i 'id' | cut -d : -f 2 | tr -d '"')"
_debug _record_id "$_record_id" _debug _record_id "$_record_id"
if [ "$_record_id" ]; then if [ "$_record_id" ]; then
_info "Successfully retrieved the record id for ACME challenge." _info "Successfully retrieved the record id for ACME challenge."
@ -116,7 +116,7 @@ _get_root() {
return 1 return 1
fi fi
if printf "%s\n" "$response" | grep '^\{.*\}' >/dev/null; then if printf "%s\n" "$response" | grep -E '^\{.*\}' >/dev/null; then
if _contains "$response" "\"domain\":\"$_domain\""; then if _contains "$response" "\"domain\":\"$_domain\""; then
_sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")" _sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")"
return 0 return 0

Loading…
Cancel
Save