Code Monkey home page Code Monkey logo

mdns's Introduction

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

mdns's People

Contributors

pcmid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fbion dcmmc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.