Skip to content
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 Rainyun/雨云 #2354

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

Cikaros
Copy link

@Cikaros Cikaros commented Nov 18, 2024

The individual has been tested and is available normally~

@ldez
Copy link
Member

ldez commented Nov 18, 2024

Hello, in order for a PR adding a DNS provider to be accepted, you have to:

  • add a description to your PR
  • be able to maintain this provider
  • have a homogeneous design with the other providers
  • add tests (units)
make test
  • add tests ("live")
    func TestLivePresent(t *testing.T) {
    if !envTest.IsLiveTest() {
    t.Skip("skipping live test")
    }
    envTest.RestoreEnv()
    provider, err := NewDNSProvider()
    require.NoError(t, err)
    err = provider.Present(envTest.GetDomain(), "", "123d==")
    require.NoError(t, err)
    }
    func TestLiveCleanUp(t *testing.T) {
    if !envTest.IsLiveTest() {
    t.Skip("skipping live test")
    }
    envTest.RestoreEnv()
    provider, err := NewDNSProvider()
    require.NoError(t, err)
    time.Sleep(2 * time.Second)
    err = provider.CleanUp(envTest.GetDomain(), "", "123d==")
    require.NoError(t, err)
    }
make test
make generate-dns
  • be able to do: (and put the output of this command to a comment in your PR)
rm -rf .lego

RAINYUN_API_KEY="xxxxxxxxxxxxxxxxxxxxx" \
./dist/lego -m [email protected] --dns rainyun -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run

Note the wildcard domain is important.

make checks
  • do go mod tidy

@ldez ldez self-requested a review November 18, 2024 11:27
@ldez ldez changed the title Support Rain Cloud DNS Provider Add DNS provider for Rainyun/雨云 Nov 18, 2024
@ldez ldez force-pushed the feature/rain-cloud branch 3 times, most recently from 3c992d0 to 89ad42c Compare November 18, 2024 13:04
@Cikaros

This comment was marked as outdated.

@Cikaros

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@Cikaros

This comment was marked as outdated.

@ldez
Copy link
Member

ldez commented Nov 18, 2024

I'm waiting for:

  • be able to do: (and put the output of this command to a comment in your PR)
rm -rf .lego

RAINYUN_API_KEY="xxxxxxxxxxxxxxxxxxxxx" \
./dist/lego -m [email protected] --dns rainyun -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run

Note the wildcard domain is important.

You should replace example.com with your domain.
You should replace [email protected] with your email.

The 2 domains with the same LTD are a requirement.

@Cikaros

This comment was marked as outdated.

@Cikaros

This comment was marked as off-topic.

@Cikaros

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@Cikaros

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@Cikaros

This comment was marked as outdated.

@Cikaros

This comment was marked as outdated.

@Cikaros

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

@Cikaros

This comment was marked as outdated.

@Cikaros
Copy link
Author

Cikaros commented Nov 19, 2024

As requested, I have passed the test. But I've appended a new environment variable RAINYUN_PROPAGATION_TIMEOUT=120

@ldez
Copy link
Member

ldez commented Nov 19, 2024

OK, I changed the default propagation, and now it's 120.

Can you give me the text of the output of the run of the command: #2354 (comment)

@Cikaros
Copy link
Author

Cikaros commented Nov 19, 2024

2024/11/19 11:45:41 [INFO] [*.cikaros.cn, cikaros.cn] acme: Obtaining bundled SAN certificate
2024/11/19 11:45:43 [INFO] [*.cikaros.cn] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/14980097623
2024/11/19 11:45:43 [INFO] [cikaros.cn] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/14980192463
2024/11/19 11:45:43 [INFO] [cikaros.cn] acme: authorization already valid; skipping challenge
2024/11/19 11:45:43 [INFO] [*.cikaros.cn] acme: use dns-01 solver
2024/11/19 11:45:43 [INFO] [*.cikaros.cn] acme: Preparing to solve DNS-01
2024/11/19 11:45:45 [INFO] [*.cikaros.cn] acme: Trying to solve DNS-01
2024/11/19 11:45:45 [INFO] [*.cikaros.cn] acme: Checking DNS record propagation. [nameservers=100.73.255.254:53]
2024/11/19 11:45:47 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2024/11/19 11:45:47 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:45:49 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:45:52 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:45:54 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:45:56 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:45:58 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:00 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:02 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:05 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:07 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:09 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:11 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:13 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:16 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:18 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:20 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:22 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:25 [INFO] [*.cikaros.cn] acme: Waiting for DNS record propagation.
2024/11/19 11:46:42 [INFO] [*.cikaros.cn] The server validated our request
2024/11/19 11:46:42 [INFO] [*.cikaros.cn] acme: Cleaning DNS-01 challenge
2024/11/19 11:46:43 [INFO] [*.cikaros.cn, cikaros.cn] acme: Validations succeeded; requesting certificates
2024/11/19 11:46:43 [INFO] Wait for certificate [timeout: 30s, interval: 500ms]
2024/11/19 11:46:49 [INFO] [*.cikaros.cn] Server responded with a certificate.

@ldez
Copy link
Member

ldez commented Nov 19, 2024

So everything seems OK now.

@ldez ldez added this to the unreleased milestone Nov 19, 2024
@Cikaros
Copy link
Author

Cikaros commented Nov 19, 2024

Yes, everything is fine. Thanks for the guidance~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants