Giter Club home page Giter Club logo

ddns-aliyun's Introduction

简介

ddns-aliyun 是一个基于php,阿里云api的动态域名服务程序,适用于macOS,OpenWRT等类UNIX环境下,PPPoE拨号获取到的局域网ip映射。

环境配置

ddns-aliyun 需要php-cli环境,已在macOS和OpenWRT测试。

macOS可使用自带php。

亦可使用homebrew 独立安装最新版php。

brew install php

OpenWRT下可使用opkg安装php及相应扩展。

opkg install php5
opkg install php5-cli
opkg install zoneinfo-core
opkg install zoneinfo-asia
opkg install php5-mod-hash
opkg install php5-mod-json

下载

git clone https://github.com/StaZhu/ddns-aliyun.git

修改参数

请自行设置AccessKeyID,AccessKeySecret,域名,域名类型,前缀,ttl 六个参数的值。

测试

cd ddns-aliyun
php loader.php

定时运行

crontab -e

请按照 */10 * * * * /usr/local/bin/php /path/to/your/loader.php &> /dev/null 格式设定。

开头部分 */10代表每十分钟执行一次脚本,如果你的ttl设置为600,请保持当前参数,如果ttl设置为120,则可改为 */2 ,依次类推。

许可证

GPL General Public License 3.0 see http://www.gnu.org/licenses/gpl-3.0.html

ddns-aliyun's People

Contributors

stazhu avatar haobinnan avatar

Stargazers

Xin Zhang avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

haobinnan

ddns-aliyun's Issues

ipv6支持

如果支持ipv6解析会更好一些。

php7 有警告

[14-Jul-2019 00:00:01 UTC] PHP Warning: file_get_contents(http://dns.aliyuncs.com/?): failed to open stream: Connection timed out in /ddns/ddns.php on line 72
[14-Jul-2019 00:00:01 UTC] PHP Warning: Invalid argument supplied for foreach() in /ddns/ddns.php on line 96
[14-Jul-2019 00:04:00 UTC] PHP Warning: file_get_contents(http://dns.aliyuncs.com/?): failed to open stream: Connection timed out in /ddns/ddns.php on line 72
[14-Jul-2019 00:04:00 UTC] PHP Warning: Invalid argument supplied for foreach() in /ddns/ddns.php on line 96

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.