Skip to content

Commit

Permalink
updated: cache more TLD whois servers
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiIgna committed Feb 4, 2023
1 parent 96392eb commit a859a11
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whoiser",
"version": "1.15.0",
"version": "1.15.1",
"description": "Whois info for TLDs, domains and IPs",
"types": "./index.d.ts",
"typings": "./index.d.ts",
Expand Down
9 changes: 8 additions & 1 deletion src/whoiser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,32 @@ let cacheTldWhoisServer = {

// ccTLDs
ai: 'whois.nic.ai',
au: 'whois.auda.org.au',
co: 'whois.nic.co',
ca: 'whois.cira.ca',
do: 'whois.nic.do',
gl: 'whois.nic.gl',
in: 'whois.registry.in',
io: 'whois.nic.io',
it: 'whois.nic.it',
me: 'whois.nic.me',
ro: 'whois.rotld.ro',
rs: 'whois.rnids.rs',
so: 'whois.nic.so',
us: 'whois.nic.us',
ws: 'whois.website.ws',

agency: 'whois.nic.agency',
app: 'whois.nic.google',
biz: 'whois.nic.biz',
country: 'whois.uniregistry.net', // hardcoded because `whois.iana.org` sometimes returns 'whois.uniregistry.net' or 'whois.nic.country'
dev: 'whois.nic.google',
house: 'whois.nic.house',
info: 'whois.nic.info',
link: 'whois.uniregistry.net',
live: 'whois.nic.live',
nyc: 'whois.nic.nyc',
one: 'whois.nic.one',
online: 'whois.nic.online',
shop: 'whois.nic.shop',
site: 'whois.nic.site',
Expand Down Expand Up @@ -173,7 +180,7 @@ const whoisDomain = async (rawDomain, { host = null, timeout = 15000, follow = 2
false

// fill in WHOIS servers when missing
if (!nextWhoisServer && result['Registrar URL'] && result['Registrar URL'].includes('domains.google')) {
if (!nextWhoisServer && result['Registrar URL']?.includes('domains.google')) {
nextWhoisServer = 'whois.google.com'
}

Expand Down

0 comments on commit a859a11

Please sign in to comment.