Giter Site home page Giter Site logo

Comments (5)

ekristen avatar ekristen commented on June 7, 2024

Can you share your configuration with me.

I'd also like to understand the behavior you are seeing a bit more too. I have several entries in my domains config and I don't see a problem.

Thanks!

from dns-proxy.

Gray1989 avatar Gray1989 commented on June 7, 2024

Sure, no problem. The configuration below also causes mail.google.com (as-well as many others) to result in the IP address I had set for www.facebook.com (192.168.0.17):

{"port":53,"host":"192.168.0.17","logging":"dnsproxy:query","nameservers":["208.67.222.222","208.67.220.220"],"servers":{},"domains":{"www.facebook.com":"192.168.0.17"},"hosts":{},"fallback_timeout":350}

This is because since the string mail.google.com does not contain the string www.facebook.com, the result of domain.indexOf(s) is -1... This is checked against the calculation of the length of the string mail.google.com (which is 15) subtracted by the length of the string www.facebook.com (which is 16), which also equals -1. Since the result of the calculation matches the index, it is assumed to be a match despite the fact that there is no relation whatsoever aside from the length of the strings.

Basically any preset domain settings are mistakenly matching any domains with exactly one less character. But thanks for the quick response, great job with the project otherwise!

from dns-proxy.

ekristen avatar ekristen commented on June 7, 2024

@Gray1989 thanks for the info, I understand your problem now. I can definitely fix that.

from dns-proxy.

Gray1989 avatar Gray1989 commented on June 7, 2024

No problem. Just thought I would point out an issue I already fixed on my end. I actually ended up making quite a few non-breaking changes to the code in order to get it working the way I want it. I would be willing to become a contributor to the project, I just have little experience actually using git-hub. If you are interested though let me know.

from dns-proxy.

ekristen avatar ekristen commented on June 7, 2024

I'm open to changes. Fork the repo and commit your changes against your fork and then do a PR against mine. I'll review, or you can do multiple PRs.

from dns-proxy.

Related Issues (18)

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.