Skip to content

Commit

Permalink
fix: do not use shuf to randomize PIA configurations (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
trois-six authored Jan 23, 2025
1 parent 61c351d commit 88366aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openvpn/pia/configure-openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ echo "Extract OpenVPN config bundle into PIA directory $VPN_PROVIDER_HOME"
unzip -qjo "$tmp_file" -d "$VPN_PROVIDER_HOME"

# Select a random server as default.ovpn
ln -sf "$(find "$VPN_PROVIDER_HOME" -name "*.ovpn" | shuf -n 1)" "$VPN_PROVIDER_HOME"/default.ovpn
ln -sf "$(find "$VPN_PROVIDER_HOME" -name "*.ovpn" | sed -n "$[ $RANDOM % $(find "$VPN_PROVIDER_HOME" -name "*.ovpn" | wc -l)]p")" "$VPN_PROVIDER_HOME"/default.ovpn

0 comments on commit 88366aa

Please sign in to comment.