Skip to content

Consider adding a passthrough resolver that skips IPs  #18

Closed

Description

@clue

Quite a few libraries in the react ecosystem require this DNS component to resolve a given hostname to an IP address. This step has to be skipped if the given address is in fact an IP address instead of a hostname. A common pattern looks like this:

protected function resolveHostname($host)
{
    if (false !== filter_var($host, FILTER_VALIDATE_IP)) {
        return Promise\resolve($host);
    }
    return $this->resolver->resolve($host);
}

Given that this is a pretty common pattern, we should consider if it makes sense to add this as part of this DNS component.

Activity

  1. clue commented on Aug 9, 2017

    @clue
    MemberAuthor

    Afaict this is only really used in the Socket and the Datagram component, so I don't think it's worth the effort.

    There are currently no immediate plans to build this from my end (no demand at the moment), but I suppose we would be happy to accept PRs if anybody sees a need for this feature 👍

    I'm closing this for now, please feel free to come back with more details if this persists and we can reopen this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions