mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 20:52:33 +02:00
27 lines
560 B
Go
27 lines
560 B
Go
package common
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"net"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
var (
|
|
defaultDialer = net.Dialer{
|
|
Timeout: 60 * time.Second,
|
|
KeepAlive: 60 * time.Second,
|
|
}
|
|
DefaultTransport = &http.Transport{
|
|
Proxy: http.ProxyFromEnvironment,
|
|
DialContext: defaultDialer.DialContext,
|
|
MaxIdleConnsPerHost: 1000,
|
|
}
|
|
DefaultTransportNoTLS = func() *http.Transport {
|
|
var clone = DefaultTransport.Clone()
|
|
clone.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
|
return clone
|
|
}()
|
|
)
|
|
|
|
const StaticFilePathPrefix = "/$gperrorpage/"
|