GithubHelp home page GithubHelp logo

notwaldorf / cat-dns Goto Github PK

View Code? Open in Web Editor NEW
203.0 203.0 23.0 18 KB

:computer::cat: A DNS server that resolves everything to cats.

Home Page: http://meowni.ca/posts/go-cat-dns-go/

License: MIT License

JavaScript 100.00%

cat-dns's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cat-dns's Issues

Thanks for helping me learn packet handling in Node

The issues I've opened have been filed in good humour, in case you're interested in figuring ways to handle them. I also have patches for them, but wasn't sure if that would be some kind of spoiler for the enjoyment of tinkering with low-level protocols.

just asking

Why cats ?
why not any other thing or animals ?

Is this because CATS have ESP ?

or any other reason ?

&& why intel-coders love CATS so much ?
I can't figure it out..

PS I don't hate cats, I love wild-cats

cat-dns qname parsing does not work with EDNS0 options

The cat-dns query name parser assumes that the query name is at the end of the DNS query, minus 4 bytes. This doesn't work if the query includes an EDNS0 option. See RFC2671, EDNS0 options show up as OPT records in the additional section of a query. To parse the query name, you need to start 12 bytes in to the message (after the header) and then add each label, so; www.example.com appears on the wire as;

\3www\7example\3com\0

so the full qname length in bytes is is 3 + 1 + 7 + 1 + 3 + 1 + 0 + 1 (the plus ones are for the byte encoding the label length) and iteration is needed.

Technically this math is valid only if the label length is a value <= 63 (otherwise it's a label-compressed pointer, and counts as one byte), but this can be ignored in the question section (which is never compressed).

cat-dns is not authoritative

cat-dns.js behaves like an authoritative name-server, but does not set the AA bit. Surely cat-dns is authoritative about cats in dns.

cat-dns answers are invalid

cat-dns's answers don't include the original question, in violation of RFC1035. DNS answers must include the original question being asked. So the qd_count should be 1, the an_count should be 1 (since cats have just one IP address) and ar_count and ns_count should always be zero.

Feature request: label compression for cat-dns

Per #5 cat-dns does not include the original question. One fix for this is to simply emit the question section and answer section in full, e.g.;

[12 byte header]
\3www\7example\3com\0\0\1\0\1
\3www\7example\3com\0\0\1\0\1\0\0\0\1\0\0\4\54\197\244\191

but DNS also supports label compression where labels can point to previous identical labels. See section 4.1.4. of RFC1035.

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.