支持多域名的ddns脚本
Project description
CDDNS
支持Dnspod, 自动更新IP
开始使用
-
安装
pip install cddns
或者clone https://github.com/chr233/pyddns
-
修改配置文件,填写域名和dnspod API token
[dnspod] token = '' [[domains]] domain = 'chrxw.com' sub = 'test'
完整配置参考example.config.toml
-
运行
python3 ddns.py
或者自己调用
cddns.ddns
:from cddns import ddns ddns('config.toml', 'ip.txt') # 自行修改配置文件路径
-
建议使用
corntab
来定时运行例如每30分钟运行一次:
*/30 * * * * python3 /root/ddns/ddns.py > /dev/null 2>&1 &
-
更新脚本方法:
pip3 install cddns --upgrade
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cddns-0.1.tar.gz
(7.2 kB
view hashes)
Built Distribution
cddns-0.1-py3-none-any.whl
(20.8 kB
view hashes)