acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Dnsapi/dns dnsever

Open hiskaNG opened this issue 8 years ago • 12 comments

hiskaNG avatar Oct 01 '17 21:10 hiskaNG

please merge the latest code.

Neilpang avatar Feb 06 '18 13:02 Neilpang

Can you please make sure the hook can handle all the domain formats ?

https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide#3-detect-which-part-is-your-root-zone

Neilpang avatar Feb 10 '18 00:02 Neilpang

Yes, you can see dnsever_select_user_domain() function, who checks mostly matched domain registered to DNSEver. For example, I have separate certificates for abc.net, www.abc.net, list.abc.net, tokyo.abc.net, www.tokyo.abc.net, english.abc.net, www.english.abc.net but only abc.net is registered to DNSEver. And I checked the all their _acme-challenge.* are properly processed by dnsapi/dns_dnsever.sh

hiskaNG avatar Feb 10 '18 12:02 hiskaNG

I just moved one of my domain to dnsever, and tried this script, it seems not working. Can you please try and make sure ?

Thanks.

Neilpang avatar Feb 10 '18 12:02 Neilpang

Did it redrected to /confirm_email.html, because you didn't login to DNSEver for a long time? I added to check and skip the page. Or could you let me know your domain which was not working with this script?

hiskaNG avatar Feb 10 '18 13:02 hiskaNG

my domain is: "dnsever.acme.sh"

Neilpang avatar Feb 10 '18 14:02 Neilpang

