Comments (5)
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.
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.
@Gray1989 thanks for the info, I understand your problem now. I can definitely fix that.
from dns-proxy.
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.
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)
- Requester ip address
- Allow logging to go to file vs stdout
- Doesn't work when installed as a package dependency HOT 3
- Add Support for Wildcards within Domain Specific Answers
- Unable to use it HOT 1
- Add IPv6 support HOT 1
- Using launchdaemon randomly caused EMFILE errors HOT 1
- Add DNS over TLS (for Cloudflare 1.1.1.1 Support)
- Add DNS over HTTPS (for Cloudflare 1.1.1.1)
- NPM still holds Version 0.6.2 HOT 3
- ERR_SOCKET_CANNOT_SEND HOT 5
- Release binary broken HOT 2
- startup script HOT 1
- Dependency Dashboard
- Ask about https
- Add regex support
- non-alias host entry crashes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dns-proxy.