code: func ProxyBasic(proxy *goproxy.ProxyHttpServer, realm string, f func(user, passwd string) bool) {
  	proxy.OnRequest().Do(Basic(realm, f))
  	proxy.OnRequest().HandleConnect(BasicConnect(realm, f))
  }
docs: // ProxyBasic will force HTTP authentication before any request to the proxy is processed