GithubHelp home page GithubHelp logo

byxlk / aliyundns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mickyxing/aliyundns

0.0 2.0 0.0 22 KB

通过阿里云域名动态解析IP地址

Home Page: http://aimijia.net/2016/01/aliyundns/

Python 100.00%

aliyundns's Introduction

该项目为使用aliyun动态解析域名脚本,采用python编写,主要适用于在家里自己捣腾服务器的朋友们。由于家用宽带没有固定ip,所以一旦家里的路由器重新拨号了会分配到新的公网ip地址,这会导致在外网无法访问到服务器。东西很简单,一般有点编程知识的人都能看懂,不过在使用前最好再了解下以下几个注意点:

1.请记得保管好你的Access Key,所以我没有在我的代码里直接写Access Key Id和Access Key Secret,我把他们单独放在一个key.json文件中,同时将这个文件排除出git,保证只有我自己知道,因为一旦这两个值泄露了那别人就可以直接修改你的域名了。

2.阿里云通过RecordId来区分每条域名解析记录,但是他们之前文档上对于这个参数的描述只写了“解析记录的ID”,没有写如何获取这条解析记录ID,我去我的阿里云控制台上找了好久都没找到,到后来我突然想到sdk上有获取域名信息的api,我试着用这个果然返回的信息里有这个字段,后来联系了他们客服,他们也说在控制台上没办法找到,也只有通过api获取域名信息才能找到,后来他们也在文档中注明了这个字段的获取方式。

3.更新域名解析主要用到的是阿里云sdk包里aliyun/api/rest/Dns20150109UpdateDomainRecordRequest.py 方法,我为了偷懒直接在这个方法里写死了一些需要固定传入的参数,如果你要对自己的域名做解析的话记得去修改这些参数值。

aliyundns's People

Contributors

mickyxing avatar

Watchers

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