Add "Allow connections to Updates Proxy" firewall setting (#582)
This commit is contained in:
parent
c1e85d3094
commit
da09aa79fc
@ -230,6 +230,7 @@ class QubesFirewallRulesModel(QAbstractItemModel):
|
||||
self.allow = conf["allow"]
|
||||
self.allowDns = conf["allowDns"]
|
||||
self.allowIcmp = conf["allowIcmp"]
|
||||
self.allowYumProxy = conf["allowYumProxy"]
|
||||
|
||||
for rule in conf["rules"]:
|
||||
self.appendChild(QubesFirewallRuleItem(
|
||||
@ -239,15 +240,16 @@ class QubesFirewallRulesModel(QAbstractItemModel):
|
||||
def get_vm_name(self):
|
||||
return self.__vm.name
|
||||
|
||||
def apply_rules(self, allow, dns, icmp):
|
||||
def apply_rules(self, allow, dns, icmp, yumproxy):
|
||||
assert self.__vm is not None
|
||||
|
||||
if(self.allow != allow or self.allowDns != dns or self.allowIcmp != icmp):
|
||||
if(self.allow != allow or self.allowDns != dns or self.allowIcmp != icmp or self.allowYumProxy != yumproxy):
|
||||
self.fw_changed = True
|
||||
|
||||
conf = { "allow": allow,
|
||||
"allowDns": dns,
|
||||
"allowIcmp": icmp,
|
||||
"allowYumProxy": yumproxy,
|
||||
"rules": list()
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
||||
self.qvm_collection.unlock_db()
|
||||
|
||||
if self.tabWidget.isTabEnabled(self.tabs_indices["firewall"]):
|
||||
self.fw_model.apply_rules(self.policyAllowRadioButton.isChecked(), self.dnsCheckBox.isChecked(), self.icmpCheckBox.isChecked())
|
||||
self.fw_model.apply_rules(self.policyAllowRadioButton.isChecked(), self.dnsCheckBox.isChecked(), self.icmpCheckBox.isChecked(), self.yumproxyCheckBox.isChecked())
|
||||
|
||||
if self.tabWidget.isTabEnabled(self.tabs_indices["applications"]):
|
||||
self.AppListManager.save_appmenu_select_changes()
|
||||
@ -642,6 +642,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
||||
self.set_allow(model.allow)
|
||||
self.dnsCheckBox.setChecked(model.allowDns)
|
||||
self.icmpCheckBox.setChecked(model.allowIcmp)
|
||||
self.yumproxyCheckBox.setChecked(model.allowYumProxy)
|
||||
|
||||
def set_allow(self, allow):
|
||||
self.policyAllowRadioButton.setChecked(allow)
|
||||
|
@ -29,7 +29,7 @@
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="basic_tab">
|
||||
<property name="locale">
|
||||
@ -648,7 +648,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
@ -758,6 +758,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="yumproxyCheckBox">
|
||||
<property name="text">
|
||||
<string>Allow connections to Updates Proxy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="devices_tab">
|
||||
|
Loading…
Reference in New Issue
Block a user