Skip to main content

tinydns

license python

基于gevent异步IO框架实现的轻量DNS服务器,易于配置和启动,可安装于Python2或Python3环境, 可用于爬虫等业务中。

1.如何安装

使用pip 安装

pip install  tinydns

2.配置及使用示例

创建配置文件

vim /etc/tinydns.conf

在文件中输入如下内容:

[tinydns]
*.baidu.com = 192.168.1.1,192.168.1.2,192.168.1.3
www.baidu.com  = 192.168.1.4,192.168.1.5
image.baidu.com =  192.168.1.1

上面的配置文件所代表的意思是:

  • 所有符合*.baidu.com的域名(除了www.baidu.com image.baidu.com)均随机解析到192.168.1.1 192.168.1.2 192.168.1.3中的随意一个
  • 所有符合www.baidu.com的域名 随机解析到 192.168.1.4 192.168.1.5中的随机一个
  • 所有符合image.baidu.com的域名 解析到 192.168.1.1
  • 除了以上之外的域名则直接从本机网络设置中获取到对应的DNS记录返回给客户端

启动服务

tinydns -c /etc/tinydns.conf

备注:

如在服务运行中 修改了配置文件 无需重启,服务会自动加载新的配置文件内容。

3.联系我们

zhoukunpeng@gongchang.com
18438697706@163.com

Metadata

Release files for tinydns 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinydns 0.2.6
File Size Uploaded Provenance
tinydns-0.2.6.tar.gz 6.3 kB Without provenance Details

Release files / tinydns-0.2.6.tar.gz

Download URL tinydns-0.2.6.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6e01e7b78e2b8824fb4318a7dfcc1781aafcea51202695276a59ae08b210a2ba
BLAKE2b-256 checksum
How to use checksums
efeb85251b747137e5f107f2a73bc8c5da7b114976c12e4588c33f90346c6002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

Security for tinydns 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page