zl程序教程

您现在的位置是:首页 >  后端

当前栏目

[go tools] dnsx - 让 dns 配置解析更飞起来

Go配置 解析 DNS 起来 tools
2023-06-13 09:17:20 时间

dnsx - 一款支持多解析商的命令行 dnsx 客户端

多支持多运营商的 DNS 命令行 客户端。

Github项目地址: https://github.com/tangx/dnsx

Usage

DNSx 配置管理 DNS 解析

Usage:
  dnsx [command]

Available Commands:
  add         添加域名解析
  configure   管理配置文件
  delete      删除解析记录
  help        Help about any command
  search      查询记录信息
  switch      切换域名状态

Flags:
  -c, --config string    config file (default "$HOME/.dnsx/dnsx.json")
  -h, --help             help for dnsx
  -p, --profile string   profile (default "default")

Use "dnsx [command] --help" for more information about a command.
  • dnsx profile configure
  • dnsx record add 图太大,传不上来
  • dnsx record switch
  • dnsx record search
  • dnsx record delete

Todo List

多后台的 dns 解析配置命令行

  • 使用 interface 方法实现多 backend 接入
  • 使用 cobra 创建子命令
    • add
    • delete: 交互确认。
    • update
    • enable, disable
    • search
    • configure
  • 使用 cobra 实现 config.json 的配置
    • 增加
    • 更新
    • 优化 LoadConfig() 加载位置
  • 完成 auto-complete for zsh: 支持子命令补全, config.json 中的域名列表补全 source /path/to/dnsx.completion.bash
  • 支持多后台
    • qcloud cns
    • aliyun alidns
    • dnspod