Commit Graph

29 Commits (master)

Author SHA1 Message Date
neil 7362e8de4d fix format 4 months ago
Sergey Ponomarev 6b7b5caf54 DNS provider API: structured description
Instead of using comments declare info in a special variable.
Then the variable can be used to print the DNS API provider usage.
The usage can be parsed on UI and show all needed inputs for options.

The info is stored in plain string that it's both human-readable and easy to parse:

    dns_example_info='API name
     An extended description.
     Multiline.
    Domains: list of alternative domains to find
    Site: the dns provider website e.g. example.com
    Docs: Link to ACME.sh wiki for the provider
    Options:
     VARIABLE1 Title for the option1.
     VARIABLE2 Title for the option2. Default "default value".
     VARIABLE3 Title for the option3. Description to show on UI. Optional.
    Issues: Link to a support ticket on https://github.com/acmesh-official/acme.sh
    Author: First Lastname <authoremail@example.com>, Another Author <https://github.com/example>;
    '

Here:
VARIABLE1 will be required.
VARIABLE2 will be required too but will be populated with a "default value".
VARIABLE3 is optional and can be empty.

A DNS provider may have alternative options like CloudFlare may use API KEY or API Token.
You can use a second section OptionsAlt: section.

Some providers may have alternative names or domains e.g. Aliyun and AlibabaCloud.
Add them to Domains: section.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
9 months ago
Alexander Kulumbeg 051775b9b4
String update
Hopefully the last one
4 years ago
Alexander Kulumbeg 2386d2e299
String change 4 years ago
Alexander Kulumbeg 0021fb8a33
Changing the _hmac auth back
It only works this way, apparently
4 years ago
Alexander Kulumbeg c8c727e6c6
added hex param to _hmac
but removed "printf "s%" ...
4 years ago
Alexander Kulumbeg b8494ab3cc
Update dns_websupport.sh 4 years ago
Alexander Kulumbeg 2eda03f5de
Changing the _hmac call into Neil's suggestion 4 years ago
Alexander Kulumbeg 3a38358946
Trying the original solution
_hmac sha1 "$(printf "%s" "$WS_ApiSecret" | _hex_dump | tr -d " ")" hex)
4 years ago
Alexander Kulumbeg 6c9845b9f3
adding the hex parameter to _hmac call 4 years ago
Alexander Kulumbeg 9e146a8a5a
Typo
Forgot a quotation mark on line 161
4 years ago
Alexander Kulumbeg 433d9bfb02
Implementing/testing Neil's suggestions 4 years ago
Alexander Kulumbeg 94917e315e
Testing double 2>/dev/null into _utc_date with sed 4 years ago
Alexander Kulumbeg ced6852735
2>/dev/null/ to 2>/dev/null
Silly mistake with a "/" -.-
4 years ago
Alexander Kulumbeg 8dc55f417d
Extra test - adding date -u -d
Adding this to at least partially prevent the virtually nonexistent possibility of timestamp and _utc_date() mismatch. If the normal date -u -d does not get converted (looking at you Solaris!), the poor man's method with manipulating the _utc_date() string output kicks in.
4 years ago
Alexander Kulumbeg 3d338bba3c
Fixing the shebang accident 4 years ago
Alexander Kulumbeg 631398f700
sed workaround for "datez" 4 years ago
Alexander Kulumbeg 7984d8cdfb
And again 4 years ago
Alexander Kulumbeg 783a6110ef
Yet another Solaris test 4 years ago
Alexander Kulumbeg 5d4d53c3a1
Testing datez change for Solaris 4 years ago
Alexander Kulumbeg 3014955ece
Fix comments, error msg and time formatting 4 years ago
Alexander Kulumbeg 0481f20c6b
"datez" var and comments 4 years ago
Alexander Kulumbeg 76309601eb
Update dns_websupport.sh 4 years ago
Alexander Kulumbeg 84dd864886
Simplified approach for the HMAC method 4 years ago
Alexander Kulumbeg 7924e01b15
Added a forgotten ")" 4 years ago
Alexander Kulumbeg dadc70630b
Testing HMAC 4 years ago
Alexander Kulumbeg 4956a58026
Update dns_websupport.sh 4 years ago
Alexander Kulumbeg 92332fc385
Update dns_websupport.sh 4 years ago
Alexander Kulumbeg 9366f4b40e
Test original implementation by trgosk 4 years ago