Commit Graph

39 Commits

Author SHA1 Message Date
Owen
5414d21dcd Quiet normal log message
Fixes #2057
2025-12-12 18:40:33 -05:00
Owen
364fa020aa Add healthcheck route 2025-12-12 11:47:04 -05:00
Owen
0d54a07973 Merge branch 'enhancement/errgroup-context-propagation' of github.com:LaurenceJJones/gerbil into LaurenceJJones-enhancement/errgroup-context-propagation 2025-12-06 12:14:58 -05:00
Laurence
971452e5d3 revert: drop logger formatting changes from calcpeerbandwidth optimization branch 2025-11-16 08:42:57 +00:00
Laurence
bba4345b0f main: optimize calculatePeerBandwidth to avoid nested peer scans
Build a set of current peer public keys during the primary iteration and
prune lastReadings in a single pass, removing the O(n^2) nested loop.

No behavior change; improves efficiency when peer lists and lastReadings
grow large.
2025-11-16 08:40:26 +00:00
Laurence
697f4131e7 enhancement: base context + errgroup; propagate cancellation; graceful shutdown
- main: add base context via signal.NotifyContext; establish errgroup and use it to supervise background tasks; convert ticker to context-aware periodicBandwidthCheck; run HTTP server under errgroup and add graceful shutdown; treat context.Canceled as normal exit
- relay: thread parent context through UDPProxyServer; add cancel func; make packet reader, workers, and cleanup tickers exit on ctx.Done; Stop cancels, closes listener and downstream UDP connections, and closes packet channel to drain workers
- proxy: drop earlier parent context hook for SNI proxy per review; rely on existing Stop() for graceful shutdown

Benefits:
- unified lifecycle and deterministic shutdown across components
- prevents leaked goroutines/tickers and closes sockets cleanly
- consolidated error handling via g.Wait(), with context cancellation treated as non-error
- sets foundation for child errgroups and future structured concurrency
2025-11-16 06:00:32 +00:00
Owen
19031ebdfd Move to gen the port in the right place 2025-10-16 13:40:01 -07:00
Owen
0eebbc51d5 Deprecate --listen 2025-10-16 10:38:47 -07:00
Owen
9038239bbe Accept proxy protocol from other nodes 2025-09-29 21:56:15 -07:00
Owen
7040a9436e Add proxy protocol 2025-08-26 22:26:01 -07:00
Owen
f983a8f141 Local proxy port 443 2025-08-22 11:56:29 -07:00
Owen
efce3cb0b2 Sni has no errors now 2025-08-17 10:43:37 -07:00
Owen
1df5eb19ff Integrate sni proxy 2025-08-13 15:41:58 -07:00
Owen
f71f183886 Add basic proxy 2025-08-12 18:02:34 -07:00
Owen
38483f4a26 Allow for updating destinations 2025-07-28 22:41:11 -07:00
Owen
78c768e497 Add mutex 2025-07-28 21:35:57 -07:00
Owen
50b42059ac Add new logic to handle changes in newt connection 2025-07-24 20:46:51 -07:00
Owen
825f7fcf60 Add notify 2025-06-21 12:06:58 -04:00
Owen
a16021cd86 Put http server into routine 2025-03-25 20:49:28 -04:00
Owen
f7c0bb9135 Basic relay working! 2025-02-23 16:49:49 -05:00
Owen
a145b77f79 Remove logging 2025-02-22 13:09:04 -05:00
Owen
7b3f7d2b12 Add holepunch udp server 2025-02-21 22:28:16 -05:00
Owen Schwartz
bab8630756 Add retry to config request 2025-01-19 17:26:15 -05:00
Owen Schwartz
24e993ee41 Add mss clamping 2025-01-19 17:19:09 -05:00
Owen Schwartz
bc69b625fa Better feedback about config 2025-01-15 21:55:18 -05:00
Owen Schwartz
1712b88e18 MTU 1280 by default 2025-01-15 20:54:24 -05:00
Owen Schwartz
fcb3b5de6a Merge branch 'env-vars' into dev 2025-01-14 23:45:12 -05:00
Owen Schwartz
5101e6f125 Add env vars 2025-01-14 22:04:06 -05:00
Owen Schwartz
217379d286 Working on mtu 2025-01-14 21:57:00 -05:00
Owen Schwartz
b44d320968 Allow changing mtu; set default low 2025-01-13 22:52:11 -05:00
Owen Schwartz
d47234e7c7 Bump go version 2024-12-26 18:22:43 -05:00
Owen Schwartz
1203255e81 Clean up mod 2024-12-24 16:22:27 -05:00
Owen Schwartz
b271219aa6 Sending incremental updates working 2024-12-19 21:19:39 -05:00
Owen Schwartz
d7a66e2122 Standardize logging 2024-11-23 17:41:42 -05:00
Owen Schwartz
c26d395e83 Add reachableAt 2024-10-26 22:45:13 -04:00
Owen Schwartz
b524b97114 Fix bandwidth check 2024-10-03 21:49:10 -04:00
Owen Schwartz
1576856abf Add entrypoint script 2024-09-30 09:43:27 -04:00
Owen Schwartz
d63ab8336e Get working with docker cli args 2024-09-29 15:14:23 -04:00
Owen Schwartz
8f7f2de645 Initial commit 2024-09-29 10:53:25 -04:00