Files
golang.net/http/httpproxy/export_test.go
Michael Fraenkel c21de06aaf http/httpproxy: support CIDR notation and ports with NO_PROXY
NO_PROXY includes support for CIDR, and notations can also
match exactly on port information if provided.
When specifying a port with IPv6, the address must be enclosed with
square brackets, [IPv6 address]:port.

Updates golang/go#16704 (fixes after vendor into std)

Change-Id: Ideb61a9ec60a6b1908f5a2c885cd6d9dd10c37cf
Reviewed-on: https://go-review.googlesource.com/115255
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-07-09 17:18:25 +00:00

14 lines
312 B
Go

// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package httpproxy
func ExportUseProxy(cfg *Config, host string) bool {
cfg1 := &config{
Config: *cfg,
}
cfg1.init()
return cfg1.useProxy(host)
}