4601 Commits

Author SHA1 Message Date
yangsenzk
5b7da1fbf7
plugin/forward: fix parsing error when handling TLS+IPv6 address (#7848) 2026-02-25 02:21:39 -08:00
YOUNEVSKY
7ae1c40db2
plugin/loop: use crypto/rand for query name generation (#7881) 2026-02-25 02:21:04 -08:00
YOUNEVSKY
4411cff759
plugin: reorder rewrite before acl to prevent bypass (#7882) 2026-02-25 02:19:47 -08:00
dependabot[bot]
3d31397fe6
build(deps): bump github.com/aws/aws-sdk-go-v2/config (#7876) 2026-02-24 07:20:38 -08:00
dependabot[bot]
99923b47c9
build(deps): bump google.golang.org/api from 0.266.0 to 0.267.0 (#7877) 2026-02-23 16:57:53 -08:00
dependabot[bot]
4726bc7a91
build(deps): bump github.com/aws/aws-sdk-go-v2/credentials (#7878) 2026-02-23 16:57:44 -08:00
dependabot[bot]
8a739a38bb
build(deps): bump actions/dependency-review-action from 4.8.2 to 4.8.3 (#7875) 2026-02-23 17:10:07 +02:00
dependabot[bot]
60271a0633
build(deps): bump actions/stale from 10.1.1 to 10.2.0 (#7874) 2026-02-23 17:09:49 +02:00
dependabot[bot]
36868e4b91
build(deps): bump github/codeql-action from 4.32.3 to 4.32.4 (#7873) 2026-02-23 17:09:34 +02:00
dependabot[bot]
2833e884e7
build(deps): bump aquasecurity/trivy-action from 0.34.0 to 0.34.1 (#7872) 2026-02-23 17:09:14 +02:00
hide
78524a7921
fix(rewrite): fix cname target rewrite for CNAME chains (#7853)
* fix(rewrite): fix cname target rewrite for CNAME chains

This fix corrects the cname target rewrite to handle CNAME chains:
- Preserves only the CNAME records before matching the rule
- Rewrites only the CNAME target that matches the rule
- Includes all records from the re-resolved upstream response

Signed-off-by: hide <hide@hide.net.eu.org>

* docs(rewrite): document how answer records are handled in CNAME target rewrite

Signed-off-by: hide <hide@hide.net.eu.org>

* fix(rewrite): simplify slice append per staticcheck S1011

Signed-off-by: hide <hide@hide.net.eu.org>

* docs(rewrite): add extra line between code and paragraph

Signed-off-by: hide <hide@hide.net.eu.org>

---------

Signed-off-by: hide <hide@hide.net.eu.org>
Co-authored-by: hide <hide@hide.net.eu.org>
2026-02-21 16:10:35 -05:00
Ville Vesilehto
191a783e46
chore(deps): k8s-io group to client-go v0.35.1 (#7868) 2026-02-17 10:13:22 -08:00
dependabot[bot]
b65cdfb639
build(deps): bump golang.org/x/net from 0.49.0 to 0.50.0 (#7867)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.49.0 to 0.50.0.
- [Commits](https://github.com/golang/net/compare/v0.49.0...v0.50.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 20:24:40 +02:00
Ville Vesilehto
23774edfa4
fix(kubernetes): panic on empty ListenHosts (#7857) 2026-02-16 07:04:19 -08:00
dependabot[bot]
7767dc0e3a
build(deps): bump github/codeql-action from 4.32.2 to 4.32.3 (#7860) 2026-02-16 07:03:34 -08:00
dependabot[bot]
e837411a38
build(deps): bump aquasecurity/trivy-action from 0.33.1 to 0.34.0 (#7861) 2026-02-16 07:03:20 -08:00
dependabot[bot]
dc870768b8
build(deps): bump github.com/expr-lang/expr from 1.17.7 to 1.17.8 (#7866) 2026-02-16 07:02:50 -08:00
dependabot[bot]
86972851d5
build(deps): bump github.com/pires/go-proxyproto from 0.8.1 to 0.11.0 (#7863) 2026-02-16 07:02:27 -08:00
dependabot[bot]
0c20201df2
build(deps): bump google.golang.org/grpc from 1.78.0 to 1.79.1 (#7864) 2026-02-16 07:02:04 -08:00
dependabot[bot]
e18ead3af7
build(deps): bump the go-etcd-io group with 2 updates (#7862) 2026-02-16 07:01:51 -08:00
Ville Vesilehto
6fd38dca06
chore: bump minimum Go version to 1.25 (#7788) 2026-02-16 05:28:30 -08:00
Ville Vesilehto
b1080a2934
chore: bump Go version to 1.26.0 (#7856) 2026-02-16 04:26:18 -08:00
dependabot[bot]
0f0a9920b1
build(deps): bump google.golang.org/api from 0.264.0 to 0.265.0 (#7851)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.264.0 to 0.265.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.264.0...v0.265.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.265.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 17:40:11 -08:00
Adphi
e9c0db32dc
feat(proxyproto): add proxy protocol support (#7738)
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
2026-02-10 17:14:05 -08:00
dependabot[bot]
a100d0cca4
build(deps): bump github.com/DataDog/dd-trace-go/v2 from 2.5.0 to 2.6.0 (#7850)
Bumps [github.com/DataDog/dd-trace-go/v2](https://github.com/DataDog/dd-trace-go) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/DataDog/dd-trace-go/releases)
- [Commits](https://github.com/DataDog/dd-trace-go/compare/v2.5.0...v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/DataDog/dd-trace-go/v2
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 17:13:16 -08:00
dependabot[bot]
abfc962864
build(deps): bump golang.org/x/sys from 0.40.0 to 0.41.0 (#7852)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.40.0 to 0.41.0.
- [Commits](https://github.com/golang/sys/compare/v0.40.0...v0.41.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 17:12:59 -08:00
dependabot[bot]
3a15fe6f15
build(deps): bump github/codeql-action from 4.32.0 to 4.32.2 (#7849)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.0 to 4.32.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b20883b0cd...45cbd0c69e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 17:12:47 -08:00
Ville Vesilehto
d8f793b724
chore: bump Go version to 1.25.7 (#7843) 2026-02-06 09:15:36 -08:00
vflaux
30c20b52ff
refactor(cache): modernize with generics (#7842) 2026-02-03 17:23:53 -08:00
dependabot[bot]
923a8b5d2b
build(deps): bump google.golang.org/api from 0.262.0 to 0.264.0 (#7840)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.262.0 to 0.264.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.262.0...v0.264.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.264.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 20:42:47 +02:00
dependabot[bot]
8d3ad1aef3
build(deps): bump github/codeql-action from 4.31.11 to 4.32.0 (#7841)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.11 to 4.32.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](19b2f06db2...b20883b0cd)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 20:42:12 +02:00
dependabot[bot]
cd62dd2194
build(deps): bump docker/login-action from 3.6.0 to 3.7.0 (#7839)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](5e57cd1181...c94ce9fb46)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-02 20:41:28 +02:00
Kelly Kane
b3d79f59e5
Add metadata for response Type and Class to Log. (#7806) 2026-01-26 08:03:03 -08:00
dependabot[bot]
b722aadc44
build(deps): bump google.golang.org/api from 0.260.0 to 0.262.0 (#7835) 2026-01-26 08:01:49 -08:00
dependabot[bot]
ccd88b2c01
build(deps): bump github.com/miekg/dns from 1.1.70 to 1.1.72 (#7837) 2026-01-26 08:01:13 -08:00
dependabot[bot]
f5cf4d0639
build(deps): bump actions/checkout from 6.0.1 to 6.0.2 (#7838) 2026-01-26 17:03:56 +02:00
dependabot[bot]
a6f34e412b
build(deps): bump github/codeql-action from 4.31.10 to 4.31.11 (#7836) 2026-01-26 17:03:11 +02:00
Henrik Gerdes
7f410524d0
docs: clarify kubernetes auth docs (#7831)
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2026-01-21 18:36:11 -08:00
Shiv Tyagi
f1f0955cb9
fix: return SOA and NS records when queried for a record CNAMEd to origin (#7808)
* fix: return SOA and NS records when queried for a record CNAMEd to origin

Signed-off-by: Shiv Tyagi <shivtyagi3015@gmail.com>

* chore(test): add test for covering cname to origin scenario in file plugin

Signed-off-by: Shiv Tyagi <shivtyagi3015@gmail.com>

---------

Signed-off-by: Shiv Tyagi <shivtyagi3015@gmail.com>
2026-01-21 18:35:48 -08:00
dependabot[bot]
1c9575747f
build(deps): bump google.golang.org/api from 0.259.0 to 0.260.0 (#7833)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.259.0 to 0.260.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.259.0...v0.260.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.260.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 18:35:18 -08:00
dependabot[bot]
b6c8ac701d
build(deps): bump actions/setup-go from 6.1.0 to 6.2.0 (#7832) 2026-01-19 18:00:23 +02:00
Yong Tang
80527fd389
Bump golang to 1.25.6 (#7827) v1.14.1 2026-01-16 06:47:07 +02:00
Yong Tang
edc4193220
Bump version to 1.14.1 (#7826) 2026-01-14 10:54:09 -08:00
Ville Vesilehto
f3983c1111
perf(proxy): use mutex-based connection pool (#7790)
* perf(proxy): use mutex-based connection pool

The proxy package (used for example by the forward plugin) utilized
an actor model where a single connManager goroutine managed
connection pooling via unbuffered channels (dial, yield, ret). This
design serialized all connection acquisition and release operations
through a single goroutine, creating a bottleneck under high
concurrency. This was observable as a performance degradation when
using a single upstream backend compared to multiple backends
(which sharded the bottleneck).

Changes:
- Removed dial, yield, and ret channels from the Transport struct.
- Removed the connManager goroutine's request processing loop.
- Implemented Dial() and Yield() using a sync.Mutex to protect the
  connection slice, allowing for fast concurrent access without
  context switching.
- Downgraded connManager to a simple background cleanup loop that
  only handles connection expiration on a ticker.
- Updated plugin/pkg/proxy/connect.go to use direct method calls
  instead of channel sends.
- Updated tests to reflect the removal of internal channels.

Benchmarks show that this change eliminates the single-backend
bottleneck. Now a single upstream backend performs on par with
multiple backends, and overall throughput is improved.

The implementation aligns with standard Go patterns for connection
pooling (e.g., net/http.Transport).

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>

* fix: address PR review for persistent.go

- Named mutex field instead of embedding, to not expose
  Lock() and Unlock()
- Move stop check outside of lock in Yield()
- Close() without a separate goroutine
- Change stop channel to struct

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>

* fix: address code review feedback for conn pool

- Switch from LIFO to FIFO connection selection for source port
  diversity, reducing DNS cache poisoning risk (RFC 5452).
- Remove "clear entire cache" optimization as it was LIFO-specific.
  FIFO naturally iterates and skips expired connections.
- Remove all goroutines for closing connections; collect connections
  while holding lock, close synchronously after releasing lock.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>

* fix: remove unused error consts

No longer utilised after refactoring the channel based approach.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>

* feat(forward): add max_idle_conns option

Add configurable connection pool limit for the forward plugin via
the max_idle_conns Corefile option.

Changes:
- Add SetMaxIdleConns to proxy
- Add maxIdleConns field to Forward struct
- Add max_idle_conns parsing in forward plugin setup
- Apply setting to each proxy during configuration
- Update forward plugin README with new option

By default the value is 0 (unbounded). When set, excess
connections returned to the pool are closed immediately
rather than cached.

Also add a yield related test.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>

* chore(proxy): simple Dial by closing conns inline

Remove toClose slice collection to reduce complexity. Instead close
expired connections directly while iterating. Reduces complexity with
negligible lock-time impact.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>

* chore: fewer explicit Unlock calls

Cleaner and less chance of forgetting to unlock on new possible
code paths.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>

---------

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
2026-01-13 17:49:46 -08:00
Alex Massy
d8ff130a00
Add Quick Start section with minimal Corefile example (#7809)
Signed-off-by: Alxmassy <alexmassy2005@gmail.com>
2026-01-13 15:22:54 +02:00
dependabot[bot]
dd62f6e038
build(deps): bump github.com/aws/aws-sdk-go-v2/config (#7816)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.32.6 to 1.32.7.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.6...v1.32.7)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 19:11:00 -08:00
dependabot[bot]
30c8af200b
build(deps): bump github.com/aws/aws-sdk-go-v2/service/secretsmanager (#7824)
Bumps [github.com/aws/aws-sdk-go-v2/service/secretsmanager](https://github.com/aws/aws-sdk-go-v2) from 1.41.0 to 1.41.1.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.41.0...v1.41.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/secretsmanager
  dependency-version: 1.41.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 19:10:45 -08:00
dependabot[bot]
e25fd686dc
build(deps): bump github.com/aws/aws-sdk-go-v2/credentials (#7811)
Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.19.6 to 1.19.7.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/m2/v1.19.6...service/m2/v1.19.7)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-version: 1.19.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 18:08:11 -08:00
dependabot[bot]
23309e947c
build(deps): bump github.com/prometheus/common from 0.67.4 to 0.67.5 (#7823) 2026-01-12 16:37:42 -08:00
dependabot[bot]
d6d807e52e
build(deps): bump google.golang.org/api from 0.258.0 to 0.259.0 (#7821) 2026-01-12 16:37:31 -08:00