code: func ParseProxyConfig(m map[string]interface{}) (ProxyConfig, error) {
  	var cfg ProxyConfig
  	err := mapstructure.WeakDecode(m, &cfg)
  	// Set defaults (even if error is returned)
  	if cfg.Protocol == "" {
  		cfg.Protocol = "tcp"
  	} else {
  		cfg.Protocol = strings.ToLower(cfg.Protocol)
  	}
  	if cfg.LocalConnectTimeoutMs < 1 {
  		cfg.LocalConnectTimeoutMs = 5000
  	}
  	return cfg, err
  }
docs: // ParseProxyConfig returns the ProxyConfig parsed from the an opaque map. If an
  // error occurs during parsing it is returned along with the default config this
  // allows caller to choose whether and how to report the error.