Fix wrong country being selected when city not provided.

This commit is contained in:
Jakub Kukul
2020-11-22 22:49:48 +01:00
parent 0828e0b391
commit 8e8c3b3511

View File

@@ -3,7 +3,7 @@ rm -rf ovpn_configs*
wget -O ovpn_configs.zip https://api.surfshark.com/v1/server/configurations
unzip ovpn_configs.zip -d ovpn_configs
cd ovpn_configs
VPN_FILE=$(ls | grep "${SURFSHARK_COUNTRY}" | grep "${SURFSHARK_CITY}" | grep "${CONNECTION_TYPE}" | shuf | head -n 1)
VPN_FILE=$(ls "${SURFSHARK_COUNTRY}"* | grep "${SURFSHARK_CITY}" | grep "${CONNECTION_TYPE}" | shuf | head -n 1)
echo Chose: ${VPN_FILE}
printf "${SURFSHARK_USER}\n${SURFSHARK_PASSWORD}" > vpn-auth.txt