func FromEnvironment() *Config {
	return &Config{
		HTTPProxy:  getEnvAny("HTTP_PROXY", "http_proxy"),
		HTTPSProxy: getEnvAny("HTTPS_PROXY", "https_proxy"),
		NoProxy:    getEnvAny("NO_PROXY", "no_proxy"),
		CGI:        os.Getenv("REQUEST_METHOD") != "",
	}
}
FromEnvironment returns a Config instance populated from the
environment variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the
lowercase versions thereof). HTTPS_PROXY takes precedence over
HTTP_PROXY for https requests.

The environment values may be either a complete URL or a
"host[:port]", in which case the "http" scheme is assumed. An error
is returned if the value is a different form.
package httpproxy
import (
	"errors"
	"fmt"
	"net"
	"net/url"
	"os"
	"strings"
	"unicode/utf8"
	"golang.org/x/net/idna"
)
type Config struct {
	HTTPProxy string
	HTTPSProxy string
	NoProxy string
	CGI bool
}
type config struct {
	Config
	httpsProxy *url.URL
	httpProxy *url.URL
	ipMatchers []matcher
	domainMatchers []matcher
}