func init() {
	defaultTransport := http.DefaultTransport.(*http.Transport)
	// Call the DialContextMiddleware for the DefaultTransport to
	// facilitate testing use of allowOutgoingAccess.
	defaultTransport = DialContextMiddleware(NewLocalDialBreaker(true))(defaultTransport)
	// Call our own proxy function with the DefaultTransport.
	http.DefaultTransport = ProxyMiddleware(defaultTransport)
}
// NOTE: Once we refactor the juju tests enough that they do not use
// a RoundTripper on the DefaultTransport, NewClient can always return
// a Client with a locally constructed Transport via NewHttpTLSTransport
// and init() will no longer be needed.
//
// https://bugs.launchpad.net/juju/+bug/1888888
//
// TODO (stickupkid) This is terrible, I'm not kidding! This isn't yours to
// touch!
Once we refactor the juju tests enough that they do not use
a RoundTripper on the DefaultTransport, NewClient can always return
a Client with a locally constructed Transport via NewHttpTLSTransport
and init() will no longer be needed.




// NOTE : Once we refactor the juju tests enough that they do not use // a RoundTripper on the DefaultTransport NewClient can always return // a Client with a locally constructed Transport via NewHttpTLSTransport // and init () will no longer be needed . // // https : // bugs . launchpad . net / juju / + bug / 1888888 // // TODO ( stickupkid ) This is terrible I ' m not kidding! This isn ' t yours to // touch!
func init() {
	defaultTransport := http.DefaultTransport.(*http.Transport)
	defaultTransport = DialContextMiddleware(NewLocalDialBreaker(true))(defaultTransport)
	http.DefaultTransport = ProxyMiddleware(defaultTransport)
}
func init ( ) { defaultTransport := http . DefaultTransport . ( * http . Transport ) defaultTransport = DialContextMiddleware ( NewLocalDialBreaker ( true ) ) ( defaultTransport ) http . DefaultTransport = ProxyMiddleware ( defaultTransport ) }
Once we refactor the juju tests enough that they do not use
a RoundTripper on the DefaultTransport, NewClient can always return
a Client with a locally constructed Transport via NewHttpTLSTransport
and init() will no longer be needed.
Once we refactor the juju tests enough that they do not use a RoundTripper on the DefaultTransport NewClient can always return a Client with a locally constructed Transport via NewHttpTLSTransport and init () will no longer be needed .
// Call the DialContextMiddleware for the DefaultTransport to // facilitate testing use of allowOutgoingAccess. // Call our own proxy function with the DefaultTransport.