=========
.. image:: https://badge.fury.io/py/simpledns.png
:target: http://badge.fury.io/py/simpledns
A lightweight yet useful proxy DNS server, inspired by `ChinaDNS <https://github.com/clowwindy/ChinaDNS>`__ , `dnsmasq-chinadns <https://github.com/styx-hy/dnsmasq-chinadns>`__ and `fqdns <https://github.com/fqrouter/fqdns>`__.
Install
-------
::
$ pip install simpledns
Usage
-----
Run ``sudo simpledns`` on your local machine. Then set your DNS server to 127.0.0.1.
::
$ dig www.twitter.com +short
twitter.com.
199.59.149.230
199.59.148.10
199.59.150.7
199.59.150.39
Advanced
--------
::
$ simpledns -h
usage: simpledns [-h] [-b BIND_ADDR] [-p BIND_PORT]
[--upstream-ip UPSTREAM_IP] [--upstream-port UPSTREAM_PORT]
[--query-timeout QUERY_TIMEOUT] [--min-ttl MIN_TTL]
[--max-ttl MAX_TTL] [--cache-size CACHE_SIZE] [-t]
[--hosts-file HOSTS_FILE] [--dispatch-conf DISPATCH_CONF]
[-v {0,1,2}] [-q] [-V]
A lightweight yet useful proxy DNS server
optional arguments:
-h, --help show this help message and exit
-b BIND_ADDR, --bind-addr BIND_ADDR
local address to listen
-p BIND_PORT, --bind-port BIND_PORT
local port to listen
--upstream-ip UPSTREAM_IP
upstream DNS server ip address
--upstream-port UPSTREAM_PORT
upstream DNS server port
--query-timeout QUERY_TIMEOUT
time before close port used for querying
--min-ttl MIN_TTL the minimum time a record is held in cache
--max-ttl MAX_TTL the maximum time a record is held in cache
--cache-size CACHE_SIZE
record cache size
-t, --tcp-server enables TCP serving
--hosts-file HOSTS_FILE
hosts file
--dispatch-conf DISPATCH_CONF
URL dispatch conf file
-v {0,1,2}, --verbosity {0,1,2}
output verbosity
-q, --quiet disable output
-V, --version print version number and exit
Configuration
-------------
Dispatch conf file uses the same rule as in `Dnsmasq <http://www.thekelleys.org.uk/dnsmasq/doc.html>`__. 'Address' and 'Server' rules are supported.
::
address=/example1.com/1.1.1.1
server=/example2.com/1.1.1.2
Default dispatch conf file is from `dnsmasq-china-list <https://github.com/felixonmars/dnsmasq-china-list>`__.
License
-------
The MIT License
Metadata
Release files for simpledns 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| simpledns-0.1.1.tar.gz | 10.5 kB | Without provenance | Details |
Release files / simpledns-0.1.1.tar.gz
| Download URL | simpledns-0.1.1.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd62ddb3608ac7b5e692ad68111d35ac8614bc3de6fc166151197a8258d43bfe
|
|
BLAKE2b-256 checksum How to use checksums |
1ff6d84df0f177fb88a67bbcdf9b03c23bfbd9494c50aa75239b728dee46af60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for simpledns 0.1.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.