dirty-dns

Crates.iodirty-dns
lib.rsdirty-dns
version0.1.0
sourcesrc
created_at2019-08-15 11:14:01.360797
updated_at2019-08-15 11:14:01.360797
descriptionA simple and dirty dns server support match regex query name, get ip by execute command, etc.
homepage
repositoryhttps://github.com/jmjoy/dirty-dns
max_upload_size
id157010
size44,060
jmjoy (jmjoy)

documentation

README

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 ``
Commit count: 20

cargo fmt