Giter Club home page Giter Club logo

dnspod-ddns's Introduction

dnspod-ddns

定时检查ip变化并更新dnspod的解析记录.

程序运行在python 3.5以上.

开始使用

本地运行

配置文件放在/etc/dnspod/ddnsrc(也可通过环境变量设置)

可配置的有效参数如下:

LOGIN_TOKEN=token_id,token
DOMAIN=domain.com
SUB_DOMAIN=www
INTERVAL=5
[email protected]
  • LOGIN_TOKEN : 必填, 在dnspod上申请的API组成的token,参考:https://support.dnspod.cn/Kb/showarticle/tsid/227/
  • DOMAIN : 必填, 在dnspod解析的域名
  • SUB_DOMAIN : 必填, 使用ddns的子域名
  • INTERVAL: 选填, 轮询检查的时间间隔, 单位秒, 默认为5, 建议不要小于5
  • EMAIL: 选填, 你的邮箱

运行python ddns.py

Docker

和本地运行类似,需要配置参数.

参数的具体含义请参考本地运行.

通过挂载配置文件方式:

docker run -d \
    --restart=always \
    --name=dnspod-ddns \
    -v your_ddnsrc_file_path:/etc/dnspod/ddnsrc\
     strahe/dnspod-ddns

通过传递环境变量的方式:

docker run -d \
    --restart=always \
    --name=dnspod-ddns \
    -e "LOGIN_TOKEN=token_id,token" \
    -e "DOMAIN=domain.com" \
    -e "SUB_DOMAIN=www"\
    -e "INTERVAL=10" \
    -e "[email protected]" \
    strahe/dnspod-ddns

dnspod-ddns's People

Contributors

strahe avatar ikuiki avatar

Watchers

James Cloos avatar Jackyang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.