Giter VIP home page Giter VIP logo

aliyunddns's Introduction

阿里云DNS动态解析

支持多解析记录

git clone https://github.com/SNBQT/aliyunddns.git

安装 python sdk, pyaml

pip install aliyun-python-sdk-alidns pyaml

修改配置文件 setting.yaml

cp setting.yaml.sample setting.yaml
vi setting.yaml
# 阿里云 Access Key ID
access_key_id: "XXX"

# 阿里云 Access Key Secret
access_key_secret: "XXXXXX"

# 阿里云 一级域名
rc_domain: 'github.com'

# 解析记录
rc_rr_list: ['www','*.git']

Access Key

通过阿里云Access Key管理, 获取access_key_id,access_key_secret。

添加域名解析记录

修改好你使用的一级域名,通过阿里云域名管理,添加A记录,对一级域名的解析使用记录值为‘*’,A记录可以为你的二级域名,如 www.github.com, *.git.github.com。记录值随便写 8.8.8.8,因为后面会根据实际的IP进行动态更改。

crontab 定时运行

crontab -e
# Run at every 10th minute
# */10 * * * * /usr/bin/python /path_to/aliyun_ddns.py >> /path_to/run.log 2>&1
*/10 * * * * /usr/bin/python /path_to/aliyun_ddns.py /dev/null 1>/dev/null

aliyunddns's People

Contributors

snbqt avatar macuilxochitl 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.