Skip to content

chr233/pyddns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDDNS

支持Dnspod, 自动更新IP

开始使用

  1. 安装 pip install cddns 或者 clone https://github.com/chr233/pyddns

  2. 修改配置文件,填写域名和dnspod API token

    [dnspod]
    token = ''
    
    [[domains]]
    domain = 'chrxw.com'
    sub = 'test'

    完整配置参考example.config.toml

  3. 运行 python3 ddns.py

    或者自己调用 cddns.ddns:

    from cddns import ddns
    ddns('config.toml', 'ip.txt') # 自行修改配置文件路径
  4. 建议使用 corntab 来定时运行

    例如每30分钟运行一次:

    */30 * * * * python3 /root/ddns/ddns.py > /dev/null 2>&1 &
  5. 更新脚本方法: pip3 install cddns --upgrade

About

支持多域名的ddns脚本

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages