Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next level kill switch #581

Merged
merged 4 commits into from
Nov 13, 2018
Merged

Next level kill switch #581

merged 4 commits into from
Nov 13, 2018

Conversation

faern
Copy link
Member

@faern faern commented Nov 13, 2018

Should solve #522.

Adds an extra daemon setting called block_when_disconnected. This defaults to false and when false the app should work identical to how it works today. But when set to true it will block the firewall in in the same way it does when in blocked state, but also in the disconnected state.

This has the result that if a user explicitly clicks disconnect or exits the app GUI they will have all their internet access blocked until they connect the VPN tunnel again via the CLI or GUI.

Should add an extra level of safety for those afraid of accidentally clicking the disconnect button or those exiting the GUI and still expect to not leak for example.

Git checklist:


This change is Reviewable

@faern faern requested a review from pronebird November 13, 2018 10:16
@faern
Copy link
Member Author

faern commented Nov 13, 2018

I do not intend this PR to also add this to the GUI. I think we should add it as this PR proposes first and get that out and receive some feedback before we expose it in the GUI maybe.

Copy link
Contributor

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 11 of 13 files at r1.
Reviewable status: 11 of 13 files reviewed, 1 unresolved discussion (waiting on @faern)


talpid-core/src/tunnel_state_machine/disconnected_state.rs, line 58 at r1 (raw file):

        match try_handle_event!(self, commands.poll()) {
            Ok(TunnelCommand::AllowLan(allow_lan)) => {
                let changed = shared_values.allow_lan != allow_lan;

You could avoid an extra boolean variable by moving this expression into if statement

if shared_values.allow_lan != allow_lan {
  shared_values.allow_lan = allow_lan;
  ...
}

Copy link
Contributor

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 13 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faern)

Copy link
Contributor

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faern)

Copy link
Contributor

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Member Author

@faern faern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 12 of 13 files reviewed, all discussions resolved (waiting on @pronebird)


talpid-core/src/tunnel_state_machine/disconnected_state.rs, line 58 at r1 (raw file):

Previously, pronebird (Andrei Mihailov) wrote…

You could avoid an extra boolean variable by moving this expression into if statement

if shared_values.allow_lan != allow_lan {
  shared_values.allow_lan = allow_lan;
  ...
}

Ah. Of course. Well spotted. Fixed now.

Copy link
Contributor

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants