Giter Club home page Giter Club logo

domain's People

Contributors

briansmith avatar clearlyclaire avatar debris avatar gilbertw1 avatar partim avatar rushmorem 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

domain's Issues

It returns gibberish

I want to retrieve only MX

    let mut core = Core::new().unwrap();
    let resolv = Resolver::new(&core.handle());
    let name = DNameBuf::from_str("www.rust-lang.org.").unwrap();

    let mx_req = resolv.query((name, Rtype::Mx, Class::In));
    let mx = core.run(mx_req).unwrap();

    for record in mx.answer().unwrap() {
        println!("{}", record.unwrap());
    }

But the answer contains only CNAME.
Also, why does it require the dot in the end of a URL? Otherwise it panics at runtime.

Could not compile domain

error[E0432]: unresolved import `tokio_core::channel::Receiver`
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/request.rs:33:27
   |
33 | use tokio_core::channel::{Receiver, Sender};
   |                           ^^^^^^^^ Could not find `channel` in `tokio_core`

error[E0432]: unresolved import `tokio_core::channel::Sender`
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/request.rs:33:37
   |
33 | use tokio_core::channel::{Receiver, Sender};
   |                                     ^^^^^^ Could not find `channel` in `tokio_core`

error[E0432]: unresolved import `tokio_core::channel::channel`
  --> .cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/service/mod.rs:21:5
   |
21 | use tokio_core::channel::channel;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `channel` in `tokio_core`

error: aborting due to 3 previous errors

error: Could not compile `domain`.

The tokio-core downloaded by cargo automatically is v0.1.6.
The environment i'm using is
4.8.0-41-generic #44~16.04.1-Ubuntu
cargo 0.19.0-nightly (c995e9eb5 2017-03-17)

Couldn't build on nightly

When I try to build latest commit 9958a54 with nightly rustc 1.30.0-dev (52c785bfc 2018-08-08) I get errors:

   Compiling domain v0.3.0 (file:///mnt/another/srcs/GIT/domain)
     Running `rustc --crate-name domain src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=87fc5076fb9ca965 -C extra-filename=-87fc5076fb9ca965 --out-dir /mnt/another/srcs/GIT/domain/target/release/deps -L dependency=/mnt/another/srcs/GIT/domain/target/release/deps --extern base64=/mnt/another/srcs/GIT/domain/target/release/deps/libbase64-0361a0558368b386.rlib --extern bytes=/mnt/another/srcs/GIT/domain/target/release/deps/libbytes-cd12887ded74a0dd.rlib --extern chrono=/mnt/another/srcs/GIT/domain/target/release/deps/libchrono-5f2afb162ca6089a.rlib --extern failure=/mnt/another/srcs/GIT/domain/target/release/deps/libfailure-b9c1c6cfa783236d.rlib --extern failure_derive=/mnt/another/srcs/GIT/domain/target/release/deps/libfailure_derive-9202c4472f7e8fed.so --extern futures=/mnt/another/srcs/GIT/domain/target/release/deps/libfutures-ff1458c073f460e0.rlib --extern rand=/mnt/another/srcs/GIT/domain/target/release/deps/librand-ff601df1196eaccb.rlib --extern tokio=/mnt/another/srcs/GIT/domain/target/release/deps/libtokio-b7e2d3be332df088.rlib -L native=/mnt/another/srcs/GIT/domain/target/release/build/backtrace-sys-8f11f1bd0862fc3f/out`
warning: unnecessary parentheses around function argument
  --> src/utils/base32.rs:49:25
   |
49 |         f.write_char(ch((chunk[4] & 0x1F)))?; // 7
   |                         ^^^^^^^^^^^^^^^^^ help: remove these parentheses
   |
   = note: #[warn(unused_parens)] on by default

warning: use of deprecated item 'std::ascii::AsciiExt': use inherent methods instead
  --> src/bits/charstr.rs:28:5
   |
28 | use std::ascii::AsciiExt;
   |     ^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(deprecated)] on by default

warning: use of deprecated item 'std::ascii::AsciiExt::to_ascii_lowercase': use inherent methods instead
   --> src/bits/charstr.rs:292:25
    |
292 |         self.iter().map(AsciiExt::to_ascii_lowercase)
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'std::ascii::AsciiExt::to_ascii_lowercase': use inherent methods instead
   --> src/bits/charstr.rs:294:36
    |
294 |                               .map(AsciiExt::to_ascii_lowercase))
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'std::ascii::AsciiExt::to_ascii_lowercase': use inherent methods instead
   --> src/bits/charstr.rs:300:25
    |
300 |         self.iter().map(AsciiExt::to_ascii_lowercase)
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'std::ascii::AsciiExt::to_ascii_lowercase': use inherent methods instead
   --> src/bits/charstr.rs:301:35
    |
301 |             .cmp(other.iter().map(AsciiExt::to_ascii_lowercase))
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'std::ascii::AsciiExt::to_ascii_lowercase': use inherent methods instead
   --> src/bits/charstr.rs:310:25
    |
310 |         self.iter().map(AsciiExt::to_ascii_lowercase)
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: `N` doesn't implement `std::fmt::Debug`
   --> src/bits/record.rs:495:34
    |
495 | #[derive(Clone, Copy, Debug, Eq, Fail, PartialEq)]
    |                                  ^^^^ `N` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
    |
    = help: the trait `std::fmt::Debug` is not implemented for `N`
    = help: consider adding a `where N: std::fmt::Debug` bound
    = note: required because of the requirements on the impl of `std::fmt::Debug` for `bits::record::RecordParseError<N, D>`

error[E0277]: `D` doesn't implement `std::fmt::Debug`
   --> src/bits/record.rs:495:34
    |
495 | #[derive(Clone, Copy, Debug, Eq, Fail, PartialEq)]
    |                                  ^^^^ `D` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
    |
    = help: the trait `std::fmt::Debug` is not implemented for `D`
    = help: consider adding a `where D: std::fmt::Debug` bound
    = note: required because of the requirements on the impl of `std::fmt::Debug` for `bits::record::RecordParseError<N, D>`

error[E0277]: `N` cannot be shared between threads safely
   --> src/bits/record.rs:495:34
    |
495 | #[derive(Clone, Copy, Debug, Eq, Fail, PartialEq)]
    |                                  ^^^^ `N` cannot be shared between threads safely
    |
    = help: within `bits::record::RecordParseError<N, D>`, the trait `std::marker::Sync` is not implemented for `N`
    = help: consider adding a `where N: std::marker::Sync` bound
    = note: required because it appears within the type `bits::record::RecordParseError<N, D>`

error[E0277]: `D` cannot be shared between threads safely
   --> src/bits/record.rs:495:34
    |
495 | #[derive(Clone, Copy, Debug, Eq, Fail, PartialEq)]
    |                                  ^^^^ `D` cannot be shared between threads safely
    |
    = help: within `bits::record::RecordParseError<N, D>`, the trait `std::marker::Sync` is not implemented for `D`
    = help: consider adding a `where D: std::marker::Sync` bound
    = note: required because it appears within the type `bits::record::RecordParseError<N, D>`

error[E0277]: `N` cannot be sent between threads safely
   --> src/bits/record.rs:495:34
    |
495 | #[derive(Clone, Copy, Debug, Eq, Fail, PartialEq)]
    |                                  ^^^^ `N` cannot be sent between threads safely
    |
    = help: within `bits::record::RecordParseError<N, D>`, the trait `std::marker::Send` is not implemented for `N`
    = help: consider adding a `where N: std::marker::Send` bound
    = note: required because it appears within the type `bits::record::RecordParseError<N, D>`

error[E0277]: `D` cannot be sent between threads safely
   --> src/bits/record.rs:495:34
    |
