#dns-records #srv #hyper #dns #hyper-http #http #hyperium

hyper-srv

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

9 releases (5 breaking)

new 0.6.0 Dec 12, 2024
0.5.0 Oct 22, 2023
0.4.1 Jan 7, 2022
0.4.0 Apr 12, 2021
0.1.1 Dec 9, 2019

#1791 in Network programming

Download history 49/week @ 2024-09-23 5/week @ 2024-09-30 10/week @ 2024-10-07 3/week @ 2024-10-14 7/week @ 2024-11-04 8/week @ 2024-11-18 202/week @ 2024-12-09

210 downloads per month

MIT license

14KB
190 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–17MB
~218K SLoC