ddns

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

README

DDNS

使用CloudFlare API实现ddns

配置文件路径conf/conf.json,使用前请修改以下项:

  • x_auth_email:CloudFlare的注册邮箱
  • x_auth_key:CloudFlare的API Key
  • dns_record:DNS记录
    • type:目前仅支持A记录
    • name:需要解析的域名
    • content:IP地址
    • proxied:CloudFlare CDN加速
      • true:启用
      • false:关闭
  • username: 邮箱的用户名
  • password": 邮箱的密码或授权码
  • host": smtp服务器地址
  • from": 发送方信息,发信昵称和发信地址
  • to": 接收邮件的帐号信息

配置示例文件如下:

{
    "get_ip": {
        "url": [
            "http://pv.sohu.com/cityjson?ie=utf-8",
            "http://ip.taobao.com/service/getIpInfo.php?ip=myip"
        ],
        "retry": 3,
        "duration": 3000000000
    },
    "secret": {
        "x_auth_email": "mulin@bbcclive.com",
        "x_auth_key": "1234567890abcdef1234567890abcdef12345"
    },
    "dns_record": [
        {
            "type": "A",
            "name": "bbcclive.com",
            "content": "1.1.1.1",
            "proxied": true
        },
        {
            "type": "A",
            "name": "www.bbcclive.com",
            "content": "2.2.2.2",
            "proxied": true
        }
    ],
    "mail": {
        "username": "example@bbcclive.com",
        "password": "abcdefghijklmnop",
        "host": "smtp.bbcclive.com",
        "port": "25",
        "from": "BBCC DDNS\u003cexample@bbcclive.com\u003e",
        "to": [
            "to@bbcclive.com"
        ],
        "subject": "DDNS update notification",
        "content": "Update DNS Record",
        "duration": 3000000000
    },
    "duration": 3000000000
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL