Giter Site home page Giter Site logo

mosdns-container's Introduction

mosdns

mosdns

一个插件化的 DNS 转发/分流器。

项目地址: github.com/IrineSistiana/mosdns

Dockerfile: github.com/Sagit-chu/mosdns-container

支持的平台

  • linux/amd64
  • linux/arm/v7
  • linux/arm64

关于镜像

镜像基于 alpine:latest。包含 mosdns 和,TLS 需要的 ca 根证书包,配置文件,geoip.dat,geosite.dat。

配置文件在github.com/Sagit-chu/mosdns-container

流程:

  • cn 域名 -> 国内上游dot doh 返回是国内 ip -> 返回结果,结束. 不是国内 ip 继续下一步.
  • 非 cn 域名 -> 无污染dot doh上游 返回非国内 ip ? -> 返回结果,结束. 返回国内 ip 继续下一步.
  • 其他所有情况,优先无污染上游结果,否则国内上游结果.

geoip,geosite会随着镜像更新(挂载配置文件夹,数据文件也会随着镜像更新)

启动容器

docker run -d --name mosdns -p 5454:53/udp -p 5454:53/tcp  sagit.io/601096721/mosdns:latest

因为容器已经包含了配置文件,所以可以不映射/etc/mosdns,如果需要修改配置文件可以映射配置目录。

mosdns-container's People

Contributors

db-one avatar github-actions[bot] avatar mjyhj avatar renovate-bot avatar renovate[bot] avatar sagit-chu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mosdns-container's Issues

The upstream version has been bumped to 5.0.0

There have been several changes in the mosdns and the format of the config files.

  1. The parser of geoip.dat and geosite.dat has been removed from mosdns 5.0.0
  2. The listener became a brand-new plugin of mosdns.
  3. The function of sequence plugin became much more complex.

Before switching to mosdns v5, there are several tasks to be complete:

  1. The domain_list of CN and Ads
  2. The ip_addr_list of the ip addresses in CN
  3. The available config file

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
github-actions
.github/workflows/release.yml
  • actions/checkout v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3@343f7c4344506bcbf9b4de18042ae17996df046d
  • docker/login-action v3
  • docker/build-push-action v5
.github/workflows/sync-readme.yml
  • ms-jpq/sync-dockerhub-readme v1
.github/workflows/update-tag.yml
  • peter-evans/repository-dispatch v3

  • Check this box to trigger a request for Renovate to run again on this repository

默认配置dns有点问题

默认配置dns有点问题,可能与我ping1.1.1.1 ping不通有问题,ping 1.0.0.1是可以Ping通的。所以我在upstreaml里加了一个coudflare tls://1.0.0.1和一个google的tls://8.8.8.8
修改后被墙域名是可以访问了,但是还有一些错误,比如
WARN upstreams upstream error {"uqid": 1129, "qname": "auth.docker.io.", "qtype": 1, "qclass": 1, "upstream": "google", "error": "context deadline exceeded"}
WARN upstreams upstream error {"uqid": 1131, "qname": "api.github.com.", "qtype": 1, "qclass": 1, "upstream": "google", "error": "context deadline exceeded"}

context deadline exceeded是个什么意思?

update the config file

For the Dockerfile exposes the port 53, the listener in config v4 file should be changed from 5353 to 53

单独挂载config.yaml后报错

报错为无法加载
2022-05-17T03:16:55.757Z fatal coremain/run.go:37 failed to load config {"error": "failed to init plugin query_cn: failed to load entry ext:./geosite.dat:cn: open ./geosite.dat: no such file or directory"}

version: '3.3'
services:
    mosdns:
        container_name: mosdns
        ports:
            - '5454:53/udp'
            - '5454:53/tcp'
        image: '601096721/mosdns:latest'
        volumes:
           - /home/mosdns_data/config.yaml:/etc/mosdns/config.yaml

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.