Example #1
0
// ProxyBasic will force HTTP authentication before any request to the proxy is processed
func ProxyBasic(proxy *gopensslproxy.ProxyHttpServer, realm string, f func(user, passwd string) bool) {
	proxy.OnRequest().Do(Basic(realm, f))
	proxy.OnRequest().HandleConnect(BasicConnect(realm, f))
}