murarth / resolve Goto Github PK
View Code? Open in Web Editor NEWDNS communication protocol
License: Apache License 2.0
DNS communication protocol
License: Apache License 2.0
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?
could you write a example use a custom config on windows ? Thanks a lot .
This crate implements IDNA with Punycode, but seems to be missing the "Nameprep" part. rust-url has that in a module: https://github.com/servo/rust-url/blob/master/src/idna.rs If you’re interested this could be a separate crate.
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.
Well, the feature is removed rust-lang/rust#27801
You mentioned in #1 that feature is "too deep in the code", but now it's gone. Any plans to remove it? Will you use ip crate from @dimbleby?
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.
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.
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?
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:
system_files
: Reads system files (nsswitch.conf, hosts, resolv.conf)dns_proto
: Parses and constructs DNS packetsAnd probably few different implementations of the real address resolution:
Probably some common parts of different implementations may be put to dns_proto
too.
What to do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.