Git Product home page Git Product logo

xdns.py's Introduction

关于xdns.py

xdns,py是针对DNS污染的一个解决方法的实现, 原理是加密UDP查询.

什么是DNS污染?

DNS查询时UDP协议, 不像TCP有握手确认通信的能力. GFW先于DNS服务器返回一个伪造的包, 告诉查询者错误的IP指向!

解决方法汇总?

下面列举写个人知道的防DNS污染方法.

使用TCP协议进行DNS查询

目前好像GFW还没有污染TCP查询(技术上好像不易实现).
但每个TCP查询都有三次握手, 关闭还要四次握手, 一个字: 慢! 有兴趣可查看 DnsByTcp 的实现.

过滤伪造的包(这个可行是因为伪造包中错误的IP地址不是完全随机的)

如果能知道伪造IP的可能列表, 感觉这个方法还是挺好的!
有兴趣可查看 DNSFilter 的实现.

加密UDP查询

加密DNS的请求包, GFW无法辨识请求包的内容就不会发出污染包!
不过,既然有加密就要有解密, 所以需要一个墙外的解密服务器!
另, 对于那些使用了CDN的网站来说, 这个真心不是好方法.

xdns.py's People

Contributors

isayme avatar

Watchers

 avatar

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.