DDNS based on web-api implementation.
ddns.exe 10 "https://freemyip.com/update?token=799860a8a521350297219037&domain=ppp-nat-cdyd-1.freemyip.com"
Effect: ddns-sync every 10 seconds, domain name: "ppp-nat-cdyd-1.freemyip.com"
Apply for ddns: https://freemyip.com/ This is the free DDNS provider, or Google search yourself.
from https://github.com/liulilittle/ddns
------------
a ddns script based on DNSPod and Cloudflare API.
动态DNS更新脚本,目前支持DnsPod和CloudFlare
- 获取本机的公网地址
- 更新DNS记录
- 依靠systemd的timer运行,如公网地址没变则不发起更新请求
通过环境变量配置脚本:
PROVIDER
: DNS服务商,目前支持dnspod
和cloudflare
TOKEN_ID
: ID,对于DNSPod来说是token_id,对于CloudFlare说是用户邮箱TOKEN_KEY
: 验证密钥,对于DNSPod来说是token, 对于CloudFlare来说是api_keyDOMAIN
: 域名,比如xdays.meRECORD
: 记录,比如www.xdays.meIP_TYPE
: 使用公网地址还是私网地址, 对应为public
和private
git clone git@github.com:xdays/ddns.git /opt/ddns
准备配置文件 /opt/ddns/.env
PROVIDER=cloudflare
TOKEN_ID=token_id
TOKEN_KEY=token_key
DOMAIN=example.com
RECORD=v.example.com
IP_TYPE=public
集成systemd
cd systemd
./install.sh
from https://github.com/xdays/ddns
No comments:
Post a Comment