Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Add Lua bindings, rules and action for DoH #8153

Merged
merged 8 commits into from Aug 7, 2019

Conversation

@rgacogne
Copy link
Member

@rgacogne rgacogne commented Aug 2, 2019

Short description

This PR adds:

  • HTTPPathRegexRule to be able to match the path of a DoH query with a regular expression ;
  • HTTPStatusAction to be able to return a specific HTTP response to a DoH query ;
  • Lua bindings (DNQuestion:getHTTPHeaders(), DNSQuestion:getHTTPHost(), DNSQuestion:getHTTPPath(), DNSQuestion:getHTTPQueryString() and DNSQuestion:getHTTPScheme()` to be able to inspect a DoH query from Lua ;
  • DNSQuestion:setHTTPResponse() to be able to return a specific HTTP response from Lua as well.

Fixes #8133.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
@rgacogne rgacogne added this to the dnsdist-1.4.0 milestone Aug 2, 2019
@rgacogne rgacogne changed the title Ddist doh http more dnsdist: Add Lua bindings, rules and action for DoH Aug 2, 2019
@rgacogne
Copy link
Member Author

@rgacogne rgacogne commented Aug 5, 2019

Travis failures are unrelated (network issues, apparently).

Loading

@rgacogne rgacogne force-pushed the ddist-doh-http-more branch from 2719fee to 1ddac02 Aug 5, 2019
@rgacogne
Copy link
Member Author

@rgacogne rgacogne commented Aug 5, 2019

Rebased to fix a conflict in dnsdist-lua-actions.cc.

Loading

Copy link
Member

@chbruyand chbruyand left a comment

LGTM!

Loading

pdns/dnsdist-lua-bindings-dnsquestion.cc Outdated Show resolved Hide resolved
Loading
@rgacogne rgacogne merged commit 016a165 into PowerDNS:master Aug 7, 2019
25 of 27 checks passed
Loading
@rgacogne rgacogne deleted the ddist-doh-http-more branch Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants