Skip to content

NetworkConnector to allow using a custom DNS server in Hyper

License

Notifications You must be signed in to change notification settings

cswindle/hyper-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyper DNS Resolver

Crates.io - hyper-dns Build Status License: MIT

NetworkConnector to allow using a custom DNS server with SRV records in Hyper.

Below shows a quick example of how this library can be used (you will need to have SRV records setup for the domain to query):

extern crate hyper_dns;
extern crate hyper;

use std::net::ToSocketAddrs;

fn main() {

    let dns_addr: std::net::SocketAddr = ("127.0.0.1", 8600).to_socket_addrs().unwrap().next().unwrap();

    let client = hyper::client::Client::with_connector(
        hyper_dns::DnsConnector::new(dns_addr, hyper::net::HttpConnector));

    client.get("http://test.service.consul/").send();
}

About

NetworkConnector to allow using a custom DNS server in Hyper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages