Skip to content

Commit

Permalink
Do not disconnect from VPN over cellular if security level is medium
Browse files Browse the repository at this point in the history
  • Loading branch information
ruimarinho committed Aug 29, 2019
1 parent e0d1fd1 commit 5b0c19a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion features/gen_basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Feature: Basic Generate Functionality
And the output should match:
"""
<key>Action</key>
\s*<string>Disconnect</string>
\s*<string>Ignore</string>
\s*<key>InterfaceTypeMatch</key>
\s*<string>Cellular</string>
"""
Expand Down
14 changes: 7 additions & 7 deletions lib/ovpnmcgen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ def generate(inputs = {})
vodCellularOnly = { # Trust Cellular
'InterfaceTypeMatch' => 'Cellular',
'Action' => case inputs[:security_level]
when 'paranoid'
'Connect'
when 'high'
'Ignore'
else # medium
'Disconnect'
end
when 'paranoid'
'Connect'
else # high, medium
'Ignore'
end
}

# Default catch-all to prevent circular race.
vodDefault = { # Default catch-all
'Action' => 'Ignore'
}
Expand Down

0 comments on commit 5b0c19a

Please sign in to comment.