code: func stop(proxy *Proxy) {
  	if !proxy.Enabled {
  		return
  	}
  	proxy.Enabled = false
  
  	proxy.tomb.Killf("Shutting down from stop()")
  	proxy.tomb.Wait() // Wait until we stop accepting new connections
  
  	proxy.connections.Lock()
  	defer proxy.connections.Unlock()
  	for _, conn := range proxy.connections.list {
  		conn.Close()
  	}
  
  	logrus.WithFields(logrus.Fields{
  		"name":     proxy.Name,
  		"proxy":    proxy.Listen,
  		"upstream": proxy.Upstream,
  	}).Info("Terminated proxy")
  }
docs: // Stops a proxy, assumes the lock has already been taken