Commit Graph

11 Commits

Author SHA1 Message Date
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
4ee9d77532 Rebuild sessions 2025-09-28 15:31:34 -07:00
Owen
8922ca9736 Fix some clients stuff for multi pop 2025-08-12 17:26:14 -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
c9a6b85e1d Attempt to add sender and receiver ids to relaying 2025-04-07 21:45:57 -04:00
Owen
9506b545f4 Handle encrypted messages 2025-03-15 21:46:40 -04:00
Owen
993f5f86c5 Small adjustments 2025-02-23 20:17:16 -05:00
Owen
093a4c21f2 Big speed increase 2025-02-23 18:43:37 -05:00
Owen
f7c0bb9135 Basic relay working! 2025-02-23 16:49:49 -05:00