Skip to content

Commit

Permalink
Bug fix: Do not disconnect from VPN over cellular if security level i…
Browse files Browse the repository at this point in the history
…s medium (#33)
  • Loading branch information
ruimarinho authored and iphoting committed Sep 9, 2019
1 parent 17c35ab commit 574394a
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 @@ -378,7 +378,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 @@ -133,14 +133,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 574394a

Please sign in to comment.