Skip to content

Commit

Permalink
fix: prevent kill switch from being disabled during disconnects when …
Browse files Browse the repository at this point in the history
…using custom entrypoint/cmd

Kill switch can be only disabled by explicitly specifying `--kill-switch` flag
  • Loading branch information
tprasadtp committed Jun 7, 2024
1 parent cf16053 commit d4f5a3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions protonwire
Original file line number Diff line number Diff line change
Expand Up @@ -2264,12 +2264,13 @@ function protonvpn_disconnect_cmd() {
((++errs))
fi

if __is_bool_true "${KILL_SWITCH}"; then
log_variable "__PROTONWIRE_DISCONNECT_DISABLE_KILL_SWITCH"
if __is_bool_true "${__PROTONWIRE_DISCONNECT_DISABLE_KILL_SWITCH}"; then
if ! __protonvpn_disable_ks; then
((++errs))
fi
else
log_debug "Killswitch state is left unchanged"
log_info "Killswitch state is left unchanged"
fi

if [[ $errs -eq 0 ]]; then
Expand Down Expand Up @@ -2511,6 +2512,7 @@ function main() {
;;
--killswitch | --kill-switch | --ks | -ks)
KILL_SWITCH="true"
__PROTONWIRE_DISCONNECT_DISABLE_KILL_SWITCH="true"
;;
--p2p)
__PROTONWIRE_FEATURE_P2P="true"
Expand Down

0 comments on commit d4f5a3b

Please sign in to comment.