xddns

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 10 Imported by: 0

README

命令行工具,操作dns。目前支持ali/cloudflare。 同时支持获取本机ip,然后同步到dns

安装

go install github.com/tonyzzp/xddns@latest

帮助

xddns --help
xddns --help set

配置文件

配置文件xddns-config.yaml (搜索路径顺序:workingdir,exedir),内容如下

ali:
  region: cn-shenzhen
  key_id: xxxxx
  key_secret: xxxxx
  domains:
    - a.com
    - b.com

cloudflare:
  token: "xxxxx"
  domains:
    "a.me": "xxxxxxx zoneid"
    "b.app": "xxxx zoneid"

通过命令行参数指定配置文件

--config参数一定要加在子命令前面

xddns --config /my/path/config.yaml set ...
xddns --config /my/path/config.yaml update ...

直接设置dns

xddns set --type A --domain myname.com --value 192.168.1.101
xddns set --type CNAME --domain www.myname.com --value  myname.com

直接更新为本机ip

xddns update --type ipv4 --domain a.myname.com
xddns update --type ipv6 --domain a.myname.com

查看本机ip

xddns ip

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL