Add firehol blocklist

This commit is contained in:
9seconds
2021-03-15 16:21:07 +03:00
parent cae33a22e6
commit f52b3391d1
11 changed files with 533 additions and 0 deletions
+7
View File
@@ -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)