Add WireGuard TUI implementation

- Add Go TUI with bubbletea for WireGuard management
- Implement client CRUD operations with QR code generation
- Add configuration and validation modules
- Install/update scripts for client setup
- Update Makefile to build binaries to bin/ directory
- Add .gitignore for Go projects
This commit is contained in:
Calmcacil
2026-01-12 19:03:35 +01:00
parent 5ac68db854
commit 26120b8bc2
37 changed files with 6330 additions and 97 deletions

View File

@@ -9,7 +9,8 @@ BINARY=wg-tui
CMD_PATH=$(ROOTDIR)/cmd/$(BINARY)
# Build directory
BUILD_DIR=build
BUILD_DIR=bin
BINARY_PATH=$(BUILD_DIR)/$(BINARY)
# Go parameters
GOCMD=go
@@ -27,23 +28,25 @@ help: ## Show this help message
build: ## Build the binary
@echo "Building $(BINARY)..."
@$(GOBUILD) -C $(ROOTDIR) -o $(BINARY) cmd/$(BINARY)/main.go
@echo "Build complete: $(BINARY)"
@mkdir -p $(BUILD_DIR)
@$(GOBUILD) -C $(ROOTDIR) -o $(BINARY_PATH) cmd/$(BINARY)/main.go
@echo "Build complete: $(BINARY_PATH)"
build-all: ## Build all binaries
@echo "Building all binaries..."
@$(GOBUILD) -C $(ROOTDIR) -o $(BINARY) ./...
@mkdir -p $(BUILD_DIR)
@$(GOBUILD) -C $(ROOTDIR) -o $(BINARY_PATH) ./...
clean: ## Clean build artifacts
@echo "Cleaning..."
@$(GOCLEAN)
@rm -f $(BINARY)
@rm -rf $(BUILD_DIR)
@echo "Clean complete"
install: ## Install the binary to $GOPATH/bin
@echo "Installing $(BINARY)..."
@$(GOBUILD) -C $(ROOTDIR) -o $$($(GOCMD) env GOPATH)/bin/$(BINARY) cmd/$(BINARY)/main.go
@echo "Install complete"
@echo "Install complete: $$($(GOCMD) env GOPATH)/bin/$(BINARY)"
test: ## Run tests
@echo "Running tests..."
@@ -73,7 +76,7 @@ deps: ## Download dependencies
run: build ## Build and run the binary
@echo "Running $(BINARY)..."
@./$(BINARY)
@./$(BINARY_PATH)
dev: ## Run in development mode with hot reload (requires air)
@if command -v air > /dev/null; then \