feat(security): auto-detect local networks, hot-reload config, and 403 handling - #63
Merged
Merged
Conversation
…3 handling - Add DetectLocalNetworks() to auto-populate allowed_ips with RFC1918 ranges - Add ConfigManager for thread-safe config access and hot-reload support - IP whitelist now always active (removed no-op bypass), returns 403 Forbidden - Hot-reload allowed_ips, logging, multipass timeout, and SSH key path - Server host/port still require restart - Move /api/health inside protected API group - Add /unauthorized page and +error.svelte for 403 handling - Fix duplicate TypeScript type definitions (InstanceState, SnapshotList) - Auto-detect networks on existing installations with empty allowed_ips
- Fix +error.svelte to use page from \/state instead of wrong data props - Fix logger data race: wrap globals in atomic.Pointer for thread-safe reads - Fix config handler: reinit logger even when server settings require restart - Add tests for DetectLocalNetworks, ConfigManager, and concurrent access - Add IPv6 ULA (fd00::/8) support to DetectLocalNetworks - Add debug logging to DetectLocalNetworks for troubleshooting
…riable - Change Store to accept *zerolog.Logger pointer for explicit indirection - Remove unused logOutput package-level variable (dead store) - Use local writer variable in Init/Reinit instead of package-level assignment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements automatic local network detection, hot-reloadable configuration, and proper 403 access denied handling.
Changes
Security
Hot-Reload
Frontend
Files Changed (18)
Testing