495 | #[derive(Clone, Copy, Debug, Eq, Fail, PartialEq)]
    |                                  ^^^^ `D` cannot be sent between threads safely
    |
    = help: within `bits::record::RecordParseError<N, D>`, the trait `std::marker::Send` is not implemented for `D`
    = help: consider adding a `where D: std::marker::Send` bound
    = note: required because it appears within the type `bits::record::RecordParseError<N, D>`

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0277`.
error: Could not compile `domain`.

Resolver configuration on Windows

The resolver configuration is currently read only from /etc/resolv.conf which won’t work on Windows.

Since I don’t have access to a Windows machine, some help is necessary.

Name compression must consider case

When comparing domain names for deciding whether to compress the rest of the name or not, the case of ASCII letters in the name must be considered in order for the decompressed name to be identical to the original one.

Hint: use a Vec<u8> as the key into the map, not a DNameBuf. This may break for binary labels, but so what.

Query DNS records directly?

Is there a way to query DNS records directly without futures?

Just want to directly look up the CNAME , A, AAAA, etc for a host so I can trace through them by hand. (working on a DNS mapping tool)

Failed to compile with tokio-core v0.1.6

Errors are

error[E0432]: unresolved import `tokio_core::channel::Receiver`
  --> /Users/zonyitoo/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/request.rs:33:27
   |
33 | use tokio_core::channel::{Receiver, Sender};
   |                           ^^^^^^^^ Could not find `channel` in `tokio_core`

error[E0432]: unresolved import `tokio_core::channel::Sender`
  --> /Users/zonyitoo/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/request.rs:33:37
   |
33 | use tokio_core::channel::{Receiver, Sender};
   |                                     ^^^^^^ Could not find `channel` in `tokio_core`

error[E0432]: unresolved import `tokio_core::channel::channel`
  --> /Users/zonyitoo/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/service/mod.rs:21:5
   |
21 | use tokio_core::channel::channel;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `channel` in `tokio_core`
error: the type of this value must be known in this context
  --> /Users/zonyitoo/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/service/sequential.rs:72:61
   |
72 |             State::Reading(mut fut) => fut.take().map(|res| res.2),
   |                                                             ^^^^^

error: the type of this value must be known in this context
  --> /Users/zonyitoo/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/service/sequential.rs:90:21
   |
90 |                     request.set_id(rand::random());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: the type of this value must be known in this context
   --> /Users/zonyitoo/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.1.0/src/resolv/service/mod.rs:255:33
    |
255 |                     State::Idle(receiver.into())
    |                                 ^^^^^^^^^^^^^^^

Change master file scanner to operate on `char`.

The scanner currently operates on u8 directly assuming ASCII-compatible encodings of master files. This may not be true on Windows.

Change the scanner to operate on char, reading its data from a Iterator<Item=char>.

Setting DNS information for Windows

get list of windows adapters:
netsh interface show interface

Which will show the name under the "Interface Name" column (shown here in bold):

`Admin State State Type Interface Name

Enabled Connected Dedicated Ethernet
`
add dns server to an interface:

netsh interface ipv4 add dnsserver "Ethernet" address=192.168.x.x index=1

Help on using netsh int ipv4 set dns

`C:\Users\User>netsh int ipv4 set dns help

Usage: set dnsservers [name=] [source=]dhcp|static
[[address=]|none]
[[register=]none|primary|both]
[[validate=]yes|no]

Parameters:

Tag Value
name - The name or index of the interface.
source - One of the following values:
dhcp: Sets DHCP as the source for configuring DNS
servers for the specific interface.
static: Sets the source for configuring DNS servers
to local static configuration.
address - One of the following values:
: An IP address for a DNS server.
none: Clears the list of DNS servers.
register - One of the following values:
none: Disables Dynamic DNS registration.
primary: Register under the primary DNS suffix only.
both: Register under both the primary DNS suffix, as
well as under the connection-specific suffix.
validate - Specifies whether validation of the DNS server setting
will be performed. The value is yes by default.

Remarks: Sets DNS server configuration to either DHCP or static mode. Only
when source is 'static', is the 'addr' option also available for
configuring a static list of DNS server IP addresses for the
specified interface. If Validate switch is yes, then
the newly set DNS server is validated.

Examples:

set dnsservers name="Wired Ethernet Connection" source=dhcp
set dnsservers "Wired Ethernet Connection" static 10.0.0.1 primary
`

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.