Two gaps let network calls escape the configured proxy:
1. NetworkClient::executeRequest read proxy_ without holding mutex_, while
setProxy()/initialize() write it from other threads (init, config reload).
A torn read of optional<ProxyConfig> (it holds std::string host/user/pass)
could yield an empty host -> enabled()==false -> a silent DIRECT connection.
yt-dlp/ffmpeg snapshot their proxy under their own mutexes, so only the
HTTP path (YouTube Data API, URL shortener) was affected — matching the
observed "YouTube API without proxy". Snapshot proxy_ under the lock.
2. Core::reloadConfig updated only the config copy + command manager; it never
re-applied the proxy to the network stack, so editing the proxy and running
!reloadconfig left every client on the old/no proxy. Add
MusicManager::applyNetworkConfig() to push the proxy to the NetworkClient,
the yt-dlp subprocess, and the ffmpeg AudioDecoder at once, and call it from
both reloadConfig and updateConfig (which previously touched only the HTTP
client). reloadConfig now also syncs the shared ConfigManager.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>