Coder Social home page Coder Social logo

dns.sh's Introduction

dns.sh

基于DNSPod用户API实现的纯Shell动态域名客户端,适配多个IP地址。

Config

复制dns.json.example到同一目录下的dns.json并根据你的配置修改即可。

执行时直接运行dns.sh,支持cron任务。

配置文件格式:

{
	"token":"yourApiToken",
	"domains":{
		"xxxx.xx":[
		    "\@",
			"www",
			"aaa"
		]
	},
	"ips":{
		"ip-chinanet":"ifconfig |grep inet|grep netmask|grep 192|awk '{print $2}'",
		"ip-chinamobile":"ifconfig |grep inet|grep netmask|grep 10|awk '{print $2}'",
		"ip-chinaunicom":"ifconfig |grep inet|grep netmask|grep 12|awk '{print $2}'"
	}
}

token 为Dnspod生成的APIToken.

domians 可以配置多个域名及子域名.

ips 可以配置多个,键为ip的备注(对应dnspod上的记录备注),值为获取ip的命令.

Credit

jq

filedb

Inspired by ArDNSPod

dns.sh's People

Contributors

tofuliang avatar

Watchers

James Cloos avatar  avatar

Forkers

x1982

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.