mafintosh / dnsjack

A simple DNS proxy that lets you intercept domains and route them to whatever IP you decide.
173 stars 29 forks source link

Added ability to filter DNS response packet from proxy server #4

Closed krisives closed 8 years ago

krisives commented 8 years ago

This adds the ability to filter and modify DNS packets before they are sent back to the user. The basic usage is this:

server.filter(function (buf) {
    // Inspect and possibly modify buffer
});
krisives commented 8 years ago

Is there anything I can do to help get this merged?

mafintosh commented 8 years ago

Thanks for the reminder. The indentation seems to be a bit off at places. Could you fix that? Also this should should be called map instead of filter I think. Other than that LGTM

krisives commented 8 years ago

I have a lot of changes in my upstream copy that will probably diverge because of the tabs/spaces problem, so that's probably not going to be merged anytime soon. Cheers!