Skip to content

Commit

Permalink
fix: (#36) connection to random server (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
tprasadtp committed Apr 7, 2021
1 parent 379ad7c commit 99ce05b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@

Images are published on [GitHub Container Registry][ghcr].

### DockerHub Image Deprecation

Images on [DockerHub][dockerhub] are deprecated and will no longer receive updates. Its recommended that you switch to GitHub container registry image `ghcr.io/tprasadtp/protonvpn`.

## Environment Variables

| Name | Required | Description
Expand Down
4 changes: 2 additions & 2 deletions root/etc/services.d/protonvpn/run
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function connect_vpn()
if [[ -z $PROTONVPN_SERVER ]] && [[ -n ${PROTONVPN_COUNTRY} ]]; then
echo "${SVC_CONN} Using Fastest Server from ${PROTONVPN_COUNTRY}"
PVPN_DEBUG="${DEBUG:-0}" protonvpn connect --cc "${PROTONVPN_COUNTRY}"
elif [[ ${PROTONVPN_SERVER} == "RANDOM" ]] && [[ -n ${PROTONVPN_COUNTRY} ]]; then
elif [[ ${PROTONVPN_SERVER} == "RANDOM" ]] && [[ -z ${PROTONVPN_COUNTRY} ]]; then
echo "${SVC_CONN} Using Random Server"
PVPN_DEBUG="${DEBUG:-0}" protonvpn connect --random
elif [[ -z $PROTONVPN_COUNTRY ]] && [[ -n ${PROTONVPN_SERVER} ]]; then
Expand Down Expand Up @@ -129,7 +129,7 @@ function main()
# Checks
while :
do
echo "${SVC_INIT} PROTONVPN_SVC_DISCONNECTING: ${PROTONVPN_SVC_DISCONNECTING}"
echo "${SVC_CHCK} Is Service Disconnecting: ${PROTONVPN_SVC_DISCONNECTING}"
check_vpn
sleep "${PROTONVPN_CHECK_INTERVAL}" &
wait $!
Expand Down

0 comments on commit 99ce05b

Please sign in to comment.