DDNS
自动更新DNS解析 到本机IP地址,支持 ipv4和ipv6 以 本地(内网)IP 和 公网IP。 代理模式,支持自动创建域名记录。
特性
[x] 多个域名支持
[x] 多级域名解析
[x] 内网IP
[x] 公网IP
[x] ipv6支持
[x] 代理模式(http代理)
[x] 定时任务
[x] 自动创建记录
[x] 多系统(Widnows, Linux, MacOS)
[x] 兼容 python2 和 python3
[x] 多厂商兼容支持:
[x] 文件缓存(减少服务器IP请求)
[ ] 二进制打包
[ ] 腾讯云
[ ] 同线路多记录支持
[ ] socks代理
[ ] 多代理自动切换
[ ] 简化混合配置
使用
example.config.json到config.jsonipv4和ipv6字段,没有则设为[],详细参照配置说明run.bat或者运行python run.py)配置
可以使用 -c使用指定的配置文件 (默认读取当前目录的 config.json)
python run.py -c /path/to/config.json
配置说明
| key | type | required | default | comment |
|---|---|---|---|---|
| id | string | Yes | 无 | api授权id |
| token | string | Yes | 无 | api授权token |
| dns | string | No | dnspod |
dns服务商,阿里为alidns,DNS.COM为dnscom,DNSPOD国际版为(dnspod_com) |
| ipv4 | array | No | [] | ipv4 域名列表 |
| ipv6 | array | No | [] | ipv6 域名列表 |
| index4 | string/int | No | ‘default’ | ipv4获取方式 |
| index6 | string/int | No | ‘default’ | ipv6获取方式 |
| proxy | string | No | 无 | 设置请求代理 |
| debug | boolean | No | false | 是否开启调试(输出调试信息) |
index4和index6参数说明
default 系统访问外网默认IP0,1,2,3等)第i个网卡ippublic使用公网ip(使用公网API查询)nku NKU网关ip(只支持ipv4)配置示例
{
"id": "12345",
"token": "mythokenkey",
"dns": "dnspod 或者 dnspod_com 或者 alidns 或者 dnscom",
"ipv4": [
"dns.newfuture.xyz",
"ipv4.dns.newfuture.xyz"
],
"ipv6": [
"dns.newfuture.xyz",
"ipv6.dns.newfuture.xyz"
],
"index4": "0",
"index6": "public",
"proxy": "127.0.0.1:1111",
"debug": false
}
定时任务
windows
需要已经安装python
task.bat (执行时会闪黑框)task.bat(或者在管理员命令行中运行)linux
运行
sudo ./task.sh
项目地址:https://github.com/NewFuture/DDNS
消息来源:DDNS 支持dnspod AliDNS DNS.COM | Zephyr