feat(cdn): add Gcore (G-Core Labs) provider detection#15
Merged
Conversation
Add Gcore (G-Core Labs S.A., AS199524) to the CDN provider registry so its edge IPs are filtered from origin candidates instead of polluting results. Detection uses embedded edge ranges, gcdn.co/gcorelabs.com/ gcore.com CNAME suffixes, the Server: gcore marker, the X-Gcore-* header family, and an X-CDN: Gcore value — pure data + classification, no API key or new dependency, mirroring the KeyCDN/Edgio providers. The Gcore prefixes are exclusive; the IPv6 block uses 2a03:f480::/32 to avoid colliding with CDN77's 2a03:90c0::/29, and the registry-wide TestNoDuplicatePrefixAcrossProviders guard passes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Adds Gcore (G-Core Labs S.A., AS199524) to the CDN provider registry. Gcore was the highest-traffic-share regional edge network still unmodeled after KeyCDN (R17). Without it, Gcore edge IPs surface as false-positive origin candidates from cert/subdomain techniques.
One provider addition only. Pure embedded data + header/DNS classification — no API key, no new dependency. Mirrors the existing
buildKeyCDN()/buildEdgio()pattern.Detection signals
pkg/cdn/data/gcore-v4.txt/gcore-v6.txt, ASN AS199524):92.223.64.0/19,5.188.48.0/20,185.193.116.0/22,2a03:f480::/32.gcdn.co,.gcorelabs.com,.gcore.comServer: gcore, theX-Gcore-*family (e.g.X-Gcore-Pop), andX-CDN: GcoreCollision safety
All Gcore prefixes are exclusive. The IPv6 block was deliberately set to
2a03:f480::/32to avoid colliding with CDN77's2a03:90c0::/29(a/29masks2a03:90c0–2a03:90c7). The registry-wideTestNoDuplicatePrefixAcrossProvidersguard passes.Tests
*_Gcoretest functions inpkg/cdn/cdn_test.go(cdn test funcs 67 → 74): IP-range hits (v4 x2, v6), negative IP, CNAME positive/negative, and header classification (Server / X-Gcore-* / X-CDN / negative / signal-collection).go test ./...passes,go vetclean,gofmtclean.Docs
[Unreleased] → Addedentry.Test plan
go build ./...go test ./...(all packages pass)go test ./pkg/cdn/ -run Gcore -v(7 funcs pass)TestNoDuplicatePrefixAcrossProviderspasses (no prefix collision)gofmt -landgo vet ./pkg/cdn/clean🤖 Generated with Claude Code