Repository navigation
Conversation
… edge-labelled #10 Adds a report-only `host` section (JSON schema 1.17): resolved IPv4/IPv6 addresses, the GeoIP country of the first address, and a TCP connect time labelled as such. The country comes from a bundled DB-IP Lite country snapshot (2026-11, CC BY 4.0, source sha256 in packages/utils/geoip-db/ SNAPSHOT.json); lookups are offline and a missing country is omitted. When existing technology detection finds Cloudflare, CloudFront, Vercel, Netlify, Fastly or Akamai, the country is labelled an edge/anycast location and not the origin's, in every output format. No new edge detection. Attribution is in the README and THIRD_PARTY_NOTICES; compiled CLI grows by about 2.2 MiB. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Nik Cubrilovic <[email protected]>
…SN, apart from the origin (#1807) Adds `host.edge` (JSON schema 1.18): the CDN or edge platform answering for the host, the strongest matching source (header, ip-range or asn) and every source that agreed, an edgeHosted flag for Vercel, Netlify and Cloudflare Pages, and the origin kept separate (identified, edge-hosted or unknown, never the edge). The country is labelled an edge location when any source finds an edge. Data is bundled and matched offline. scripts/refresh-edge-data.ts is the only code that fetches it and records the fetch date and sha256 of every file: Cloudflare, CloudFront (CLOUDFRONT service only), Fastly, Google Cloud (cloud.json, marked broad: it is not Cloud CDN specific) and Azure Front Door (AzureFrontDoor.Frontend) ranges, plus DB-IP IP to ASN Lite (CC BY 4.0) reduced to edge-specific ASNs. Akamai, Vercel and Netlify have no range list and stay header or ASN detected. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Nik Cubrilovic <[email protected]>
|
|
||
| export function parseV6(ip: string): Uint8Array | null { | ||
| let text = ip.split("%")[0]!; | ||
| const tailV4 = /(\d+\.\d+\.\d+\.\d+)$/.exec(text); |
| sourceSha256: sha(asnRaw), | ||
| keptAsns: [...wanted.keys()].length, | ||
| }, | ||
| rangeSources: sources.filter((s) => !s.url.includes("db-ip.com")).map((s) => ({ ...s, fetchedAt })), |
… an edge (#1807) Google's cloud.json lists every Google Cloud range, including a plain Compute Engine VM, and Google publishes no Cloud CDN-only list. A match no longer sets host.edge, labels the country as an edge location, or appears as an edge or alsoMatched source. It is reported as host.cloudRange (provider, address) and as a "Cloud range" row that says it is not evidence of a CDN or edge. The edge is set only by a header or a CDN-specific range or ASN. The range data is unchanged. The schema stays 1.18, which is not yet released. Signed-off-by: Nik Cubrilovic <[email protected]>
Contributor
Author
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.
Depends on #1818. This branch is based on #1818's branch, so until that merges the diff also shows its commit; review only
2214093band189c78bd.Closes #1807 (see the caveats on Google Cloud and Azure Front Door below).
What changes
host.edgein the JSON report (schema 1.18) and in the text, markdown, console, HTML, XML and LLM formats: provider, strongestsource(header,ip-rangeorasn), every source thatmatched,edgeHosted, andorigin(identified,edge-hostedorunknown; never the edge itself).host.cloudRange(new in this PR): the address is in a whole-cloud range list (Google Cloud). It is provider information only. It never setsedge, never appears as an edge oralsoMatchedsource, and never labels the country as an edge location. The report shows it as a "Cloud range" row, and as acloudRangeattribute in XML and LLM output.cdnandhostingtechnology rows are untouched.Data (bundled, offline at runtime)
SNAPSHOT.json. Reduced to a fixed list of edge-specific ASNs (Cloudflare, Fastly, Akamai CDN, Vercel). Shared cloud ASNs (AWS, Azure, Google) and Akamai's Linode ASN 63949 are excluded.CLOUDFRONTonly), api.fastly.com/public-ip-list, gstatic.com/ipranges/cloud.json (provider information only, see below), Microsoft Service Tags (AzureFrontDoor.Frontendonly). No Akamai, Vercel or Netlify ranges.scripts/refresh-edge-data.tsre-downloads, records the fetch date and sha256 of every file, and rewrites the bundled files. Attribution in README, both THIRD_PARTY_NOTICES (generator updated) and docs.2214093b.189c78bdchanges code only, not the bundled data, and its size was not re-measured.Caveats to review
Via: 1.1 googleis shared with other products.cloud.jsoncovers all of Google Cloud, including a plain Compute Engine VM, so a match says only that the address is in Google Cloud's published ranges. Per the lead decision, that is reported ashost.cloudRangeand never as an edge, and the country is not labelled an edge location because of it. Google Cloud CDN is therefore never detected. The country of such an address is still shown as the ordinary hosting country, as it is for any address with no edge.x-azure-ref) on this base; onlyFrontendranges are bundled, notBackend,FirstPartyorMicrosoftSecurity.Tests
189c78bd: a whole-cloud address alone is not an edge (noedge, country not an edge location,cloudRangeset); beside a real edge it leaves the edge unchanged; the Cloud range row and JSON carry it with no Edge row.edge-1807,host-infoandhost-10tests: 69 pass.make check(format, lint, typecheck) passes;bun test packages/report packages/utils packages/core-contracts: 2465 pass.Agent skill
No change needed: the skill does not describe the host section.
bun.lockhas a pre-existing local change that is not part of this PR.