diff --git a/CHANGELOG.md b/CHANGELOG.md index 346c515c..d0efb371 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Load config from Config file, and from env vars. Use viper for that - Automatically alocates a random port, if the specified one is in-use +## [0.1.8] - 2021-10-27 +### Changed +- Removed unused/leftover file. + ## [0.1.7] - 2021-10-27 ### Added - Added more tests covering passing credentials via env var. diff --git a/PAC.md b/PAC.md deleted file mode 100644 index 20c6a2e8..00000000 --- a/PAC.md +++ /dev/null @@ -1,28 +0,0 @@ -# PAC and Proxy - -Source: - -```go -gServer := goproxy.NewProxyHttpServer() - -gServer.OnRequest().DoFunc(func(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response) { - proxy, _ := url.Parse("http://user:pass@proxy.host:port") - gServer.Tr = &http.Transport{ - Proxy: http.ProxyURL(proxy), - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, - } -}) -``` - -Source: - -```go -u, err := url.Parse(externalProxy) - -proxy.ConnectDial = proxy.NewConnectDialToProxyWithHandler(externalProxy, func(req *http.Request) { - if u.User != nil { - credentials := base64.StdEncoding.EncodeToString([]byte(u.User.String())) - req.Header.Add("Proxy-Authorization", "Basic "+credentials) - } -}) -``` diff --git a/pkg/proxy/proxy_test.go b/pkg/proxy/proxy_test.go index 3f9ee83f..51be70c5 100644 --- a/pkg/proxy/proxy_test.go +++ b/pkg/proxy/proxy_test.go @@ -30,7 +30,7 @@ const ( defaultProxyLoggingLevel = "none" defaultProxyHostname = "127.0.0.1" - defaultProxyScheme = "http" + defaultProxyScheme = HTTP localProxyCredentialPassword = "p123" localProxyCredentialUsername = "u123" upstreamProxyCredentialPassword = "p456"