Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/net/dns: add LookupCNAME #29039

Closed
therealjoesmith opened this issue Nov 30, 2018 · 8 comments
Closed

x/net/dns: add LookupCNAME #29039

therealjoesmith opened this issue Nov 30, 2018 · 8 comments

Comments

@therealjoesmith
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.11.1 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What did you do?

https://play.golang.org/p/HTHVSd81SPJ

What did you expect to see?

I wanted to see the chain of CNAME records for www.microsoft.com.

What did you see instead?

Go returns only the last record. That's correct (it is the canonical name after all), but there are situations where it's interesting to probe the chain. On the command line, try:

$ host www.microsoft.com
www.microsoft.com is an alias for www.microsoft.com-c-3.edgekey.net.
www.microsoft.com-c-3.edgekey.net is an alias for www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net.
www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net is an alias for e13678.dspb.akamaiedge.net.
e13678.dspb.akamaiedge.net has address 23.211.9.92
e13678.dspb.akamaiedge.net has IPv6 address 2a02:26f0:d3:484::356e
e13678.dspb.akamaiedge.net has IPv6 address 2a02:26f0:d3:48c::356e

I'd like functions that return a []string of the intermediaries instead of just the final CNAME.

@gopherbot gopherbot added this to the Proposal milestone Nov 30, 2018
@agnivade agnivade changed the title Proposal: New LookupCNAME() functions to list chained CNAME records proposal: net: new LookupCNAME() functions to list chained CNAME records Nov 30, 2018
@ianlancetaylor
Copy link
Member

This may be more appropriate for golang.org/x/net/dns, or similar, rather than the standard library.

@andybons
Copy link
Member

andybons commented Dec 5, 2018

@therealjoesmith how do you feel about @ianlancetaylor’s suggestion to have this in /x/net/dns?

@andybons andybons added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Dec 5, 2018
@therealjoesmith
Copy link
Author

I don't have any convincing argument either way. I appreciate the standard library is already complicated as it is. I'll leave it to more informed contributors to make that decision.

@ianlancetaylor
Copy link
Member

Is there any reason that the new functionality could not go in x/net/dns?

@rsc
Copy link
Contributor

rsc commented Dec 12, 2018

If you want detailed DNS information, the right thing to do is to use a DNS-specific package. The routines in package net are for getting basic stuff done, not advanced queries. It's probably fine to add to x/net/dns but that doesn't need to be a proposal. /cc @miekg

@rsc rsc changed the title proposal: net: new LookupCNAME() functions to list chained CNAME records x/net/dns: add LookupCNAME Dec 12, 2018
@odeke-em
Copy link
Member

odeke-em commented Apr 9, 2020

Some more DNS goodies for you @iangudger, if interested.

@iangudger
Copy link
Contributor

To clarify, the proposal that was accepted was adding LookupCNAME to x/net/dns? In order to do that, we are going to need a DNS client there.

@joedian joedian removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 16, 2022
@joedian
Copy link

joedian commented Aug 16, 2022

Implemented.

@joedian joedian closed this as completed Aug 16, 2022
@golang golang locked and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants