Skip to content
/ dns.sh Public
forked from tofuliang/dns.sh

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

Notifications You must be signed in to change notification settings

x1982/dns.sh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%