Giter Club home page Giter Club logo

dnspodsh's Introduction

dnspodsh

基于dnspod api构架的一键修改dnspod记录工具,满足需要批量切换dns指向的需求

可以配置多个逗号分隔的csv文件,例如gaofang.csv、idc.csv等。(csv文件可以在dnspod后台导出样例并修改)

这个脚本是我在dnspod的页面上找到的

我在原脚本的基础上做了几点修改:

  1. 支持token登录。DNSPOD官方推荐的方法,避免在脚本中直接使用账户和密码;
  2. 修改目标记录的新解析记录从配置文件中获取,支持多域名的A记录修改,同时支持CNAME等其他类型的修改;
  3. 解析类型只能从A记录解析变更为A记录解析,CNAME记录解析变更为CNAME记录解析(CNAME记录的域名后面需要带.);
  4. 修改目标记录同时可以根据配置信息修改对应ttl时间

大致逻辑:

  1. 最后一列去重判断总共有多少域名
  2. 分别拉取每个域名的子域名信息
  3. 根据列表文件中子域名信息,查找oldrecord(域名或IP),对比列表中的newrecord(域名或IP)
  4. 如果不相同,则修改

这个脚本原作者是zrong(zengrong.net),他写了一篇不错的文档来介绍脚本的使用方法,地址是:http://zengrong.net/post/1524.htm

dnspodsh's People

Contributors

sookey avatar

Forkers

raintears2

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.