Skip to main content

支持多域名的ddns脚本

Project description

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

Project details


Release history Release notifications | RSS feed

This version

0.1

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 details)

Uploaded Source

Built Distribution

cddns-0.1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file cddns-0.1.tar.gz.

File metadata

  • Download URL: cddns-0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1

File hashes

Hashes for cddns-0.1.tar.gz
Algorithm Hash digest
SHA256 f341fc34a7202d894e4ddbb073123a054ab8c7879aec8c59f2c4b69ba67beb49
MD5 edf31ac6294b5afe2997ae1794b5cf22
BLAKE2b-256 d168037010272283d86a6acf56a94bc22523666a0d6826cace9bdfacbf633a13

See more details on using hashes here.

File details

Details for the file cddns-0.1-py3-none-any.whl.

File metadata

  • Download URL: cddns-0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1

File hashes

Hashes for cddns-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2404eb2bb6f3b255e41f93b47925bfd00c197252dda07583eab6e3a5c850f3f1
MD5 4acc4dc96a30755c8beea73e3e8642ee
BLAKE2b-256 cda2d887ec07bb02628c66243085af60e71fa75aadfac021cefcd937e261a864

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page