code: func (a *Agent) persistProxy(proxy *local.ManagedProxy, FromFile bool) error {
  	proxyPath := filepath.Join(a.config.DataDir, proxyDir,
  		stringHash(proxy.Proxy.ProxyService.ID))
  
  	wrapped := persistedProxy{
  		ProxyToken: proxy.ProxyToken,
  		Proxy:      proxy.Proxy,
  		FromFile:   FromFile,
  	}
  	encoded, err := json.Marshal(wrapped)
  	if err != nil {
  		return err
  	}
  
  	return file.WriteAtomic(proxyPath, encoded)
  }
docs: // persistProxy saves a proxy definition to a JSON file in the data dir