mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-23 20:37:35 +02:00
Feature: IVPN support
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user