-
Notifications
You must be signed in to change notification settings - Fork 4
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
search domain discovery: add whois lookup fallback #24
base: dns_domains_fallback
Are you sure you want to change the base?
Conversation
Lookup the contact information for the external public IP to derive potential search domains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
) | ||
|
||
func reverseLookupWhois(addr netip.Addr) (domains []string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whois
> WHOIS
for consistency with the names of the variables above?
return extractEmailDomains(response) | ||
} | ||
|
||
func resolveWhoisRedirects(addr netip.Addr, server string) (response string, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whois
> WHOIS
?
return | ||
} | ||
|
||
func queryWhois(serverTCPAddr *net.TCPAddr, queryAddr netip.Addr) (response string, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whois
> WHOIS
?
func queryWhois(serverTCPAddr *net.TCPAddr, queryAddr netip.Addr) (response string, err error) { | ||
var tcpConn *net.TCPConn | ||
var responseBuff []byte | ||
tcpConn, err = net.DialTCP("tcp", nil, serverTCPAddr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need timeouts for this operation, i.e., use net.DialTimeout
plus SetDeadline
on the resulting connection?
Add fallback feature for discovering a valid search domain by looking up the contact information for the external public IP and deriving potential search domains from the contact addresses.