Logo
Explore Help
Register Sign In
admin/gluetun
1
0
Fork 0
You've already forked gluetun
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
cb804577a93d77c2b2739ebc7cd1e5f58ca2ec21
gluetun/internal/provider/nordvpn/updater/ip.go

17 lines
284 B
Go
Raw Normal View History

chore(updater): incorporate `FetchServers` method in `Provider` interface - Each provider interface can now fetch updated servers data - Rename each provider updater subpackage name to `updater` - Updater constructor does not take a settings struct - Updater update method takes in a slice of provider strings
2022-06-09 23:47:12 +00:00
package updater
Maintenance: refactor servers updater code - Require at least 80% of number of servers now to pass - Each provider is in its own package with a common structure - Unzip package with unzipper interface - Openvpn package with extraction and download functions
2021-05-08 00:59:42 +00:00
import (
"fmt"
"net"
)
func parseIPv4(s string) (ipv4 net.IP, err error) {
ip := net.ParseIP(s)
if ip == nil {
return nil, fmt.Errorf("%w: %q", ErrParseIP, s)
} else if ip.To4() == nil {
return nil, fmt.Errorf("%w: %s", ErrNotIPv4, ip)
}
return ip, nil
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 183ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API