同步存储在平面文件格式中的DNS记录到您的DNS提供商。
项目描述
同步存储在平面文件格式中的DNS记录到您的DNS提供商。目前提供Cloudflare支持。
安装 
$ pip install namesync
快速指南
创建一个以您域名命名的文件
$ touch example.com
或者,如果您有现有记录,可以导出它们
$ namesync --get example.com
每行输入一个记录,格式如下
<record-type> <name> <value> <ttl:optional>
例如
A * 10.10.10.10 # You can even use comments A . 10.10.10.10 # . references the domain itself, example.com A test 10.10.10.11 A example 10.10.10.12 86400 CNAME mail ghs.googlehosted.com MX . aspmx.l.google.com
MX记录允许您指定优先级
MX <name> <value> <priority:optional> <ttl:optional>
如下所示
MX . alt1.aspmx.l.google.com 20 MX . aspmx3.googlemail.com 30 86400
如果值包含空格,请将其引号括起来
TXT . "v=spf1 a include:amazonses.com include:_spf.google.com ~all"
然后同步您的记录
$ namesync example.com
在同步之前,您将有机会审查您的更改
The following changes will be made: ADD A * 10.10.10.10 ADD A example 10.10.10.12 86400 ADD A test 10.10.10.11 ADD CNAME mail ghs.googlehosted.com ADD MX . aspmx.l.google.com UPDATE A . 10.10.10.10 REMOVE A old 10.10.10.13 Do you want to continue? [y/N]
用法
usage: namesync [-h] [-g] [-z ZONE] [-y] [-d DATA_DIR] [-t] RECORDS positional arguments: RECORDS file containing DNS records, one per line. The zone is derived from the basename of this file. For example, if "dns/example.com" is used then the zone is assumed to be "example.com" unless the --zone option is used optional arguments: -h, --help show this help message and exit -g, --get save existing DNS records to RECORDS -z ZONE, --zone ZONE specify the zone instead of using the RECORDS filename -y, --yes sync records without prompting before making changes -d DATA_DIR, --data-dir DATA_DIR the directory where namesync.conf and other cache data is stored. [default: ~/.namesync] -t, --dry-run print actions and exit without making any changes
项目详情
关闭
namesync-0.4.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | c752b1865f2fe17eef30fb90e1a06e7211dc03f4860d5789f8b451c397f17590 |
|
MD5 | 498d73a07a7bab6654eb2903242b3016 |
|
BLAKE2b-256 | e1f13a1ee045b91cfecaca400d5bfcfc92beb60271914929f8fd85f847a51bf6 |