Skip to content
This repository has been archived by the owner on May 24, 2020. It is now read-only.
/ dirty-dns Public archive

A simple and dirty dns server support match regex query name, get ip by execute command, etc.

License

Notifications You must be signed in to change notification settings

jmjoy/dirty-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Deprecated

Prefer to use coredns with template plugin, which supports matching domain by regex.

dirty-dns

A simple and dirty dns server support match regex query name, get ip by execute command, etc.

Modify from dnsguide sample4.

Usage

USAGE:
    dirty-dns [OPTIONS] --config-file <PATH>

FLAGS:
        --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --config-file <PATH>    Set config file.
    -h, --host <HOST>           Which host the service to listen.
        --num-thread <COUNT>    How many thread will spawn.
    -p, --port <PORT>           Which port the service to listen.

Example Config

# Check query name is match left address or regexp.
[address]
'/w-(.*\.jmjoy\.top|.*\.jmjoy\.com)/' = "127.0.0.1"         # regexp surround with //
'/x-(.*\.jmjoy\.top|.*\.jmjoy\.com)/' = "env(RUST_TEST_IP)" # environment argument support
'/(.*\.jmjoy\.top|.*\.jmjoy\.com)/' = "`echo 127.0.0.1`"    # executeable command surround with ``

About

A simple and dirty dns server support match regex query name, get ip by execute command, etc.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages