Total Pageviews

Saturday 31 August 2024

ddns-by-liulilittle

 DDNS based on web-api implementation. 

Example

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服务商,目前支持dnspodcloudflare
  • TOKEN_ID: ID,对于DNSPod来说是token_id,对于CloudFlare说是用户邮箱
  • TOKEN_KEY: 验证密钥,对于DNSPod来说是token, 对于CloudFlare来说是api_key
  • DOMAIN: 域名,比如xdays.me
  • RECORD: 记录,比如www.xdays.me
  • IP_TYPE: 使用公网地址还是私网地址, 对应为publicprivate

安装

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