From e7d5ae5dc183af6c1f75af31128f4166bdf72ba7 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Fri, 28 Oct 2022 11:02:24 +0000 Subject: [PATCH] fix(fastestvpn): handle lowercase .ovpn filenames --- internal/provider/fastestvpn/updater/filename.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/provider/fastestvpn/updater/filename.go b/internal/provider/fastestvpn/updater/filename.go index ab22dcd7..2940a7c8 100644 --- a/internal/provider/fastestvpn/updater/filename.go +++ b/internal/provider/fastestvpn/updater/filename.go @@ -15,15 +15,15 @@ func parseFilename(fileName string) ( country string, tcp, udp bool, err error, ) { const ( - tcpSuffix = "-TCP.ovpn" - udpSuffix = "-UDP.ovpn" + tcpSuffix = "-tcp.ovpn" + udpSuffix = "-udp.ovpn" ) var suffix string switch { - case strings.HasSuffix(fileName, tcpSuffix): + case strings.HasSuffix(strings.ToLower(fileName), tcpSuffix): suffix = tcpSuffix tcp = true - case strings.HasSuffix(fileName, udpSuffix): + case strings.HasSuffix(strings.ToLower(fileName), udpSuffix): suffix = udpSuffix udp = true default: