From 69a75acea56bbff39fa1c81d4813ebcb4a617f06 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Nov 2025 10:07:55 +0000 Subject: Refactor: modular architecture with shared packages Major code reorganization to eliminate duplication and improve maintainability: - Created pkg/crypto: shared cryptographic functions (padding, AES-GCM, ECDH, HMAC auth) - Created pkg/protocol: unified message structures and JSON serialization - Created pkg/identity: persistent identity management (load/save/generate) - Created pkg/tor: Tor SOCKS5 proxy connection utilities - Refactored server to use shared packages (cmd/server) - Refactored CLI client with shared packages (cmd/cli-client) - Refactored GUI client with shared packages (cmd/gui-client) - Refactored web client with embedded HTML template (cmd/web-client) Security improvements: - Replaced math/rand with crypto/rand for randomDelay() - Added proper error handling for crypto operations Code reduction: eliminated ~500+ lines of duplicated code --- go.mod | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'go.mod') diff --git a/go.mod b/go.mod index ffc9af3..79778e9 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,16 @@ go 1.24.0 toolchain go1.24.7 require ( - fyne.io/fyne/v2 v2.6.3 // indirect + fyne.io/fyne/v2 v2.6.3 + github.com/awnumar/memguard v0.23.0 + github.com/gorilla/websocket v1.5.3 + golang.org/x/net v0.44.0 +) + +require ( fyne.io/systray v1.11.0 // indirect github.com/BurntSushi/toml v1.4.0 // indirect github.com/awnumar/memcall v0.4.0 // indirect - github.com/awnumar/memguard v0.23.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fredbi/uri v1.1.0 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect @@ -36,7 +41,6 @@ require ( github.com/yuin/goldmark v1.7.8 // indirect golang.org/x/crypto v0.42.0 // indirect golang.org/x/image v0.24.0 // indirect - golang.org/x/net v0.44.0 // indirect golang.org/x/sys v0.36.0 // indirect golang.org/x/text v0.29.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect -- cgit v1.2.3