Total Pageviews

Monday 3 May 2021

利用dns proxy程序:mosdns-cn解决dns污染问题

 在本地机器mac上。安装go环境,然后,

cd $GOPATH
go get -u -v github.com/IrineSistiana/mosdns-cn/

(可执行文件mosdns-cn将会生成在$GOBIN/下)

然后运行ss客户端程序。然后,

sudo mosdns-cn -s 127.0.0.1:53 --upstream https://8.8.8.8/dns-query?socks5=127.0.0.1:1080 或者:

sudo mosdns-cn -s 127.0.0.1:53 --upstream tls://8.8.8.8?socks5=127.0.0.1:1080


这里直接连接上游dns server地址:https://8.8.8.8/dns-query或tls://8.8.8.8有可能连接不上。在这dns server地址的后面加上?socks5=127.0.0.1:1080意思就是通过本地机器的socks proxy去连接它们,这样就可以成功的连上它们

dns proxy程序:mosdns-cn就运行起来了。


使用实例:

sudo ./ipio_darwin_amd64 tun2brookserver -s vps-public-ip:5081 -p mypassword


sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1


运行ss客户端程序

sudo mosdns-cn -s 127.0.0.1:53 --upstream https://8.8.8.8/dns-query?socks5=127.0.0.1:1080 或者:

sudo mosdns-cn -s 127.0.0.1:53 --upstream tls://8.8.8.8?socks5=127.0.0.1:1080


这样,就可用vpn程序ipio顺利翻墙了。


项目地址:https://github.com/IrineSistiana/mosdns-cn

--------


DNS 路由/过滤/转发器。


mosdns

功能、配置、教程等,详见: wiki

下载预编译文件、更新日志,详见: release

docker 镜像: docker hub

插件和其对应的 args 参数说明,详见: wiki/Plugin

from https://github.com/IrineSistiana/mosdns

--------------------------

 Deploy DNS over HTTPS service on PaaS platforms (Heroku, Okteto, etc.) | 在 Heroku / Okteto 等免费 PaaS 服务平台上部署 Mosdns.

点击前往中文说明

Acknowledgments

Attention

Do not abuse service from PaaS platforms or your account could get banned. Deploy at your own risk.

Overview

This repo is for deploying mosdns DoH service which is an advanced DNS forwarder on various PaaS platforms (Heroku, Okteto, Railway, Northflank, fly.io, etc.).

未命名绘图 (1)

Deployment

  • Fork this repo
  • Modify /content/config.yaml to suit your needs. Default config file has ad-blocking and ECS enabled.
  • Strongly recommend custom DOH_PATH env value to prevent other ppl from abusing your deployment.

Deploy to Heroku

  • Heroku will stop offering free product plans and shut down free dynos starting Nov. 28, 2022.

Deploy

Deploy to Okteto, Railway, Northflank etc.

  • Link your forked repo in PaaS platform's dashboard
  • Set DOH_PATH env
  • Deploy

Deploy to Koyeb

  • Create a new release in your forked repo with a tag like "v0.0.1"
  • Wait for github action to finish
  • Use your new generated container image to deploy.

Deploy to fly.io

  • Install flyctl
  • git clone repo and change path to repo folder
  • edit fly.toml to set DOH_PATH env
# Login
flyctl auth login
# Create app
flyctl apps create <app_name>
# Set region https://fly.io/docs/reference/regions/
flyctl regions set <region_code> -a <app_name>
# Deploy
flyctl deploy --detach -a <app_name> --remote-only --no-cache 
from https://github.com/wy580477/Mosdns-on-PaaS 

----------------------------

相关帖子:https://briteming.blogspot.com/2019/07/dns-querysocks.html


No comments:

Post a Comment