Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Straightforward DNS forwarder with cache, custom hosts and blocklists support

License

NotificationsYou must be signed in to change notification settings

r7wx/luna-dns

Repository files navigation


luna-dns

ReleaseBuildTestCodeFactor

Straightforward DNS forwarder with cache, custom hosts and blocklists support


Deployment

Standalone Executable

In order to run luna-dns as a standalone executable, you can build it from source code or download a pre-built binary from the latest release.

Build from source:

git clone https://github.com/r7wx/luna-dns.gitcd luna-dnsmake

Run executable:

./luna-dns<path-to-config-file>

Docker

You can deploy an instance of luna-dns by using Docker:

docker run -d --name=luna-dns \  -p 5355:5355/udp \  -v /path/to/config.yml:/etc/luna-dns/config.yml \  --restart unless-stopped \  r7wx/luna-dns:latest

The luna-dns image will always look for a configuration file in /etc/luna-dns/config.yml

Configuration

Luna DNS is configured via a YAML configuration file. A sample configuration is provided in the root of this repository (config.yml).

addr:"0.0.0.0:5355"# the address luna-dns will bind tonetwork:"udp"# luna-dns server protocol (udp or tcp supported)cache_ttl:14400# after how long the cached data is cleared (expressed in seconds)# if a valid file path is set the logs will be written to that file# leave empty to disable log filelog_file:"test.log"# remote dns servers to forward requests to (if not matching custom hosts)dns:  -addr:"8.8.8.8:53"# remote dns addr stringnetwork:"tcp"# remote dns protocol (udp or tcp supported)  -addr:"8.8.4.4:53"network:"udp"# custom hosts entrieshosts:  -host:google.com# custom host domain or pattern (wildcards supported)ip:127.0.1.1# custom host ip  -host:"test.com"ip:127.0.0.1  -host:"*.test.com"# wildcard pattern exampleip:127.0.0.1# luna-dns supports blocklists both from local files or remote URI# Blocklists must contain only one domain name per line.# Every blocked record resolves to 0.0.0.0# ex.# google.com# test.com# ...blocklists:  -http://test.test/test.txt  -file://folder/test.txt  -file:///root/test.txt# blocklists update time (in minute)blocklists_update:720# 12 hours (default)

[8]ページ先頭

©2009-2025 Movatter.jp