Manage your DNS records with ease.
Project description
dns-manager
一个可扩展的 DNS 管理工具。
安装 
使用 pip/pipx/uv 安装
在此之前请确保安装 Python3.10 及以上版本,并安装了 pip。
pip install dns-manager[all]
如果想要尝试 Nightly 版本,可尝试(需确保使用 Python3.12)
pip install git+https://github.com/zrr1999/dns-manager@main
pipx install dns-manager[all]
uv tool install dns-manager[all]
pipx/uv 会无感地为 dns-manager 创建一个虚拟环境,与其余环境隔离开,避免污染其他环境, 因此相对于 pip,pipx/uv 是更推荐的安装方式。
使用说明
基础示例
首先创建一个配置文件,例如类似 examples/simple.toml 文件中的内容,如下:
[test]
domain = "mydomain.com"
setter_name = "cloudflare"
records = [
[
"test", # 也就是 test.mydomain.com 指向的路径
"baidu.com" # 解析值,目前只支持 A 记录和 CNAME 记录,会根据此处的值自动判断
]
]
然后执行以下命令:
dns-manager update examples/simple.toml
# dnsm update examples/simple.toml
此时,你的解析记录就会增加一条 test.mydomain.com 的 CNAME 记录指向 baidu.com 。
支持的 dns 提供商
本项目实现了一个 lexicon 的适配 Setter, 支持情况与其一致。
定时执行
你可以使用 cronie 定时执行,例如
@reboot dnsm update ~/.config/dns-manager/config.toml
@hourly dnsm update ~/.config/dns-manager/config.toml
你可以通过下面的命令添加定时任务
(crontab -l 2>/dev/null; echo "@reboot dnsm update ~/.config/dns-manager/config.toml") | crontab
(crontab -l 2>/dev/null; echo "@hourly dnsm update ~/.config/dns-manager/config.toml") | crontab
如何贡献
非常欢迎你的加入!提一个 Issue 或者提交一个 Pull Request。
贡献者
感谢以下参与项目的人:
使用许可
GNU © Rongrui Zhan
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dns_manager-1.0.0-py312-none-any.whl.
File metadata
- Download URL: dns_manager-1.0.0-py312-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3.12
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c47a200f7eeb3bc449705ae4220d1b9d8c935508ffad5f61707e51ed171eefc
|
|
| MD5 |
308e1af5bf2d32a07c193f24b4b1c09d
|
|
| BLAKE2b-256 |
35da784c234db91071a1760dbfe7352346f27d44859b48549884e0c94b2a449a
|
Provenance
The following attestation bundles were made for dns_manager-1.0.0-py312-none-any.whl:
Publisher:
release.yml on zrr-lab/dns-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dns_manager-1.0.0-py312-none-any.whl -
Subject digest:
3c47a200f7eeb3bc449705ae4220d1b9d8c935508ffad5f61707e51ed171eefc - Sigstore transparency entry: 775064990
- Sigstore integration time:
-
Permalink:
zrr-lab/dns-manager@bfcdf21605e79a5f2c59dfbe74b19f2a0ed326ac -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zrr-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bfcdf21605e79a5f2c59dfbe74b19f2a0ed326ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file dns_manager-1.0.0-py311-none-any.whl.
File metadata
- Download URL: dns_manager-1.0.0-py311-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3.11
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ef036ae470a21577bd5051736ec51ff6a60e7efed828974cff864405c6f81d2
|
|
| MD5 |
c90d927687e4435ef59a25cd24cc42c4
|
|
| BLAKE2b-256 |
e12fe7e8394f2d10181a2c734340a2db6f41ceaee55ad925b44290bd711d3dbf
|
Provenance
The following attestation bundles were made for dns_manager-1.0.0-py311-none-any.whl:
Publisher:
release.yml on zrr-lab/dns-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dns_manager-1.0.0-py311-none-any.whl -
Subject digest:
0ef036ae470a21577bd5051736ec51ff6a60e7efed828974cff864405c6f81d2 - Sigstore transparency entry: 775064988
- Sigstore integration time:
-
Permalink:
zrr-lab/dns-manager@bfcdf21605e79a5f2c59dfbe74b19f2a0ed326ac -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zrr-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bfcdf21605e79a5f2c59dfbe74b19f2a0ed326ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file dns_manager-1.0.0-py310-none-any.whl.
File metadata
- Download URL: dns_manager-1.0.0-py310-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3.10
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5b664ea4ce861b92a8108b95fa31871d8e11e82baa9e432ed14ab751c4dfdc
|
|
| MD5 |
c98e8edcdbd94f4354432351fde1bed8
|
|
| BLAKE2b-256 |
46939f1ae229837f78bcabb8608afee23f45586fe31102522c305ff6f5da1c79
|
Provenance
The following attestation bundles were made for dns_manager-1.0.0-py310-none-any.whl:
Publisher:
release.yml on zrr-lab/dns-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dns_manager-1.0.0-py310-none-any.whl -
Subject digest:
cb5b664ea4ce861b92a8108b95fa31871d8e11e82baa9e432ed14ab751c4dfdc - Sigstore transparency entry: 775064984
- Sigstore integration time:
-
Permalink:
zrr-lab/dns-manager@bfcdf21605e79a5f2c59dfbe74b19f2a0ed326ac -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zrr-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bfcdf21605e79a5f2c59dfbe74b19f2a0ed326ac -
Trigger Event:
push
-
Statement type: