Run DNS/IP diagnostics even when IP range lookup fails#10
Open
justinvitale wants to merge 1 commit into
Open
Conversation
A 'Not on Vercel' or 'DNS lookup failed' response often indicates DNS-level hijacking by the local network or ISP, but the script previously exited early and reported nothing actionable. Skip only the per-IP reachability tests on failure and continue running the reporter IP/ASN lookup, local + public DNS resolution, and the domain response capture so the actual interception can be investigated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Not on Vercel,DNS lookup failed, or an API error/empty response, the script previously exited immediately and reported nothing useful, even though these outcomes often indicate DNS-level hijacking by the local network or ISP.return/exitwith arange_lookup_failedflag that skips only the per-IP reachability loop (which needs a valid IP range), and let the rest of the script run so we still capture:ipinfo.ionslookup -debug/dig) to reveal any hijacked IPs8.8.8.8for comparisoncurl -svk https://$domainto capture the intercepting cert/headers/bodystarttimestamp above the lookup so theTime elapsedline still computes correctly on the failure path.vercel-debug.ps1andvercel-debug.shto keep them in sync.Test plan
bash -n vercel-debug.shpasses.Not on Vercel): script prints the failure reason, skips the per-IP tests, and continues through IP info, DNS lookups, and the finalcurl.