Skip to content

Change config get to download configs to user data folder instead of installation folder #1564

@waldekmastykarz

Description

@waldekmastykarz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions