Skip to content

Retrieve DNS resolution results at runtime #41605

@ovadiagal

Description

@ovadiagal

Hi there, I'm essentially trying to replicate something similar to this feature by Cloudflare.

Image

Specifically, I'm curious if Envoy can support steps [3] and [5] in the diagram above:

  • Step 3: DNS resolver returns a synthetic IP (e.g., 100.80.10.10) for a hostname
  • Step 5: When traffic arrives at that synthetic IP's listener, Envoy can recover original hostname that was mapped
    to this IP

I want to recover the original hostname because I want to upgrade traffic to HTTP CONNECT, which requires the original hostname in the CONNECT request.

The use case here is implementing wildcard egress policies (e.g., allow all *.aws.com traffic). With a wildcard policy, I don't know the fully qualified domain names until runtime (when the specific subdomains such as bucket1.aws.com is resolved). I'd prefer not to use SNI so that I can support all kinds of traffic.

Would Envoy be able to:

  1. Track DNS resolution mappings (hostname → synthetic IP)
  2. Retrieve the original hostname when traffic arrives at the synthetic IP
  3. Make this hostname available to the tunneling configuration

Is this a feasible addition to Envoy? Or is there an existing mechanism I'm missing that could achieve this? Thanks in advance ~

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dnsenhancementFeature requests. Not bugs or questions.stalestalebot believes this issue/PR has not been touched recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions