mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 10:44:02 +03:00
Use curl as user agent
This commit is contained in:
@@ -28,6 +28,9 @@ const (
|
||||
// probes.
|
||||
DefaultTCPKeepAlivePeriod = 10 * time.Second
|
||||
|
||||
// User Agent to use in HTTP client.
|
||||
UserAgent = "curl/8.5.0"
|
||||
|
||||
// tcpLingerTimeout defines a number of seconds to wait for sending
|
||||
// unacknowledged data.
|
||||
tcpLingerTimeout = 1
|
||||
|
||||
@@ -76,6 +76,10 @@ func New(
|
||||
dnsResolver = net.DefaultResolver
|
||||
}
|
||||
|
||||
if userAgent == "" {
|
||||
userAgent = UserAgent
|
||||
}
|
||||
|
||||
return &network{
|
||||
Dialer: net.Dialer{
|
||||
Timeout: tcpTimeout,
|
||||
|
||||
Reference in New Issue
Block a user