[Node] Support ability to dynamically update proxy configuration

We use newrelic in a Ruby on Rails app and several node.js apps. In all cases, we have the ability to configure proxy settings once at app startup. The proxy configuration remains cached in memory from that point on. Our corporate proxy configuration changes every 24 hours to use a new password. Even if we set a new value for the environment variables that set proxy password, the newrelic agent does not pick up a change.

Is there some way to force the agent to at least recache some configuration settings. At the very least the proxy password?

In our ruby code, we currently resort to a hack like this:

  def handle_new_relic_change(password)
    ENV['NEW_RELIC_PROXY_PASS'] = password  # simply doing this does not work
    nr_config_cache = ::NewRelic::Agent.config.instance_variable_get("@cache")
    if nr_config_cache
      nr_config_cache[:proxy_pass] = password
    else
      Rails.logger.warn("Could not set NewRelic config proxy_pass, new relic will fail")
    end
  end

Not sure yet how we might be able to do something similar to the above in our node.js apps.