Commit Graph

823 Commits

Author SHA1 Message Date
Owen
9bc0204f57 Merge branch 'main' into dev 2026-05-07 17:24:34 -07:00
Daniel Snider
1e77b09e3b fix(ping): decouple data-plane recovery trigger from backoff ramp
The trigger condition that decides whether to fire the data-plane
recovery flow in startPingCheck was AND-ed with `currentInterval <
maxInterval`. That clause was meant to throttle the *backoff ramp*
(don't widen the interval past 6s), but it also gated the recovery
trigger itself — a conflation that became invisibly load-bearing
once commit 8161fa6 (March 2026) bumped the default pingInterval
from 3s to 15s while leaving maxInterval at 6s. Under the new
defaults `currentInterval` starts at 15s and `15 < 6` is permanently
false, so the recovery branch never executed. Pings just kept
failing and the failure counter climbed forever, with no
"Connection to server lost" log line and no newt/ping/request
emitted on the websocket. Real-world recovery only happened when
the underlying network came back fast enough that a periodic ping
naturally succeeded again — which doesn't happen if the WireGuard
state on either end has rotated, so users were left stuck until
they restarted newt.

This is the proximate cause of the user reports in
fosrl/newt#284 (and dups #310, fosrl/pangolin#1004). Logs in
those issues all show ping-failure counters growing without ever
emitting "Connection to server lost", which is exactly the
fingerprint of this gate being false.

The fix is to extract the trigger decision into shouldFireRecovery
and remove currentInterval from it. Backoff is now computed in a
separate `if` in the caller, still gated by `currentInterval <
maxInterval` so the ramp is a no-op under default settings (which
is the existing behaviour, just no longer entangled with the
recovery trigger). Fixing the backoff ramp itself — making it
useful when pingInterval >= maxInterval — is a follow-up: the
priority is restoring recovery, not improving the dampening
schedule.

The new shouldFireRecovery helper is unit-tested. Its signature
intentionally omits currentInterval, so a future refactor that
re-introduces the interval-dependent gate would need to change
the function signature, which makes the historical bug harder
to reintroduce silently.
2026-05-07 16:57:31 -07:00
Owen
74fd3f3aa3 Bump version 2026-05-07 16:24:30 -07:00
Owen
e8dc19a62b Attempt to fix nix issue 2026-05-07 16:23:59 -07:00
Owen
9ff32b8a8b Fix not logging when rewriting nat 2026-05-07 16:16:47 -07:00
Owen
27f7ca6bb9 Try to fix failover not working 2026-05-05 11:40:39 -07:00
Owen
5090907307 Update status code 2026-04-30 15:55:52 -07:00
Owen
a6533b3fa0 Fix incorrect redirect logic 2026-04-29 21:11:07 -07:00
Owen Schwartz
57aa2e2e2c Merge pull request #336 from fosrl/dev
1.12.3
1.12.3
2026-04-29 16:02:49 -07:00
Owen Schwartz
5724c516dc Merge pull request #334 from LaurenceJJones/private-http-websocket
enhance(http): Support websocket upgrades
2026-04-29 15:58:30 -07:00
Owen
b33c3b8849 Add some test scripts for ws and move to testing/ 2026-04-29 15:57:31 -07:00
Laurence
8e19e475bf Support websocket upgrades in private HTTP proxy
Preserve optional ResponseWriter interfaces through statusCapture so httputil.ReverseProxy can hijack upgraded websocket connections. Add a regression test covering websocket traffic through the HTTP handler path.
2026-04-29 07:12:35 +01:00
Owen Schwartz
9e92c42876 Merge pull request #333 from fosrl/dev
Dont block tcp for http unless there are targets
1.12.2 v1.12.2
2026-04-28 14:51:01 -07:00
Owen
66c72bbe2e Dont block tcp for http unless there are targets 2026-04-28 14:29:55 -07:00
Owen Schwartz
ffd26f9a6d Merge pull request #331 from fosrl/dev
Follow redirects by default for backward compat
1.12.1 v1.12.1
2026-04-28 10:13:49 -07:00
Owen
7610aa40bf Follow redirects by default for backward compat
Fixes #330
2026-04-28 10:10:28 -07:00
Owen Schwartz
bf33a66043 Merge pull request #328 from fosrl/dev
Quiet message
1.12.0 v1.12.0
2026-04-27 20:11:01 -07:00
Owen
23caf57bf4 Quiet message 2026-04-27 20:10:35 -07:00
Owen Schwartz
df3aa60cf5 Merge pull request #327 from fosrl/dev
1.12.0
2026-04-27 20:08:45 -07:00
Owen
5c43db466a Fix crashing when removing hc 2026-04-27 15:03:36 -07:00
Owen Schwartz
cc663f1636 Merge pull request #323 from fosrl/dev
1.12.0-rc.1
v1.12.0-rc.1
2026-04-24 13:42:38 -07:00
Owen
1a67ff30c2 Hard code the ifconfig path 2026-04-24 10:39:44 -07:00
Owen
bfd61ca511 Fix transport issue 2026-04-22 21:36:16 -07:00
Owen
294f99e024 Try to add redirect 2026-04-22 20:12:51 -07:00
Owen Schwartz
af2ecf486a Merge pull request #322 from fosrl/dev
Revert nix in cicd
1.12.0-rc.0
2026-04-22 11:40:45 -07:00
Owen
efd6743ce4 Revert nix version in cicd 2026-04-22 11:40:12 -07:00
Owen Schwartz
a0d2bb999a Merge pull request #321 from fosrl/dev
1.12.0-rc.0
2026-04-22 11:35:31 -07:00
Owen
5d889fbc09 Merge branch 'main' into dev 2026-04-22 11:34:40 -07:00
Owen
1a7cf06ff8 Merge branch 'fix-nix' into dev 2026-04-22 11:31:58 -07:00
Owen
35a334c842 Merge branch 'http-ha' into dev 2026-04-21 15:07:05 -07:00
Owen
c8e5112a2a Merge branch 'alerting-rules' into dev 2026-04-21 15:06:50 -07:00
Owen
8bfb4659c0 Remove hc id 2026-04-20 21:52:21 -07:00
Owen
309f9caad2 Fix nil pointer 2026-04-20 15:05:07 -07:00
Owen
26de268466 Add x-forwarded-for 2026-04-20 15:04:59 -07:00
Owen
0f927a37ab Find old bins and support freebsd 2026-04-16 21:47:48 -07:00
Owen
e8961c5de5 Use follow redirects bool 2026-04-15 21:36:40 -07:00
Owen
9bb8eaeadb Updating with new methods 2026-04-15 21:01:04 -07:00
Owen Schwartz
d3d10d02e8 Merge pull request #317 from fosrl/fix-nix
fix nix
2026-04-14 14:24:26 -07:00
Owen
d133d69cb9 Update nix version in cicd 2026-04-14 14:22:52 -07:00
Owen
50be4f617e Update version 2026-04-14 14:22:48 -07:00
Owen
be1cd190e7 Merge branch 'main' into dev 2026-04-14 14:17:42 -07:00
Owen
5c9d13bcca Add ldflags version to local 2026-04-13 17:00:06 -07:00
Owen Schwartz
dc2e23380a Merge pull request #306 from LaurenceJJones/investigate/heap-leak-udp-proxy
fix(proxy): reclaim idle UDP flows and make timeout configurable
2026-04-13 10:27:37 -07:00
Marc Schäfer
3d2b73d417 Merge pull request #303 from fosrl/dependabot/go_modules/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp-1.43.0
chore(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp from 1.38.0 to 1.43.0
2026-04-12 22:49:53 +02:00
Owen
12776d65c1 Add logging 2026-04-11 21:56:28 -07:00
Laurence
0569525743 Merge remote-tracking branch 'upstream/dev' into investigate/heap-leak-udp-proxy
Made-with: Cursor

# Conflicts:
#	proxy/manager.go
2026-04-10 13:36:13 +01:00
Owen
342af9e42d Switch to scheme 2026-04-09 17:21:36 -04:00
Owen
092535441e Pass the new data down from the websocket 2026-04-09 16:13:19 -04:00
Owen
5848c8d4b4 Adjust to use data saved inside of the subnet rule 2026-04-09 16:04:11 -04:00
Owen Schwartz
6becf0f719 Merge pull request #277 from LaurenceJJones/refactor/proxy-udp-buffer-pool
perf(proxy): add sync.Pool for UDP buffers
2026-04-09 13:09:06 -04:00