用 chatgpt 剽了一个 ddns-go 一键安装脚本

用于 jeessy2/ddns-go 的一键安装脚本

$ install-ddns_go.sh --help
用法: ddns-go-install.sh [选项]...
选项:
  --root-domain <domain>    设置根域名
  --ip-gettype <type>       设置 IP 获取方式
  --cf-token <token>        设置 Cloudflare Token
  -- <cmd>                  传递给 ddns-go -s install 安装时的参数
  --help                    显示此帮助信息

不加参数直接使用

bash -c 'bash <(curl -sL https://raw.githubusercontent.com/vanplus/snippets/main/install-ddns_go.sh)'

指定参数

– 自定义的 ddns-go 安装命令参数

bash -c 'bash <(curl -sL https://raw.githubusercontent.com/vanplus/snippets/main/install-ddns_go.sh) -- -f 10 -cacheTimes 180'

–root-domain 指定根域名并生成随机子域名

bash -c 'bash <(curl -sL https://raw.githubusercontent.com/vanplus/snippets/main/install-ddns_go.sh) --root-domain zfb.al -- -f 10 -cacheTimes 180

–ip-gettype 获取 IP 的方式

bash -c 'bash <(curl -sL https://raw.githubusercontent.com/vanplus/snippets/main/install-ddns_go.sh) --root-domain zfb.al --ip-gettype netInterface -- -f 21600 -noweb'

–cf-token Cloudflare Token

2 个赞

搞七捻三软件分享

很久就在用了,哈哈哈,超好用

给小鸡生成包含 hostname 的随机域名后超好用,不用登录 cf 填小鸡 ip 了。