From d4f5a3b71c97ad403fbb75bd8c3762dfdd5c9b5f Mon Sep 17 00:00:00 2001 From: Prasad Tengse Date: Fri, 7 Jun 2024 17:34:15 +0200 Subject: [PATCH] fix: prevent kill switch from being disabled during disconnects when using custom entrypoint/cmd Kill switch can be only disabled by explicitly specifying `--kill-switch` flag --- protonwire | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/protonwire b/protonwire index 6781ad8..4a46648 100755 --- a/protonwire +++ b/protonwire @@ -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 @@ -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"