mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:54:02 +03:00
Add firehol blocklist
This commit is contained in:
@@ -132,6 +132,13 @@ func (n *network) dnsResolve(protocol, address string) ([]string, error) {
|
||||
func NewNetwork(dialer Dialer,
|
||||
userAgent, dohHostname string,
|
||||
httpTimeout, idleTimeout time.Duration) (mtglib.Network, error) {
|
||||
switch {
|
||||
case httpTimeout < 0:
|
||||
return nil, fmt.Errorf("timeout should be positive number %s", httpTimeout)
|
||||
case httpTimeout == 0:
|
||||
httpTimeout = DefaultHTTPTimeout
|
||||
}
|
||||
|
||||
switch {
|
||||
case idleTimeout < 0:
|
||||
return nil, fmt.Errorf("timeout should be positive number %s", idleTimeout)
|
||||
|
||||
Reference in New Issue
Block a user