Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

部署文档:https://github.com/TechnitiumSoftware/DnsServer/blob/master/docker-compose.yml






获取Token

浏览器访问:

http://192.168.31.223:5380/api/user/createToken?user=admin&pass=Uenpay2023&tokenName==zhengyu

Code Block
{
    "username": "admin",
    "tokenName": "=zhengyu",
    "token": "3bf5056348e6a5abc9524c71611f7851c44277cdb834788b95d8d16552b054f8",
    "status": "ok"
}

查询记录

http://localhost:5380/api/zones/records/get?token=x&domain=example.com&zone=example.com&listZone=true

添加记录

http://localhost:5380/api/zones/records/add?token=x&domain=example.com&zone=example.com

范例

Code Block
添加A记录并覆盖原有的值
curl "http://192.168.31.219:5380/api/zones/records/add?token=3bf5056348e6a5abc9524c71611f7851c44277cdb834788b95d8d16552b054f8&domain=jump.uenpay.com&zone=uenpay.com&type=A&ttl=600&overwrite=true&ipAddress=192.168.31.253"
添加CNAME记录并覆盖原有的值
curl "http://192.168.31.219:5380/api/zones/records/add?token=3bf5056348e6a5abc9524c71611f7851c44277cdb834788b95d8d16552b054f8&domain=static.uenpay.com&zone=uenpay.com&type=CNAME&ttl=600&overwrite=true&cname=static-uenpay-com-idvl8nn.qiniudns.com."


修改记录

http://localhost:5380/api/zones/records/update?token=x&domain=mail.example.com&zone=example.com&type=A&value=127.0.0.1&newValue=127.0.0.2&ptr=false

...