code: func BasicConnect(realm string, f func(user, passwd string) bool) goproxy.HttpsHandler {
  	return goproxy.FuncHttpsHandler(func(host string, ctx *goproxy.ProxyCtx) (*goproxy.ConnectAction, string) {
  		if !auth(ctx.Req, f) {
  			ctx.Resp = BasicUnauthorized(ctx.Req, realm)
  			return goproxy.RejectConnect, host
  		}
  		return goproxy.OkConnect, host
  	})
  }
docs: // BasicConnect returns a basic HTTP authentication handler for CONNECT requests
  //
  // You probably want to use auth.ProxyBasic(proxy) to enable authentication for all proxy activities