apernet / OpenGFW

OpenGFW is a flexible, easy-to-use, open source implementation of GFW (Great Firewall of China) on Linux
https://gfw.dev/
Mozilla Public License 2.0
9.32k stars 703 forks source link

feat: dns lookup function #123

Closed tobyxdd closed 3 months ago

tobyxdd commented 3 months ago

Example of detecting proxy protocols that use "SNI spoofing" (such as Xray Reality):

- name: SNI mismatch
  action: block
  log: true
  expr: tls?.req?.sni != nil && ip.dst not in concat(lookup(tls.req.sni, "1.1.1.1:53"), lookup(tls.req.sni, "8.8.8.8:53"))