1
0
镜像自地址 https://github.com/therootcompany/telebit.git 已同步 2025-06-30 17:36:34 +00:00

use acme relay url as true baseurl

这个提交包含在:
AJ ONeal 2020-07-17 08:16:18 +00:00
父节点 64d12ec535
当前提交 58dc369ce1
共有 4 个文件被更改,包括 18 次插入8 次删除

查看文件

@ -61,10 +61,15 @@ func main() {
} }
endpoint := *acmeRelay endpoint := *acmeRelay
if strings.HasSuffix(endpoint, "/") { if !strings.HasSuffix(endpoint, "/") {
endpoint = endpoint[:len(endpoint)-1] endpoint += "/"
} }
endpoint += "/api/dns/" /*
if strings.HasSuffix(endpoint, "/") {
endpoint = endpoint[:len(endpoint)-1]
}
endpoint += "/api/dns/"
*/
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err { if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
panic(err) panic(err)
} }

查看文件

@ -516,10 +516,15 @@ func getACMEProvider(acmeRelay, token *string) (challenge.Provider, error) {
return nil, fmt.Errorf("No relay for ACME DNS-01 challenges given to --acme-relay-url") return nil, fmt.Errorf("No relay for ACME DNS-01 challenges given to --acme-relay-url")
} }
endpoint := *acmeRelay endpoint := *acmeRelay
if strings.HasSuffix(endpoint, "/") { if !strings.HasSuffix(endpoint, "/") {
endpoint = endpoint[:len(endpoint)-1] endpoint += "/"
} }
//endpoint += "/api/dns/" /*
if strings.HasSuffix(endpoint, "/") {
endpoint = endpoint[:len(endpoint)-1]
}
endpoint += "/api/dns/"
*/
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err { if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
return nil, err return nil, err
} }

查看文件

@ -10,7 +10,7 @@ ACME_AGREE=true
ACME_EMAIL=jon.doe@example.com ACME_EMAIL=jon.doe@example.com
# For Let's Encrypt ACME Challenges (pick one) # For Let's Encrypt ACME Challenges (pick one)
ACME_RELAY_URL=http://localhost:4200 ACME_RELAY_URL=http://localhost:4200/api/dns
SECRET=xxxxxxxxxxxxxxxx SECRET=xxxxxxxxxxxxxxxx
#DUCKDNS_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX #DUCKDNS_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
#GODADDY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #GODADDY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

查看文件

@ -21,7 +21,7 @@ LISTEN="${LISTEN:-":80 :443"}"
AUTH_URL=${AUTH_URL:-"https://devices.example.com/api"} AUTH_URL=${AUTH_URL:-"https://devices.example.com/api"}
# For Let's Encrypt / ACME challenges # For Let's Encrypt / ACME challenges
ACME_RELAY_URL=${ACME_RELAY_URL:-"http://localhost:4200"} ACME_RELAY_URL=${ACME_RELAY_URL:-"http://localhost:4200/api/dns"}
SECRET=${SECRET:-"xxxxxxxxxxxxxxxx"} SECRET=${SECRET:-"xxxxxxxxxxxxxxxx"}
# For Let's Encrypt / ACME registration # For Let's Encrypt / ACME registration