(hostname: string)
| 236 | } |
| 237 | |
| 238 | async function resolveHostname(hostname: string): Promise<string> { |
| 239 | try { |
| 240 | const addresses = await dns.resolve4(hostname); |
| 241 | return addresses[0] || ''; |
| 242 | } catch { |
| 243 | return ''; |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | interface IPInfo { |
| 248 | isp: string | null; |