- `internal/updater/html` package - Add unit tests for slickvpn updating code - Change shared html package to be more share-able - Split html utilities in multiple files - Fix processing .ovpn files with prefix space Authored by @Rohaq Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
29 lines
615 B
Go
29 lines
615 B
Go
package updater
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/qdm12/gluetun/internal/updater/resolver"
|
|
)
|
|
|
|
func parallelResolverSettings(hosts []string) (settings resolver.ParallelSettings) {
|
|
const (
|
|
maxFailRatio = 0.1
|
|
maxDuration = 20 * time.Second
|
|
betweenDuration = time.Second
|
|
maxNoNew = 2
|
|
maxFails = 2
|
|
)
|
|
return resolver.ParallelSettings{
|
|
Hosts: hosts,
|
|
MaxFailRatio: maxFailRatio,
|
|
Repeat: resolver.RepeatSettings{
|
|
MaxDuration: maxDuration,
|
|
BetweenDuration: betweenDuration,
|
|
MaxNoNew: maxNoNew,
|
|
MaxFails: maxFails,
|
|
SortIPs: true,
|
|
},
|
|
}
|
|
}
|