Add ECS source support to routing (#470) (#471)

* Add ECS source support to routing (#470)

* Add comment to clarify handling of EDNS0_SUBNET option in match function

* Add support for EDNS Client Subnet (ECS) routing and per-client filtering

- Updated README.md to include ECS routing capabilities and SVG image.
- Added example configuration for use case 7
This commit is contained in:
tekert
2025-10-20 06:25:47 -03:00
committed by GitHub
parent 3fc8654938
commit 61be40db8c
9 changed files with 138 additions and 14 deletions

View File

@@ -44,8 +44,8 @@ func Example_router() {
// Build a router that will send all "*.cloudflare.com" to the cloudflare
// resolver while everything else goes to the google resolver (default)
route1, _ := rdns.NewRoute(`\.cloudflare\.com\.$`, "", nil, nil, "", "", "", "", "", "", cloudflare)
route2, _ := rdns.NewRoute("", "", nil, nil, "", "", "", "", "", "", google)
route1, _ := rdns.NewRoute(`\.cloudflare\.com\.$`, "", nil, nil, "", "", "", "", "", "", "", cloudflare)
route2, _ := rdns.NewRoute("", "", nil, nil, "", "", "", "", "", "", "", google)
r := rdns.NewRouter("my-router")
r.Add(route1, route2)