I tested with dnsever1.acme.sh on my account. _acme-challenge.dnsever1.acme.sh TXT was properly added (but it stopped at verification step, because I didn't buy the domain from domain registerer). Could you test it with --debug and send the log to my e-mail, hiska at hiska.net after mask your DNSEver password?

hiskaNG avatar Feb 10 '18 14:02 hiskaNG

@hiskang

[2018年02月10日 22:55:41] Found domain api file: /cygdrive/d/gitroot/acme.sh/dnsapi/dns_dnsever.sh
[2018年02月10日 22:55:41] Using dnsever
[2018年02月10日 22:55:41] fulldomain='_acme-challenge.dnsever.acme.sh'
[2018年02月10日 22:55:41] txtvalue='JM-LMLgptFbonPx5-7j11-WZ1JRufj7AcA7iFWFIWYg'
[2018年02月10日 22:55:42] POST
[2018年02月10日 22:55:42] _post_url='https://kr.dnsever.com/index.html'
[2018年02月10日 22:55:42] body='login_id=myname&login_password=mypassword'
[2018年02月10日 22:55:42] _CURL='curl -L --silent --dump-header /home/myname/.acme.sh/http.header  --trace-ascii /tmp/tmp.iSiFyVAmgf '
[2018年02月10日 22:55:43] _ret='0'
[2018年02月10日 22:55:43] POST
[2018年02月10日 22:55:44] _post_url='https://kr.dnsever.com/start.html'
[2018年02月10日 22:55:44] body
[2018年02月10日 22:55:44] _CURL='curl -L --silent --dump-header /home/myname/.acme.sh/http.header  --trace-ascii /tmp/tmp.1CWENIszfh '
[2018年02月10日 22:55:45] _ret='0'
[2018年02月10日 22:55:45] dnsever_txt:add ERROR login failed with login_id=myname login_password=mypassword
[2018年02月10日 22:55:45] POST
[2018年02月10日 22:55:45] _post_url='https://kr.dnsever.com/logout.php'
[2018年02月10日 22:55:45] body='skey='
[2018年02月10日 22:55:46] _CURL='curl -L --silent --dump-header /home/myname/.acme.sh/http.header  --trace-ascii /tmp/tmp.LJKWQsDgzC '
[2018年02月10日 22:55:46] _ret='0'
[2018年02月10日 22:55:46] Error add txt for domain:_acme-challenge.dnsever.acme.sh

Neilpang avatar Feb 10 '18 14:02 Neilpang

@Neilpang Changed sed -n to _egrep_o | sed | tr -d combination. Could you try again with --debug? I also added debug logging for skey and some other variables.

hiskaNG avatar Feb 12 '18 09:02 hiskaNG

please merge the latest dev code

Neilpang avatar Feb 12 '18 12:02 Neilpang

it's not working for me yet.

[Mon Feb 12 21:03:15 CST 2018] d='dnsever.acme.sh'
[Mon Feb 12 21:03:15 CST 2018] txtdomain='_acme-challenge.dnsever.acme.sh'
[Mon Feb 12 21:03:15 CST 2018] txt='w2ZkciqOcSQT0Wyergdzif5gI4MMJvn2R58YrkLtqa8'
[Mon Feb 12 21:03:15 CST 2018] d_api='/root/.acme.sh/dnsapi/dns_dnsever.sh'
[Mon Feb 12 21:03:15 CST 2018] Found domain api file: /root/.acme.sh/dnsapi/dns_dnsever.sh
[Mon Feb 12 21:03:15 CST 2018] Using dnsever
[Mon Feb 12 21:03:15 CST 2018] fulldomain='_acme-challenge.dnsever.acme.sh'
[Mon Feb 12 21:03:15 CST 2018] txtvalue='w2ZkciqOcSQT0Wyergdzif5gI4MMJvn2R58YrkLtqa8'
[Mon Feb 12 21:03:15 CST 2018] POST
[Mon Feb 12 21:03:15 CST 2018] _post_url='https://kr.dnsever.com/index.html'
[Mon Feb 12 21:03:15 CST 2018] body='login_id=neilpang&login_password=mypassword'
[Mon Feb 12 21:03:15 CST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header  --trace-ascii /tmp/tmp.7xf17ak64V '
[Mon Feb 12 21:03:17 CST 2018] _ret='0'
[Mon Feb 12 21:03:17 CST 2018] POST
[Mon Feb 12 21:03:17 CST 2018] _post_url='https://kr.dnsever.com/start.html'
[Mon Feb 12 21:03:17 CST 2018] body
[Mon Feb 12 21:03:17 CST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header  --trace-ascii /tmp/tmp.oK2pOJ4Fx8 '
[Mon Feb 12 21:03:19 CST 2018] _ret='0'
[Mon Feb 12 21:03:19 CST 2018] skey
[Mon Feb 12 21:03:19 CST 2018] dnsever_txt:add ERROR login failed with login_id=neilpang login_password=mypassword

Can you please show me your log with --debug 2 ?

Neilpang avatar Feb 12 '18 13:02 Neilpang

@Neilpang Below log is from CentOS7 which is newly installed to test this, so I tested on OSX, Ubuntu, Cygwin, Centos7 so far.

[Mon Feb 12 22:20:11 JST 2018] Found domain api file: /root/.acme.sh/dnsapi/dns_dnsever.sh [Mon Feb 12 22:20:11 JST 2018] Using dnsever [Mon Feb 12 22:20:11 JST 2018] fulldomain='_acme-challenge.test.hiska.net' [Mon Feb 12 22:20:11 JST 2018] txtvalue='gHJPuVINkx52adbSx5dUHm4CXJk93sZ81Pt2An3WrnM' [Mon Feb 12 22:20:11 JST 2018] POST [Mon Feb 12 22:20:11 JST 2018] _post_url='https://kr.dnsever.com/index.html' [Mon Feb 12 22:20:11 JST 2018] body='login_id=login&login_password=password' [Mon Feb 12 22:20:11 JST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header --trace-ascii /tmp/tmp.FpaKni2FlI ' [Mon Feb 12 22:20:12 JST 2018] _ret='0' [Mon Feb 12 22:20:12 JST 2018] POST [Mon Feb 12 22:20:12 JST 2018] _post_url='https://kr.dnsever.com/start.html' [Mon Feb 12 22:20:12 JST 2018] body [Mon Feb 12 22:20:12 JST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header --trace-ascii /tmp/tmp.QV28YHYk0W ' [Mon Feb 12 22:20:14 JST 2018] _ret='0' [Mon Feb 12 22:20:14 JST 2018] skey='hiska:f88c8b1fbb0302c885da111740af477a' [Mon Feb 12 22:20:14 JST 2018] domains='canspeak.net hiska.net canspeak.net hiska.net' [Mon Feb 12 22:20:14 JST 2018] user_domain='hiska.net' [Mon Feb 12 22:20:14 JST 2018] subname='_acme-challenge.test' [Mon Feb 12 22:20:14 JST 2018] dnsever_txt:add skey=hiska:f88c8b1fbb0302c885da111740af477a user_domain=hiska.net selected_menu=edittxt command=add_txt subname=_acme-challenge.test txt=gHJPuVINkx52adbSx5dUHm4CXJk93sZ81Pt2An3WrnM [Mon Feb 12 22:20:14 JST 2018] POST [Mon Feb 12 22:20:14 JST 2018] _post_url='https://kr.dnsever.com/start.html' [Mon Feb 12 22:20:14 JST 2018] body='skey=hiska:f88c8b1fbb0302c885da111740af477a&user_domain=hiska.net&selected_menu=edittxt' [Mon Feb 12 22:20:14 JST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header --trace-ascii /tmp/tmp.qgCV5GcoFs ' [Mon Feb 12 22:20:16 JST 2018] _ret='0' [Mon Feb 12 22:20:16 JST 2018] matched [Mon Feb 12 22:20:16 JST 2018] check [Mon Feb 12 22:20:16 JST 2018] POST [Mon Feb 12 22:20:16 JST 2018] _post_url='https://kr.dnsever.com/start.html' [Mon Feb 12 22:20:16 JST 2018] body='skey=hiska:f88c8b1fbb0302c885da111740af477a&user_domain=hiska.net&selected_menu=edittxt&command=add_txt&subname=_acme-challenge.test&new_txt=gHJPuVINkx52adbSx5dUHm4CXJk93sZ81Pt2An3WrnM' [Mon Feb 12 22:20:16 JST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header --trace-ascii /tmp/tmp.ZYJmPQvnhF ' [Mon Feb 12 22:20:17 JST 2018] _ret='0' [Mon Feb 12 22:20:18 JST 2018] matched='3' [Mon Feb 12 22:20:18 JST 2018] check='&check[]=3&domain_for_txt_3=_acme-challenge.test.hiska.net&seq_3=27086176&old_txt_3=gHJPuVINkx52adbSx5dUHm4CXJk93sZ81Pt2An3WrnM' [Mon Feb 12 22:20:18 JST 2018] POST [Mon Feb 12 22:20:18 JST 2018] _post_url='https://kr.dnsever.com/logout.php' [Mon Feb 12 22:20:18 JST 2018] body='skey=hiska:f88c8b1fbb0302c885da111740af477a' [Mon Feb 12 22:20:18 JST 2018] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header --trace-ascii /tmp/tmp.Cr67p9gjiA ' [Mon Feb 12 22:20:18 JST 2018] _ret='0' [Mon Feb 12 22:20:18 JST 2018] Sleep 120 seconds for the txt records to take effect

hiskaNG avatar Feb 12 '18 13:02 hiskaNG