ACME and corporate proxy.
This commit is contained in:
parent
4e07d92190
commit
b6af61fa6e
1 changed files with 14 additions and 0 deletions
14
acme/acme.go
14
acme/acme.go
|
@ -114,6 +114,20 @@ type Domain struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *ACME) init() error {
|
func (a *ACME) init() error {
|
||||||
|
// FIXME temporary fix, waiting for https://github.com/xenolf/lego/pull/478
|
||||||
|
acme.HTTPClient = http.Client{
|
||||||
|
Transport: &http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
Dial: (&net.Dialer{
|
||||||
|
Timeout: 30 * time.Second,
|
||||||
|
KeepAlive: 30 * time.Second,
|
||||||
|
}).Dial,
|
||||||
|
TLSHandshakeTimeout: 15 * time.Second,
|
||||||
|
ResponseHeaderTimeout: 15 * time.Second,
|
||||||
|
ExpectContinueTimeout: 1 * time.Second,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
if a.ACMELogging {
|
if a.ACMELogging {
|
||||||
acme.Logger = fmtlog.New(os.Stderr, "legolog: ", fmtlog.LstdFlags)
|
acme.Logger = fmtlog.New(os.Stderr, "legolog: ", fmtlog.LstdFlags)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue