mdns

command module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 5 Imported by: 0

README

mdns

一个支持插件的dns代理工具

配置

{
  "addr": ":53",
  "upstream": {
    "name": "Google DNS",
    "address": "8.8.8.8:53",
    "protocol": "tcp",
    "socks5_address": "127.0.0.1:1080",
    "timeout": 6
  },
  "plugins": [
    {
      "name": "log",
      "config": {
        "log_file": ""
      }
    },
    {
      "name": "cache",
      "config": {
        "capacity": 1024,
        "MTTL": 3600
      }
    },
    {
      "name": "dispatcher",
      "config": {
        "areas": {
          "TEST": {
            "upstream": {
              "name": "114 DNS",
              "address": "114.114.114.114:53",
              "protocol": "udp",
              "socks5_address": "",
              "timeout": 6
            },
            "domain_file": "config.sample.d/domain_test.txt"
          }
        }
      }
    },
    {
      "name": "ipset",
      "config": {
        "sets": {
          "TEST": {
            "domain_file": "config.sample.d/domain_test.txt",
            "ip_file": "config.sample.d/ip_test.txt"
          }
        }
      }
    }
  ]
}

  • addr: 监听地址
  • upstream: 上游
    • name: 名称
    • address: 地址
    • protocol: 协议, 支持udp,tcp,tcp-tls
  • plugins: 开启的插件及其配置,name为空表示不开启

插件

log

支持简单的查询日志记录

cache

缓存 最大缓存数量capacity和最小ttl MTTL

dispatcher

分流器,通过匹配domain_file执行分流策略,选择不同的上游

ipset

根据domain_file将查询到的ip插入ipset中,暂未支持ip_file

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
source: https://github.com/shawn1m/overture/blob/master/core/cache/cache.go Copyright (c) 2014 The SkyDNS Authors.
source: https://github.com/shawn1m/overture/blob/master/core/cache/cache.go Copyright (c) 2014 The SkyDNS Authors.
lib/ipset
Package ipset is a library providing a wrapper to the IPtables ipset userspace utility
Package ipset is a library providing a wrapper to the IPtables ipset userspace utility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL