-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DNS provider for VK Cloud #1706
Conversation
Hello, in order for a PR adding a DNS provider to be accepted, you have to:
make test
make test
make generate-dns
rm -rf .lego
./lego -m your@email.com --dns YOUR_PROVIDER_NAME -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run Note the wildcard domain is important.
make checks
|
As I changed the code, I will ask you to run again the command: rm -rf .lego
./lego -m your@email.com --dns YOUR_PROVIDER_NAME -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run |
ok, i will make it today |
Unfortunately it stopped working, VK Cloud has not good API which works strange with trailing slash in URL, it required for each request except txt record deletion, i will fix it soon. Unfortunately i must replace path.Join call with fmt.Sprintf because path.Join clears trailing slash |
I fixed a bug with trailing slash, merged actual changes from master and now it works
|
This reverts commit 6015678.
I implemented a simpler solution. the only case that can be a problem is on the delete. Note: your solution had a problem: package internal
import (
"fmt"
"strings"
"testing"
)
func TestName(t *testing.T) {
fmt.Println(joinURL("v2", "dns", "uri", "/")) // => "v2/dns/uri//" (double trailing slash)
}
func joinURL(parts ...string) string {
return strings.Join(parts, "/")
} |
I rethought the problem again and mimicked the go1.19 API. |
Great solution, shall i test it again? PS. I going to push trailing slash problem into DNS API team, hope they can fix it fast |
It's the same code as previously so I think you don't need to test it again.
I will merge now unless you think that we have to wait for your DNS API team. |
It's not, something went wrong) I will check and fix it
I think you can merge it after fix and not wait for DNS API team, when they fix api i will open new pull request with updates |
Now it works, problem was in BaseURL parsing, the scheme and domain were lost during the second Parse call
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
DNS Provider for VK Cloud. Closes #1705
./lego -m your@email.com --dns YOUR_PROVIDER_NAME ....
go mod tidy
Stdout of example