Giter VIP home page Giter VIP logo

udpme's Introduction

udpme

udpme = UDP must have EDNS0。从协议层面借助 EDNS0 过滤掉有问题的 UDP 报文。全平台可用。

原理: udpme 会发送带 EDNS0 的请求报文,然后过滤掉没有 EDNS0 的应答报文。如果服务器支持 EDNS0,则会回应 EDNS0。因此过滤掉没有 EDNS0 报文可以过滤掉某些有问题的(假的)回应。

命令参数

  -l string
        监听地址。(默认 "127.0.0.1:5353")
  -u string
        UDP 上游地址。支持自定义端口。必需支持 EDNS0。 (默认 "8.8.8.8")
  -t    快速测试上游是否支持 EDNS0。

使用

正常使用:

udpme -l 127.0.0.1:5353 -u 8.8.8.8

测试服务器是否支持 EDNS0:

打印 edns0 response received 说明支持。打印 response received without edns0 说明不支持。

udpme -u 8.8.8.8 -t

或者也可以用 dig +edns 测试。

> dig +edns cloudflare.com @8.8.8.8

; <<>> DiG 9.16.1-Ubuntu <<>> +edns cloudflare.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2173
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512   <-- 支持 EDNS0 的服务器应答中会有这行 
;; QUESTION SECTION:
;cloudflare.com.			IN	A

;; ANSWER SECTION:
cloudflare.com.		300	IN	A	104.16.132.229
cloudflare.com.		300	IN	A	104.16.133.229

;; Query time: 7 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Mar 15 01:42:53 UTC 2022
;; MSG SIZE  rcvd: 75

udpme's People

Contributors

irinesistiana 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.