Summary
The config get command currently downloads configurations to the config subfolder inside the installation folder (AppFolder). This means downloaded configs are lost when upgrading Dev Proxy, because all installers (winget/Inno Setup, Homebrew, Linux setup scripts) overwrite the entire installation directory.
Current behavior
ConfigCommand.cs downloads to Path.Combine(appFolder, "config"):
var appFolder = ProxyUtils.AppFolder;
var configFolderPath = Path.Combine(appFolder, "config");
This is the same folder that ships with preset configs (e.g. m365.json, microsoft-graph.json), so user-downloaded configs are mixed with built-in ones and both get overwritten on upgrade.
Proposed behavior
Download configs to a configs subfolder in the user data folder (the same folder used for the certificate and state):
| OS |
Path |
| macOS |
~/Library/Application Support/dev-proxy/configs/ |
| Linux |
~/.config/dev-proxy/configs/ (or $XDG_CONFIG_HOME/dev-proxy/configs/) |
| Windows |
%LocalAppData%\dev-proxy\configs\ |
This folder is already resolved by StateManager.GetConfigFolder() and is not touched by any installer.
Impact
- Downloaded configs survive upgrades
- Clear separation between built-in presets (installation
config/) and user-downloaded configs (user data configs/)
- Output messages with
~appFolder paths would need updating to reflect the new location
- Consider introducing a
~dataFolder token (or similar) for referencing the user data directory in CLI output
Summary
The
config getcommand currently downloads configurations to theconfigsubfolder inside the installation folder (AppFolder). This means downloaded configs are lost when upgrading Dev Proxy, because all installers (winget/Inno Setup, Homebrew, Linux setup scripts) overwrite the entire installation directory.Current behavior
ConfigCommand.csdownloads toPath.Combine(appFolder, "config"):This is the same folder that ships with preset configs (e.g.
m365.json,microsoft-graph.json), so user-downloaded configs are mixed with built-in ones and both get overwritten on upgrade.Proposed behavior
Download configs to a
configssubfolder in the user data folder (the same folder used for the certificate and state):~/Library/Application Support/dev-proxy/configs/~/.config/dev-proxy/configs/(or$XDG_CONFIG_HOME/dev-proxy/configs/)%LocalAppData%\dev-proxy\configs\This folder is already resolved by
StateManager.GetConfigFolder()and is not touched by any installer.Impact
config/) and user-downloaded configs (user dataconfigs/)~appFolderpaths would need updating to reflect the new location~dataFoldertoken (or similar) for referencing the user data directory in CLI output