Code Monkey home page Code Monkey logo

resolve's People

Contributors

dbrgn avatar hybrideidolon avatar murarth avatar

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

Watchers

 avatar  avatar  avatar

resolve's Issues

Support for NS records

Support for resolving NS records would be great.

In addition to raw record resolving, how easy would it be to provide a function to find the authoritative name servers for a domain?

Custom lookups

Would be great if you could add an example on how to query a TXT or SRV record. Right now it looks like that's a pretty low-level operation that requires to construct custom messages and questions.

"short message" error with larger SRV response

Resolving a SRV record that has multiple entries using resolve gives me a "ShortMessage" error:

Error: failed to resolve record: error decoding message: short message

An example SRV lookup with 6 responses that results in an error:

;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 25682
;; Flags: qr; QUERY: 1; ANSWER: 6; AUTHORITY: 0; ADDITIONAL: 0

;; QUESTION SECTION:
;; 795655663df60fab8f793ff4fb11de321a71c5ea.dat.local.  IN      SRV

;; ANSWER SECTION:
795655663df60fab8f793ff4fb11de321a71c5ea.dat.local. 120 IN      SRV     0 0 1024 70.50.214.32.
795655663df60fab8f793ff4fb11de321a71c5ea.dat.local. 120 IN      SRV     0 0 3282 94.19.245.14.
795655663df60fab8f793ff4fb11de321a71c5ea.dat.local. 120 IN      SRV     0 0 48628 35.193.163.202.
795655663df60fab8f793ff4fb11de321a71c5ea.dat.local. 120 IN      SRV     0 0 3282 180.157.225.236.
795655663df60fab8f793ff4fb11de321a71c5ea.dat.local. 120 IN      SRV     0 0 3282 132.239.132.167.
795655663df60fab8f793ff4fb11de321a71c5ea.dat.local. 120 IN      SRV     0 0 61360 72.182.35.118.

;; Received 569 B
;; Time 2018-02-15 20:24:36 PST
;; From 188.166.107.197@53(UDP) in 174.4 ms```

And one with a single answer that `resolve` handles fine:

```$ dig @discovery2.publicbits.org 892e5ef0875a89ac7e0b2c0184db9b09fccbcf36.dat.local SRV
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 51313
;; Flags: qr; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0

;; QUESTION SECTION:
;; 892e5ef0875a89ac7e0b2c0184db9b09fccbcf36.dat.local.  IN      SRV

;; ANSWER SECTION:
892e5ef0875a89ac7e0b2c0184db9b09fccbcf36.dat.local. 120 IN      SRV     0 0 48628 35.193.163.202.

;; Received 152 B
;; Time 2018-02-15 20:24:48 PST
;; From 188.166.107.197@53(UDP) in 207.9 ms```

This is some non-standard DNS usage (eg, not `_protocol.` style in a SRV lookup), but the single-response message works fine.

Push a new crates.io release?

Thanks for your quick turn-around on issue #16!

Could you push a new versioned release to crates.io? I tested with github master (as referenced in the README), but it's vastly safer (and thus rust-idiomatic) to point to a specific version instead of "the most latest commit".

Since 0.1.2, a method ("default_config") has been removed, so bumping to 0.2.x probably makes sense.

resolve_host fails

Hello,

resolve_host fails with error Invalid argument (os error 22) on Mac OS X El Captain. It does not matter which host name I try to resolve. Rust version 1.8 and the resolve version used is 0.1.1. I know there is not much info for you. How can I help?

Asynchronous DNS

Hi,

I'm trying to build a composable I/O framework on top of mio, and no wonder that I want DNS support for it. Would you like to join the effort?

What I'm thinking of, is having separate creates for the following things:

  1. system_files: Reads system files (nsswitch.conf, hosts, resolv.conf)
  2. dns_proto: Parses and constructs DNS packets

And probably few different implementations of the real address resolution:

  • Synchronous one based on stdlib types
  • Async one based on rotor
  • May be async one based on raw mio that is designed to be put to another thread

Probably some common parts of different implementations may be put to dns_proto too.

What to do you think?

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.