#http #hyper #hyperium #dns #srv

hyper-srv

A wrapper around Hyper's connector with ability to preresolve SRV DNS records

7 unstable releases

0.4.1 Jan 7, 2022
0.4.0 Apr 12, 2021
0.3.0 Feb 15, 2020
0.2.1 Dec 17, 2019
0.1.1 Dec 9, 2019

#8 in #hyperium

Download history 19/week @ 2023-01-28 26/week @ 2023-02-04 27/week @ 2023-02-11 20/week @ 2023-02-18 16/week @ 2023-02-25 8/week @ 2023-03-04 10/week @ 2023-03-11 27/week @ 2023-03-18 15/week @ 2023-03-25 16/week @ 2023-04-01 20/week @ 2023-04-08 21/week @ 2023-04-15 10/week @ 2023-04-22 9/week @ 2023-04-29 20/week @ 2023-05-06 12/week @ 2023-05-13

54 downloads per month

MIT license

11KB
202 lines

Hyper SRV connector

Build Status

This crate provides a wrapper around Hyper's connector with ability to preresolve SRV DNS records before supplying resulting host:port pair to the underlying connector. The exact algorithm is as following:

  1. Check if a connection destination could be (theoretically) a srv record (has no port, etc). Use the underlying connector otherwise.
  2. Try to resolve the destination host and port using provided resolver (if set). In case no srv records has been found use the underlying connector with the origin destination.
  3. Use the first record resolved to create a new destination (A/AAAA) and finally pass it to the underlying connector.

lib.rs:

This crate provides a wrapper around Hyper's connector with ability to preresolve SRV DNS records before supplying resulting host:port pair to the underlying connector. The exact algorithm is as following:

  1. Check if a connection destination could be (theoretically) a srv record (has no port, etc). Use the underlying connector otherwise.
  2. Try to resolve the destination host and port using provided resolver (if set). In case no srv records has been found use the underlying connector with the origin destination.
  3. Use the first record resolved to create a new destination (A/AAAA) and finally pass it to the underlying connector.

Dependencies

~9–15MB
~276K SLoC