diff options
| author | James O'Doherty <james@theodohertyfamily.com> | 2026-05-22 16:17:55 -0400 |
|---|---|---|
| committer | James O'Doherty <james@theodohertyfamily.com> | 2026-05-22 16:17:55 -0400 |
| commit | 135f6edbd9389bc4783f13c26aed0a74d3c8aca0 (patch) | |
| tree | 41a8e80b0dcf2c42b045bc91d9101deceb049f47 /internal/config/config.go | |
| parent | 2e3a1d07b43e6e942e51ba263c6fcdc2351afc0d (diff) | |
refactor: unify path management and complete profile management system
- Create internal/paths package for unified config and runtime directory resolution
- Implement robust WireGuard config parsing in pkg/wgconf
- Implement profile management subcommands: list, import, configure, delete, stop
- Fix namespace pinning path collisions (separating .ns files from pids directories)
- Implement and verify namespace unpinning logic
- Fix linting errors and improve error handling across the project
Diffstat (limited to 'internal/config/config.go')
| -rw-r--r-- | internal/config/config.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index d81a1f6..5aa8462 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1,25 +1,7 @@ package config -import ( - "os" - "path/filepath" -) - type Config struct { Profile string DNSServer string Command []string } - -// GetDefaultProfilesDir returns the standard XDG path for wg-wrap profiles. -func GetDefaultProfilesDir() string { - configHome := os.Getenv("XDG_CONFIG_HOME") - if configHome == "" { - home, err := os.UserHomeDir() - if err != nil { - return "etc/wg-wrap/profiles" // Fallback - } - configHome = filepath.Join(home, ".config") - } - return filepath.Join(configHome, "wg-wrap", "profiles") -} |
