Feature: IVPN support

This commit is contained in:
Quentin McGaw (desktop)
2021-05-31 00:11:16 +00:00
parent 835fa6c41f
commit 8b8bab5c58
43 changed files with 1505 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
package ivpn
import (
"strings"
)
func parseFilename(fileName string) (country, city string) {
const suffix = ".ovpn"
fileName = strings.TrimSuffix(fileName, suffix)
parts := strings.Split(fileName, "-")
country = strings.ReplaceAll(parts[0], "_", " ")
if len(parts) > 1 {
city = strings.ReplaceAll(parts[1], "_", " ")
}
return country, city
}