百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

godaddy-ddns

> 编程语言
开源

这是一个用于动态更新 GoDaddy DNS 记录的脚本。我使用 GoDaddy 为一个域名提供 DNS 服务,我想将该域名中的 A 记录指向一个主机,该主机的 IP 地址是 192.168.1.100。

197 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

这是一个用于动态更新 GoDaddy DNS 记录的脚本。我使用 GoDaddy 为一个域名提供 DNS 服务,我想将该域名中的 A 记录指向一个主机,该主机的 IP 地址是 192.168.1.100。

godaddy-ddns

Introduction

A script for dynamically updating a GoDaddy DNS record. I use GoDaddy to host DNS for a domain and I wanted to point an A record in that domain to a host who's IP address changes occasionally. GoDaddy has an API to do this, so this happened. This package, in particular this README.MD, is inspired by the equivalent for CloudFlare offered by thatjpk.

Docker

This program can be run as a Docker container, or on a device in your home network running Python 3.

Using Docker, you can invoke the program like this:

bash
docker run godaddyddns --version

Dependencies

This program was written and tested using Python 3, so you'll need:

  • Python (opkg install python3-light):
  • Codecs (opkg install python3-codecs)
  • Email (opkg install python3-email)
  • OpenSSL (opkg install python3-openssl)
  • CA Certificates (opkg install ca-bundle)

The program may also work under Python 2.7 by changing python3 to python in the first line, but this configuration has not been tested.

Usage

Invoke the program like this:

 godaddy_ddns.py [-h] [--version] [--ip IP] [--key KEY] [--secret SECRET] [--ttl TTL] hostname

 positional arguments:

 hostname         DNS fully-qualified host name with an 'A' record.  If the hostname consists of only a domain name
                  (i.e., it contains only one period), the record for '@' is updated.

 optional arguments:

 -h, --help       show this help message and exit

 --version        show program's version number and exit

 --ip IP          DNS Address (defaults to public WAN address from http://ipv4.icanhazip.com/)

 --key KEY        GoDaddy production key

 --secret SECRET  GoDaddy production secret

 --ttl TTL        DNS TTL.

GoDaddy customers can obtain values for the KEY and SECRET arguments by creating a production key at https://developer.godaddy.com/keys/.

Note that command line arguments may be specified in a FILE, one to a line, by instead giving the argument "%FILE". For security reasons, it is particularly recommended to supply the KEY and SECRET arguments in such a file, rather than directly on the command line:

Create a file named, e.g., godaddy-ddns.config with the content:

 MY.FULLY.QUALIFIED.HOSTNAME.COM
 --key
 MY-KEY-FROM-GODADDY
 --secret
 MY-SECRET-FROM-GODADDY

Then just invoke godaddy-ddns %godaddy-ddns.config

Credits and Thanks

  • thatjpk for providing an example of this type of script.
  • GoDaddy for having an API.
  • icanhazip.com for making grabbing your public IP from a script super easy.
  • dhowdy for supplying a fix to problem with updating root DNS record.
  • ChrisSwanson for icanhazip.com https patch.
  • cwilby for providing a Docker image of this script.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言