mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
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>
14 lines
312 B
Go
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)
|
|
}
|