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

CDN detection for IP using PTR DNS records as fallback. #100

Open
brenocss opened this issue May 17, 2023 · 0 comments
Open

CDN detection for IP using PTR DNS records as fallback. #100

brenocss opened this issue May 17, 2023 · 0 comments

Comments

@brenocss
Copy link
Contributor

CDN detection for IP using PTR DNS records as fallback.

I believe this feature can work, but I think it's worth a more in-depth analysis.

$ host -t ptr 104.87.29.118

118.29.87.104.in-addr.arpa domain name pointer a104-87-29-118.deploy.static.akamaitechnologies.com.
ns7.reverse.deploy.akamaitechnologies.com has address 184.26.161.32
ns5.reverse.deploy.akamaitechnologies.com has address 95.100.173.32
ns1.reverse.deploy.akamaitechnologies.com has address 96.7.50.32
ns3.reverse.deploy.akamaitechnologies.com has address 23.74.25.32
ns8.reverse.deploy.akamaitechnologies.com has address 2.22.230.32
ns6.reverse.deploy.akamaitechnologies.com has address 23.61.199.32
ns2.reverse.deploy.akamaitechnologies.com has address 2.16.40.32
ns4.reverse.deploy.akamaitechnologies.com has address 95.100.168.32

to add this feature we can add

func (c *Client) CheckDNSResponse(dnsResponse *retryabledns.DNSData) (matched bool, value string, itemType string, err error) {

	if dnsResponse.PTR != nil {
		matched, discovered, itemType, err := c.CheckSuffix(dnsResponse.PTR...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant