diff --git a/cmd/dnsclient/dnsclient.go b/cmd/dnsclient/dnsclient.go index 5827e30..8eccaf0 100644 --- a/cmd/dnsclient/dnsclient.go +++ b/cmd/dnsclient/dnsclient.go @@ -91,7 +91,9 @@ func main() { // newAPIDNSProvider is for the sake of demoing the tunnel func newAPIDNSProvider(baseURL string, token string) (*dns01.DNSProvider, error) { config := dns01.NewDefaultConfig() - config.Token = token + config.Tokener = func() string { + return token + } endpoint, err := url.Parse(baseURL) if nil != err { return nil, err diff --git a/cmd/wsserve/wsserve.go b/cmd/wsserve/wsserve.go index a77baf1..79f2c92 100644 --- a/cmd/wsserve/wsserve.go +++ b/cmd/wsserve/wsserve.go @@ -310,7 +310,9 @@ func newGoDaddyDNSProvider(id, secret string) (*godaddy.DNSProvider, error) { // newAPIDNSProvider is for the sake of demoing the tunnel func newAPIDNSProvider(baseURL string, token string) (*tbDns01.DNSProvider, error) { config := tbDns01.NewDefaultConfig() - config.Token = token + config.Tokener = func() string { + return token + } endpoint, err := url.Parse(baseURL) if nil != err { return nil, err